Skip to content

Commit

Permalink
Try to fix #7692
Browse files Browse the repository at this point in the history
`$this->fk_soc` is empty replace by `$this->socid`
  • Loading branch information
dolibarr95 authored and eldy committed Oct 24, 2017
1 parent da93081 commit 76aa2df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -1429,7 +1429,7 @@ public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocalt

// 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
Expand Down

0 comments on commit 76aa2df

Please sign in to comment.