From: Joe Date: Sat, 1 Apr 2023 12:29:21 +0000 (+0200) Subject: Bug 5687: Unable to dispatch SO for service items with u/m decimal places set as... X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=97122b2b71989c3d2ec2fefd1f4ded105dbbf225 Bug 5687: Unable to dispatch SO for service items with u/m decimal places set as "user defined" when SO item qty is less than 5. Fixed. --- diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index 77ec3136..e58eb4a7 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -256,7 +256,9 @@ 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)); + $dec = get_unit_dec($itm->stock_id); + $dec = $dec == -1 ? user_qty_dec() : $dec; + $max = round2($itm->quantity - $itm->qty_done, $dec); } if (check_num('Line'.$line, $min, $max)) { @@ -266,7 +268,6 @@ function check_quantities() set_focus('Line'.$line); $ok = 0; } - } if (isset($_POST['Line'.$line.'Desc'])) {