From: Joe Hunt Date: Thu, 7 Mar 2013 21:51:57 +0000 (+0100) Subject: Crediting an invoice in transactions shows wrong invoice date. X-Git-Tag: 2.3-final~297^2~1 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=09914b87d1eaf8e59b0fea604e277706bd2c1f06;p=fa-stable.git Crediting an invoice in transactions shows wrong invoice date. --- diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index 6a014d5a..4b01809f 100644 --- 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); + 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++) { @@ -124,9 +127,6 @@ class cart $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; }