`$this->fk_soc` is empty replace by `$this->socid`
This commit is contained in:
dolibarr95 2017-10-24 09:22:13 +02:00 committed by Laurent Destailleur
parent da93081f47
commit 76aa2df807

View File

@ -1429,7 +1429,7 @@ class CommandeFournisseur extends CommonOrder
// We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok.
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->fk_soc); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->socid); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
if ($result > 0)
{
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice