From c092c88dd79b06d4aa6fc2409fba2ef03c29c212 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Dec 2020 13:48:28 +0100 Subject: [PATCH] Fix warning --- htdocs/fourn/class/fournisseur.product.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index da301f7e4f6..91a9f53de18 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -280,6 +280,8 @@ class ProductFournisseur extends Product } // Multicurrency + $multicurrency_buyprice = null; + $multicurrency_unitBuyPrice = null; if (!empty($conf->multicurrency->enabled)) { if (empty($multicurrency_tx)) $multicurrency_tx = 1; if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0; @@ -301,6 +303,7 @@ class ProductFournisseur extends Product $charges = price2num($charges, 'MU'); $qty = price2num($qty, 'MS'); $unitBuyPrice = price2num($buyprice / $qty, 'MU'); + $packaging = price2num(((empty($this->packaging) || $this->packaging < $qty) ? $qty : $this->packaging), 'MS'); $error = 0; @@ -314,8 +317,7 @@ class ProductFournisseur extends Product $localtax1 = $localtaxes_array['1']; $localtaxtype2 = $localtaxes_array['2']; $localtax2 = $localtaxes_array['3']; - } else // old method. deprecated because ot can't retrieve type - { + } else { // old method. deprecated because ot can't retrieve type $localtaxtype1 = '0'; $localtax1 = get_localtax($newvat, 1); $localtaxtype2 = '0';