Update product.class.php

This commit is contained in:
BENKE Charlie 2017-01-31 23:13:58 +01:00 committed by GitHub
parent d84e50d15c
commit 772d862766

View File

@ -1470,7 +1470,7 @@ class Product extends CommonObject
$result = 0;
// We do a first seach with a select by searching with couple prodfournprice and qty only (later we will search on triplet qty/product_id/fourn_ref)
$sql = "SELECT pfp.rowid, pfp.price as price, pfp.quantity as quantity,";
$sql = "SELECT pfp.rowid, pfp.price as price, pfp.quantity as quantity, pfp.remise_percent,";
$sql.= " pfp.fk_product, pfp.ref_fourn, pfp.fk_soc, pfp.tva_tx, pfp.fk_supplier_price_expression";
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
$sql.= " WHERE pfp.rowid = ".$prodfournprice;
@ -1504,6 +1504,7 @@ class Product extends CommonObject
$this->fourn_price_base_type = 'HT'; // Price base type
$this->ref_fourn = $obj->ref_fourn; // deprecated
$this->ref_supplier = $obj->ref_fourn; // Ref supplier
$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
$result=$obj->fk_product;
return $result;
@ -1549,6 +1550,7 @@ class Product extends CommonObject
$this->fourn_price_base_type = 'HT'; // Price base type for a virtual supplier
$this->ref_fourn = $obj->ref_supplier; // deprecated
$this->ref_supplier = $obj->ref_supplier; // Ref supplier
$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
$result=$obj->fk_product;
return $result;