Merge pull request #11525 from altatof/fournpricelog

FIX fournrprice log for insert
This commit is contained in:
Laurent Destailleur 2019-07-18 17:16:04 +02:00 committed by GitHub
commit d04a092756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -430,8 +430,8 @@ class ProductFournisseur extends Product
$sql .= " " . $newnpr . ",";
$sql .= $conf->entity . ",";
$sql .= $delivery_time_days . ",";
$sql .= (empty($supplier_reputation) ? 'NULL' : "'" . $this->db->escape($supplier_reputation) . "'");
$sql .= (empty($barcode) ? 'NULL' : "'" . $this->db->escape($barcode) . "'");
$sql .= (empty($supplier_reputation) ? 'NULL' : "'" . $this->db->escape($supplier_reputation) . "'") . ",";
$sql .= (empty($barcode) ? 'NULL' : "'" . $this->db->escape($barcode) . "'") . ",";
$sql .= (empty($fk_barcode_type) ? 'NULL' : "'" . $this->db->escape($fk_barcode_type) . "'");
$sql .= ")";
@ -462,7 +462,8 @@ class ProductFournisseur extends Product
if (empty($error)) {
$this->db->commit();
return $idinserted;
$this->product_fourn_price_id = $idinserted;
return $this->product_fourn_price_id;
} else {
$this->db->rollback();
return -1;