FIX: esupplier order: error 500 when using packaging with product where it is not defined

This commit is contained in:
Marc de Lima Lucio 2021-04-07 10:41:36 +02:00
parent a0e423f1b8
commit 7df09b6e9e

View File

@ -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;