From: Joe Date: Sat, 15 Apr 2023 09:27:08 +0000 (+0200) Subject: Changed get_unic_dec to get_qty_dec for eliminating return -1. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=0edc4dc9944f49ac9526fa9674f4cfe7bbff370c Changed get_unic_dec to get_qty_dec for eliminating return -1. --- diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index e58eb4a7..c160d6d8 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -256,9 +256,7 @@ function check_quantities() } else { $min = 0; // Fixing floating point problem in PHP. - $dec = get_unit_dec($itm->stock_id); - $dec = $dec == -1 ? user_qty_dec() : $dec; - $max = round2($itm->quantity - $itm->qty_done, $dec); + $max = round2($itm->quantity - $itm->qty_done, get_qty_dec($itm->stock_id)); } if (check_num('Line'.$line, $min, $max)) { diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index 35cdc5ba..e6ded2d3 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -205,7 +205,7 @@ function check_quantities() } else { $min = 0; // Fixing floating point problem in PHP. - $max = round2($itm->quantity - $itm->qty_done, get_unit_dec($itm->stock_id)); + $max = round2($itm->quantity - $itm->qty_done, get_qty_dec($itm->stock_id)); } if (check_num('Line'.$line_no, $min, $max)) { $_SESSION['Items']->line_items[$line_no]->qty_dispatched =