Merge pull request #20611 from atm-kevin/FIX_Salaries_Payment_Entity

FIX : Add missing entity on salary's payment
This commit is contained in:
Laurent Destailleur 2022-04-14 21:46:10 +02:00 committed by GitHub
commit ada8585921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,9 +164,9 @@ class PaymentSalary extends CommonObject
$this->db->begin();
if ($totalamount != 0) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_salary (fk_salary, datec, datep, amount,";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_salary (entity, fk_salary, datec, datep, amount,";
$sql .= " fk_typepayment, num_payment, note, fk_user_author, fk_bank)";
$sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',";
$sql .= " VALUES (".((int) $conf->entity).", ".((int) $this->chid).", '".$this->db->idate($now)."',";
$sql .= " '".$this->db->idate($this->datepaye)."',";
$sql .= " ".price2num($totalamount).",";
$sql .= " ".((int) $this->paiementtype).", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note)."', ".((int) $user->id).",";