diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 94ede5d7a4d..e3dbb9b735d 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -589,7 +589,7 @@ class Salary extends CommonObject */ public function info($id) { - $sql = 'SELECT ps.rowid, ps.datec, ps.fk_user_author'; + $sql = 'SELECT ps.rowid, ps.datec, ps.tms, ps.fk_user_author, ps.fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.'salary as ps'; $sql .= ' WHERE ps.rowid = '.((int) $id); @@ -605,7 +605,14 @@ class Salary extends CommonObject $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; } + + if ($obj->fk_user_modif) { + $muser = new User($this->db); + $muser->fetch($obj->fk_user_modif); + $this->user_modification = $muser; + } $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->tms); } $this->db->free($result); } else {