Fix regression

This commit is contained in:
Laurent Destailleur
2021-08-28 18:59:12 +02:00
parent 8ab9c96b7e
commit feb2e71f0c

View File

@@ -3387,20 +3387,11 @@ class SupplierInvoiceLine extends CommonObjectLine
$this->multicurrency_total_ttc = 0;
}
$fk_product = (int) $this->fk_product;
$fk_unit = (int) $this->fk_unit;
$this->db->begin();
if (empty($this->fk_product)) {
$fk_product = "null";
} else {
$fk_product = (int) $this->fk_product;
}
if (empty($this->fk_unit)) {
$fk_unit = "null";
} else {
$fk_unit = (int) $this->fk_unit;
}
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
$sql .= " description ='".$this->db->escape($this->description)."'";
$sql .= ", ref ='".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'";