Skip to content

Commit

Permalink
Update fournisseur.product.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 14, 2019
1 parent cc1454c commit e9a0646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/fourn/class/fournisseur.product.class.php
Expand Up @@ -391,7 +391,6 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn
return -2;
}
}

else
{
dol_syslog(get_class($this) . '::update_buyprice without knowing id of line, so we delete from company, quantity and supplier_ref and insert again', LOG_DEBUG);
Expand Down Expand Up @@ -434,6 +433,8 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn
$sql .= (empty($fk_barcode_type) ? 'NULL' : "'" . $this->db->escape($fk_barcode_type) . "'");
$sql .= ")";

$this->product_fourn_price_id = 0;

$resql = $this->db->query($sql);
if ($resql) {
$this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX . "product_fournisseur_price");
Expand Down

0 comments on commit e9a0646

Please sign in to comment.