fix rounding
This commit is contained in:
parent
7a5a6a14f0
commit
94d57cd462
@ -1729,11 +1729,11 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
{
|
{
|
||||||
$coeff = intval($qty / $prod->packaging) + 1;
|
$coeff = intval($qty / $prod->packaging) + 1;
|
||||||
$qty = $prod->packaging * $coeff;
|
$qty = $prod->packaging * $coeff;
|
||||||
|
}
|
||||||
|
}
|
||||||
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
|
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$product_type = $type;
|
$product_type = $type;
|
||||||
|
|||||||
@ -274,7 +274,7 @@ class ProductFournisseur extends Product
|
|||||||
$charges = price2num($charges, 'MU');
|
$charges = price2num($charges, 'MU');
|
||||||
$qty = price2num($qty, 'MS');
|
$qty = price2num($qty, 'MS');
|
||||||
$unitBuyPrice = price2num($buyprice / $qty, 'MU');
|
$unitBuyPrice = price2num($buyprice / $qty, 'MU');
|
||||||
$packaging = ($this->packaging < $qty) ? $qty : $this->packaging;
|
$packaging = price2num((($this->packaging < $qty) ? $qty : $this->packaging), 'MS');
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user