From 7df09b6e9eac9d04451a47b1bce044d20dfa87d6 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:41:36 +0200 Subject: [PATCH] FIX: esupplier order: error 500 when using packaging with product where it is not defined --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 14589374e3d..dbb454ef800 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2707,7 +2707,7 @@ class CommandeFournisseur extends CommonOrder } else { - if (($qty % $this->line->packaging) > 0) + if (! empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { $coeff = intval($qty / $this->line->packaging) + 1; $qty = $this->line->packaging * $coeff;