mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add field ref_ext in table of timespent
This commit is contained in:
parent
9635fa35d8
commit
20a9dc1951
|
|
@ -413,3 +413,6 @@ ALTER TABLE llx_c_invoice_subtype ADD UNIQUE INDEX uk_c_invoice_subtype (entity,
|
|||
|
||||
ALTER TABLE llx_c_propalst ADD COLUMN sortorder smallint DEFAULT 0;
|
||||
ALTER TABLE llx_c_stcomm ADD COLUMN sortorder smallint DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_element_time ADD COLUMN ref_ext varchar(32);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
CREATE TABLE llx_element_time(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
ref_ext varchar(32), -- reference into an external system (not used by dolibarr)
|
||||
fk_element integer NOT NULL,
|
||||
elementtype varchar(32) NOT NULL,
|
||||
element_date date,
|
||||
|
|
|
|||
|
|
@ -16,10 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Luracast\Restler\RestException;
|
||||
use Luracast\Restler\RestException;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
/**
|
||||
* API class for projects
|
||||
|
|
@ -29,7 +30,6 @@
|
|||
*/
|
||||
class Tasks extends DolibarrApi
|
||||
{
|
||||
|
||||
/**
|
||||
* @var array $FIELDS Mandatory fields, checked when create and update object
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1354,6 +1354,7 @@ class Task extends CommonObjectLine
|
|||
$sql .= " s.nom as thirdparty_name,";
|
||||
$sql .= " s.email as thirdparty_email,";
|
||||
$sql .= " ptt.rowid,";
|
||||
$sql .= " ptt.ref_ext,";
|
||||
$sql .= " ptt.fk_element as fk_task,";
|
||||
$sql .= " ptt.element_date as task_date,";
|
||||
$sql .= " ptt.element_datehour as task_datehour,";
|
||||
|
|
@ -1404,6 +1405,7 @@ class Task extends CommonObjectLine
|
|||
$newobj->task_label = $obj->task_label;
|
||||
|
||||
$newobj->timespent_line_id = $obj->rowid;
|
||||
$newobj->timespent_line_ref_ext = $obj->ref_ext;
|
||||
$newobj->timespent_line_date = $this->db->jdate($obj->task_date);
|
||||
$newobj->timespent_line_datehour = $this->db->jdate($obj->task_datehour);
|
||||
$newobj->timespent_line_withhour = $obj->task_date_withhour;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user