FIX : last modif date for salary

This commit is contained in:
Gauthier PC portable 024 2021-04-26 12:29:17 +02:00
parent 3920050186
commit 5ef22327a2

View File

@ -589,7 +589,7 @@ class Salary extends CommonObject
*/ */
public function info($id) 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 .= ' FROM '.MAIN_DB_PREFIX.'salary as ps';
$sql .= ' WHERE ps.rowid = '.((int) $id); $sql .= ' WHERE ps.rowid = '.((int) $id);
@ -605,7 +605,14 @@ class Salary extends CommonObject
$cuser->fetch($obj->fk_user_author); $cuser->fetch($obj->fk_user_author);
$this->user_creation = $cuser; $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_creation = $this->db->jdate($obj->datec);
$this->date_modification = $this->db->jdate($obj->tms);
} }
$this->db->free($result); $this->db->free($result);
} else { } else {