projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Crediting an invoice in transactions shows wrong invoice date.
[fa-stable.git]
/
sales
/
includes
/
cart_class.inc
diff --git
a/sales/includes/cart_class.inc
b/sales/includes/cart_class.inc
index 6a014d5aba85425fbc9f5df77e3ef5b0461a165e..4b01809feba94a838edcec70a395ef0c93241c61 100644
(file)
--- a/
sales/includes/cart_class.inc
+++ b/
sales/includes/cart_class.inc
@@
-104,6
+104,9
@@
class cart
$this->trans_type = $type;
$this->reference = $Refs->get_next($this->trans_type);
$this->trans_type = $type;
$this->reference = $Refs->get_next($this->trans_type);
+ if ($type == ST_CUSTCREDIT)
+ $this->src_date = $this->document_date;
+
$this->document_date = new_doc_date();
for($line_no = 0; $line_no < count($this->line_items); $line_no++) {
$this->document_date = new_doc_date();
for($line_no = 0; $line_no < count($this->line_items); $line_no++) {
@@
-124,9
+127,6
@@
class cart
$this->due_date = get_invoice_duedate($this->payment, $this->document_date);
}
$this->due_date = get_invoice_duedate($this->payment, $this->document_date);
}
- if ($type == ST_CUSTCREDIT)
- $this->src_date = $this->document_date;
-
$this->src_docs = $this->trans_no;
$this->trans_no = 0;
}
$this->src_docs = $this->trans_no;
$this->trans_no = 0;
}