diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index ff35ece947b..465e6f27fd6 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -144,7 +144,7 @@ class Tva extends CommonObject $sql .= " '".$this->db->escape($this->note)."',"; $sql .= " '".$this->db->escape($this->fk_account)."',"; $sql .= " '".$this->db->escape($this->type_payment)."',"; - $sql .= " '".$this->db->escape($this->fk_user_creat)."',"; + $sql .= " '".($this->fk_user_creat > 0 ? (int)$this->fk_user_creat : (int)$user->id)."',"; $sql .= " '".$this->db->escape($this->fk_user_modif)."'"; $sql .= ")"; diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index e3dbb9b735d..9e009543fe0 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -146,7 +146,7 @@ class Salary extends CommonObject $sql .= " note='".$this->db->escape($this->note)."',"; $sql .= " fk_bank=".($this->fk_bank > 0 ? (int) $this->fk_bank : "null").","; $sql .= " fk_user_author=".((int) $this->fk_user_author).","; - $sql .= " fk_user_modif=".($this->fk_user_modif > 0 ? (int) $this->fk_user_modif : 'null'); + $sql .= " fk_user_modif=".($this->fk_user_modif > 0 ? (int)$this->fk_user_modif : (int)$user->id); $sql .= " WHERE rowid=".((int) $this->id);