projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A couple of small bugs in customer and supplier balances report fixed.
[fa-stable.git]
/
sales
/
customer_delivery.php
diff --git
a/sales/customer_delivery.php
b/sales/customer_delivery.php
index c7e051e1bab3c43962a3c1ae33e8df3dc1e0979a..eb78f62e295731f6ec2dd3ad37e051e078709400 100644
(file)
--- a/
sales/customer_delivery.php
+++ b/
sales/customer_delivery.php
@@
-95,6
+95,9
@@
if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) {
die ("<br><b>" . _("This order has no items. There is nothing to delivery.") . "</b>");
}
die ("<br><b>" . _("This order has no items. There is nothing to delivery.") . "</b>");
}
+ // Adjust Shipping Charge based upon previous deliveries TAM
+ adjust_shipping_charge($ord, $_GET['OrderNumber']);
+
$_SESSION['Items'] = $ord;
copy_from_cart();
$_SESSION['Items'] = $ord;
copy_from_cart();
@@
-164,12
+167,6
@@
function check_data()
set_focus('ref');
return false;
}
set_focus('ref');
return false;
}
-
- if ($_SESSION['Items']->trans_no==0 && !is_new_reference($_POST['ref'], ST_CUSTDELIVERY)) {
- display_error(_("The entered reference is already in use."));
- set_focus('ref');
- return false;
- }
}
if ($_POST['ChargeFreightCost'] == "") {
$_POST['ChargeFreightCost'] = price_format(0);
}
if ($_POST['ChargeFreightCost'] == "") {
$_POST['ChargeFreightCost'] = price_format(0);
@@
-298,7
+295,6
@@
function check_qoh()
//------------------------------------------------------------------------------
if (isset($_POST['process_delivery']) && check_data() && check_qoh()) {
//------------------------------------------------------------------------------
if (isset($_POST['process_delivery']) && check_data() && check_qoh()) {
-
$dn = &$_SESSION['Items'];
if ($_POST['bo_policy']) {
$dn = &$_SESSION['Items'];
if ($_POST['bo_policy']) {
@@
-311,13
+307,20
@@
if (isset($_POST['process_delivery']) && check_data() && check_qoh()) {
copy_to_cart();
if ($newdelivery) new_doc_date($dn->document_date);
$delivery_no = $dn->write($bo_policy);
copy_to_cart();
if ($newdelivery) new_doc_date($dn->document_date);
$delivery_no = $dn->write($bo_policy);
-
- processing_end();
- if ($newdelivery) {
- meta_forward($_SERVER['PHP_SELF'], "AddedID=$delivery_no");
- } else {
- meta_forward($_SERVER['PHP_SELF'], "UpdatedID=$delivery_no");
+ if ($delivery_no == -1)
+ {
+ display_error(_("The entered reference is already in use."));
+ set_focus('ref');
}
}
+ else
+ {
+ processing_end();
+ if ($newdelivery) {
+ meta_forward($_SERVER['PHP_SELF'], "AddedID=$delivery_no");
+ } else {
+ meta_forward($_SERVER['PHP_SELF'], "UpdatedID=$delivery_no");
+ }
+ }
}
if (isset($_POST['Update']) || isset($_POST['_Location_update'])) {
}
if (isset($_POST['Update']) || isset($_POST['_Location_update'])) {