FIX : multicompany, impossible to add second task
due to ref already exists, it was impossible to add a second task on company > 1 this need to be fixed in all Dolibarr versions All datas with more than 1 company are corrupted !
This commit is contained in:
parent
5b86851cf3
commit
24cb739b7c
@ -156,6 +156,7 @@ class Task extends CommonObject
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task (";
|
||||
$sql .= "fk_projet";
|
||||
$sql .= ", ref";
|
||||
$sql.= ", entity";
|
||||
$sql .= ", fk_task_parent";
|
||||
$sql .= ", label";
|
||||
$sql .= ", description";
|
||||
@ -168,6 +169,7 @@ class Task extends CommonObject
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= $this->fk_project;
|
||||
$sql .= ", ".(!empty($this->ref) ? "'".$this->db->escape($this->ref)."'" : 'null');
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql .= ", ".$this->fk_task_parent;
|
||||
$sql .= ", '".$this->db->escape($this->label)."'";
|
||||
$sql .= ", '".$this->db->escape($this->description)."'";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user