X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_delivery.php;h=df8bad06d9ebd4016d13e8f24174a1cf90420c50;hb=9a98bb3bc7a94f1a8e47f8dab45a87c8b4212080;hp=c7e051e1bab3c43962a3c1ae33e8df3dc1e0979a;hpb=14aa0635fd12ae41e1ddb1d74dc59e48d3b1dc44;p=fa-stable.git
diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php
index c7e051e1..df8bad06 100644
--- a/sales/customer_delivery.php
+++ b/sales/customer_delivery.php
@@ -95,12 +95,16 @@ if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) {
die ("
" . _("This order has no items. There is nothing to delivery.") . "");
}
+ // Adjust Shipping Charge based upon previous deliveries TAM
+ adjust_shipping_charge($ord, $_GET['OrderNumber']);
+
$_SESSION['Items'] = $ord;
copy_from_cart();
} elseif (isset($_GET['ModifyDelivery']) && $_GET['ModifyDelivery'] > 0) {
- $_SESSION['Items'] = new Cart(ST_CUSTDELIVERY, $_GET['ModifyDelivery']);
+ check_is_closed(ST_CUSTDELIVERY, $_GET['ModifyDelivery']);
+ $_SESSION['Items'] = new Cart(ST_CUSTDELIVERY,$_GET['ModifyDelivery']);
if ($_SESSION['Items']->count_items() == 0) {
hyperlink_params($path_to_root . "/sales/inquiry/sales_orders_view.php",
@@ -147,7 +151,7 @@ function check_data()
}
if (!is_date_in_fiscalyear($_POST['DispatchDate'])) {
- display_error(_("The entered date of delivery is not in fiscal year."));
+ display_error(_("The entered date is out of fiscal year or is closed for further data entry."));
set_focus('DispatchDate');
return false;
}
@@ -279,7 +283,7 @@ function check_qoh()
if (!$newdelivery)
{
$delivered = get_already_delivered($itm->stock_id, $_POST['Location'], key($dn->trans_no));
-
+
$qoh_abs = $qoh_abs - $delivered;
$qoh_by_date = $qoh_by_date - $delivered;
}