Annoyance 5683: Allow attachments from most needed post-creation option screens.
[fa-stable.git] / sales / customer_delivery.php
index 603ba1d74220e2c7ebee0c478c79adaa3b984a61..77ec3136c31c04dc7b2aad91f68544fdbb820a78 100644 (file)
@@ -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'])) {
@@ -252,10 +254,8 @@ function check_quantities()
                                $min = $itm->qty_done;
                                $max = $itm->quantity;
                        } else {
-                               global $path_to_root;
                                $min = 0;
                                // Fixing floating point problem in PHP.
-                               include_once($path_to_root . "/inventory/includes/db/items_units_db.inc"); 
                                $max = round2($itm->quantity - $itm->qty_done, get_unit_dec($itm->stock_id));
                        }