Skip to content
Snippets Groups Projects
Commit fd8d571d authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #2003 from atm-alexis/3.6

fix bug on thm
parents ca69bf9d d177a2fb
No related branches found
No related tags found
No related merge requests found
......@@ -769,7 +769,7 @@ class Task extends CommonObject
if ($this->db->query($sql) )
{
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
$ret = $tasktme_id;
$ret = $tasktime_id;
if (! $notrigger)
{
......@@ -801,10 +801,7 @@ class Task extends CommonObject
dol_syslog(get_class($this)."::addTimeSpent error -2 ".$this->error, LOG_ERR);
$ret = -2;
}
}
if ($ret >= 0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time";
$sql.= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")";
$sql.= " WHERE rowid = ".$tasktime_id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment