Skip to content

Commit

Permalink
Update propal.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 authored Jan 29, 2025
1 parent 5a2cb90 commit 4e464b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/comm/propal/class/propal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,9 @@ public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txloca
$product = new Product($this->db);
$result = $product->fetch($fk_product);
if ($qty < $product->packaging) {
$qty = $product->packaging;
$qty = (float) $product->packaging;
} else {
if (!empty($product->packaging) && (fmod((float) $qty, $product->packaging) > 0.000001)) {
if (!empty($product->packaging) && (fmod((float) $qty, (float) $product->packaging) > 0.000001)) {
$coeff = intval((float) $qty / $product->packaging) + 1;
$qty = (float) $product->packaging * $coeff;
setEventMessages($langs->trans('QtyRecalculatedWithPackaging'), null, 'mesgs');
Expand Down

0 comments on commit 4e464b5

Please sign in to comment.