From 67910db532a657fc98686574ac5d64387da5bca4 Mon Sep 17 00:00:00 2001 From: atm-florian Date: Thu, 23 Dec 2021 19:00:39 +0100 Subject: [PATCH] FIX: discounts are applied both when fetching the best supplier price and when displaying it cf. PR #18873 commit 2be2423dee0136679c95641f2db4a0fa9805dbaf --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 230c794b038..fe59b1d915d 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -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"];