projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[0003780] Sales Invoice to partial delivery was improperly issued as final prepayment...
[fa-stable.git]
/
sales
/
customer_invoice.php
diff --git
a/sales/customer_invoice.php
b/sales/customer_invoice.php
index 6f38b64d718b9ef7f0472af845839c0287a8738f..6a8e82bf041a1674f6f4afb2772613e769892e0a 100644
(file)
--- a/
sales/customer_invoice.php
+++ b/
sales/customer_invoice.php
@@
-342,7
+342,7
@@
function check_data()
return false;
}
} else {
return false;
}
} else {
- if (($_SESSION['Items']->payment_terms['days_before_due']
< 0
) && !count($_SESSION['Items']->prepayments)) {
+ if (($_SESSION['Items']->payment_terms['days_before_due']
== -1
) && !count($_SESSION['Items']->prepayments)) {
display_error(_("There is no non-invoiced payments for this order. If you want to issue final invoice, select delayed or cash payment terms."));
return false;
}
display_error(_("There is no non-invoiced payments for this order. If you want to issue final invoice, select delayed or cash payment terms."));
return false;
}
@@
-355,6
+355,7
@@
function check_data()
if (isset($_POST['process_invoice']) && check_data()) {
$newinvoice= $_SESSION['Items']->trans_no == 0;
copy_to_cart();
if (isset($_POST['process_invoice']) && check_data()) {
$newinvoice= $_SESSION['Items']->trans_no == 0;
copy_to_cart();
+
if ($newinvoice)
new_doc_date($_SESSION['Items']->document_date);
if ($newinvoice)
new_doc_date($_SESSION['Items']->document_date);