projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Additional fixes to hotkey system.
[fa-stable.git]
/
sales
/
customer_delivery.php
diff --git
a/sales/customer_delivery.php
b/sales/customer_delivery.php
index f779333832f128c5133626e7b5820be25bf07224..9d710729de24b5d2e7d2fff09f6ae783d4f38247 100644
(file)
--- a/
sales/customer_delivery.php
+++ b/
sales/customer_delivery.php
@@
-96,7
+96,7
@@
if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) {
$ord->order_no = key($ord->trans_no);
$ord->trans_no = 0;
$ord->reference = references::get_next(13);
$ord->order_no = key($ord->trans_no);
$ord->trans_no = 0;
$ord->reference = references::get_next(13);
- $ord->document_date =
Today
();
+ $ord->document_date =
new_doc_date
();
$_SESSION['Items'] = $ord;
copy_from_cart();
$_SESSION['Items'] = $ord;
copy_from_cart();
@@
-293,6
+293,7
@@
if (isset($_POST['process_delivery']) && check_data() && check_qoh()) {
$newdelivery = ($dn->trans_no == 0);
copy_to_cart();
$newdelivery = ($dn->trans_no == 0);
copy_to_cart();
+ if ($new_delivery) new_doc_date($dn->document_date);
$delivery_no = $dn->write($bo_policy);
processing_end();
$delivery_no = $dn->write($bo_policy);
processing_end();
@@
-350,12
+351,12
@@
shippers_list_cells(null, 'ship_via', $_POST['ship_via']);
// set this up here cuz it's used to calc qoh
if (!isset($_POST['DispatchDate']) || !is_date($_POST['DispatchDate'])) {
// set this up here cuz it's used to calc qoh
if (!isset($_POST['DispatchDate']) || !is_date($_POST['DispatchDate'])) {
- $_POST['DispatchDate'] =
Today
();
+ $_POST['DispatchDate'] =
new_doc_date
();
if (!is_date_in_fiscalyear($_POST['DispatchDate'])) {
$_POST['DispatchDate'] = end_fiscalyear();
}
}
if (!is_date_in_fiscalyear($_POST['DispatchDate'])) {
$_POST['DispatchDate'] = end_fiscalyear();
}
}
-date_cells(_("Date"), 'DispatchDate', '', $_
POST['DispatchDate']
, 0, 0, 0, "class='tableheader2'");
+date_cells(_("Date"), 'DispatchDate', '', $_
SESSION['Items']->trans_no==0
, 0, 0, 0, "class='tableheader2'");
end_row();
end_table();
end_row();
end_table();
@@
-367,7
+368,7
@@
start_table("$table_style width=90%");
if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
$_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['DispatchDate']);
}
if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
$_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['DispatchDate']);
}
-date_row(_("Invoice Dead-line"), 'due_date', '',
$_POST['due_date']
, 0, 0, 0, "class='tableheader2'");
+date_row(_("Invoice Dead-line"), 'due_date', '',
null
, 0, 0, 0, "class='tableheader2'");
end_table();
echo "</td></tr>";
end_table();
echo "</td></tr>";