X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_invoice.php;h=35cdc5baca42e319cd4e6e849c165f9e8b310885;hb=51f9e62242aa3697a2d9350d6d1040d5c647c7a5;hp=f6791c179f1c98bbc5af47fdec8bd9da1339e162;hpb=22cecf450b82a45ee299111d093b1da662806a2d;p=fa-stable.git diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index f6791c17..35cdc5ba 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -203,12 +203,10 @@ function check_quantities() $min = $itm->qty_done; $max = $itm->quantity; } else { - global $path_to_root; $min = 0; - include_once($path_to_root . "/inventory/includes/db/items_units_db.inc"); + // Fixing floating point problem in PHP. $max = round2($itm->quantity - $itm->qty_done, get_unit_dec($itm->stock_id)); } - dump($max); if (check_num('Line'.$line_no, $min, $max)) { $_SESSION['Items']->line_items[$line_no]->qty_dispatched = input_num('Line'.$line_no);