X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_delivery.php;h=c160d6d8725979197778f45b0590ab29f7dba620;hb=26a68fbe32618927202e24d79c8172d5fcf22929;hp=1e29859ea49905f170704b7f19967f9c62c0a4e7;hpb=a9d55e1c13cbd6a6305b9322ec8621a06516f9f3;p=fa-stable.git diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index 1e29859e..c160d6d8 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -62,6 +62,8 @@ if (isset($_GET['AddedID'])) { hyperlink_params("$path_to_root/sales/inquiry/sales_orders_view.php", _("Select Another Order For Dispatch"), "OutstandingOnly=1"); + hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=".ST_CUSTDELIVERY."&trans_no=$dispatch_no"); + display_footer_exit(); } elseif (isset($_GET['UpdatedID'])) { @@ -253,7 +255,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_qty_dec($itm->stock_id)); } if (check_num('Line'.$line, $min, $max)) { @@ -263,7 +266,6 @@ function check_quantities() set_focus('Line'.$line); $ok = 0; } - } if (isset($_POST['Line'.$line.'Desc'])) {