FIX: Success message when add a product line that has packaging

This commit is contained in:
Mélina JOUM
2025-02-24 17:23:34 +01:00
parent e16b13442f
commit d2387dd8bc
3 changed files with 3 additions and 0 deletions

View File

@@ -1662,6 +1662,7 @@ class Commande extends CommonOrder
$result = $tmpproduct->fetch($fk_product);
if (abs($qty) < $tmpproduct->packaging) {
$qty = (float) $tmpproduct->packaging;
setEventMessages($langs->trans('QtyRecalculatedWithPackaging'), null, 'mesgs');
} else {
if (!empty($tmpproduct->packaging) && $qty > $tmpproduct->packaging) {
$coeff = intval(abs($qty) / $tmpproduct->packaging) + 1;