X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_invoice.php;h=35cdc5baca42e319cd4e6e849c165f9e8b310885;hb=5c2139b6e3be2ddccde4d49dfd937a24656c6e31;hp=3bf5a6bbb7e147e5f0e1d3ccc5723995fe4d2f61;hpb=f7093d7dde32fcccbe14b828ccdcf80bc652d7c3;p=fa-stable.git diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index 3bf5a6bb..35cdc5ba 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -204,7 +204,8 @@ function check_quantities() $max = $itm->quantity; } else { $min = 0; - $max = $itm->quantity - $itm->qty_done; + // Fixing floating point problem in PHP. + $max = round2($itm->quantity - $itm->qty_done, get_unit_dec($itm->stock_id)); } if (check_num('Line'.$line_no, $min, $max)) { $_SESSION['Items']->line_items[$line_no]->qty_dispatched =