FIX: dont lose supplier ref if no supplier price in database

This commit is contained in:
altatof 2017-04-07 12:06:15 +02:00
parent 983efdd6ee
commit a6ec22d7fe

View File

@ -1373,7 +1373,7 @@ class CommandeFournisseur extends CommonOrder
if ($result > 0)
{
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
$ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice
$fourn_ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice
}
if ($result == 0) // If result == 0, we failed to found the supplier reference price
{
@ -1457,7 +1457,7 @@ class CommandeFournisseur extends CommonOrder
$sql.= ", '".$localtax1_type."',";
$sql.= " '".$localtax2_type."'";
$sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$ref."',";
$sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$fourn_ref."',";
$sql.= "'".price2num($total_ht)."',";
$sql.= "'".price2num($total_tva)."',";
$sql.= "'".price2num($total_localtax1)."',";