fix rounding

This commit is contained in:
Florian HENRY 2020-12-04 10:03:06 +01:00
parent 7a5a6a14f0
commit 94d57cd462
2 changed files with 2 additions and 2 deletions

View File

@ -1729,9 +1729,9 @@ class CommandeFournisseur extends CommonOrder
{
$coeff = intval($qty / $prod->packaging) + 1;
$qty = $prod->packaging * $coeff;
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
}
}
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
}
}
else

View File

@ -274,7 +274,7 @@ class ProductFournisseur extends Product
$charges = price2num($charges, 'MU');
$qty = price2num($qty, 'MS');
$unitBuyPrice = price2num($buyprice / $qty, 'MU');
$packaging = ($this->packaging < $qty) ? $qty : $this->packaging;
$packaging = price2num((($this->packaging < $qty) ? $qty : $this->packaging), 'MS');
$error = 0;
$now = dol_now();