Skip to content

Commit

Permalink
FIX fournrprice log for insert
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Battarel committed Jul 18, 2019
1 parent f44182c commit 32bc8a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/fourn/class/fournisseur.product.class.php
Expand Up @@ -439,7 +439,7 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn

$resql = $this->db->query($sql);
if ($resql) {
$idinserted = $this->db->last_insert_id(MAIN_DB_PREFIX . "product_fournisseur_price");
$this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX . "product_fournisseur_price");
}
else {
$error++;
Expand All @@ -462,7 +462,7 @@ public function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn

if (empty($error)) {
$this->db->commit();
return $idinserted;
return $this->product_fourn_price_id;
} else {
$this->db->rollback();
return -1;
Expand Down

0 comments on commit 32bc8a5

Please sign in to comment.