FIX: discounts are applied both when fetching the best supplier price and when displaying it

cf. PR #18873
commit 2be2423dee
This commit is contained in:
atm-florian 2021-12-23 19:00:39 +01:00
parent e17ddee559
commit 67910db532

View File

@ -846,7 +846,7 @@ class ProductFournisseur extends Product
$this->fourn_qty = $record["quantity"];
$this->fourn_remise_percent = $record["remise_percent"];
$this->fourn_remise = $record["remise"];
$this->fourn_unitprice = $fourn_unitprice;
$this->fourn_unitprice = !empty($conf->dynamicprices->enabled) ? $fourn_unitprice : $record["unitprice"];
$this->fourn_charges = $record["charges"]; // deprecated
$this->fourn_tva_tx = $record["tva_tx"];
$this->fourn_id = $record["fourn_id"];