From be0b090d276dae633821bbd2401bcb227e3b4c96 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 1 Mar 2012 17:31:51 +0530 Subject: [PATCH] voucher date removal issue fixed --- erpnext/accounts/doctype/gl_control/gl_control.py | 1 - .../accounts/doctype/receivable_voucher/receivable_voucher.py | 2 +- .../search_criteria/collection_report/collection_report.py | 4 ++-- .../accounts/search_criteria/payment_report/payment_report.py | 4 ++-- .../search_criteria/variance_report/variance_report.py | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py index c64d64e41f..87f7960aa4 100644 --- a/erpnext/accounts/doctype/gl_control/gl_control.py +++ b/erpnext/accounts/doctype/gl_control/gl_control.py @@ -536,7 +536,6 @@ def create_new_invoice(prev_rv): # update new rv - new_rv.doc.voucher_date = new_rv.doc.next_date new_rv.doc.posting_date = new_rv.doc.next_date new_rv.doc.aging_date = new_rv.doc.next_date new_rv.doc.due_date = add_days(new_rv.doc.next_date, cint(date_diff(prev_rv.doc.due_date, prev_rv.doc.posting_date))) diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py index d09adc2e64..acbd72cce0 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py @@ -533,7 +533,7 @@ class DocType(TransactionBase): self.values.append({ 'item_code' : d.item_code, 'warehouse' : wh, - 'transaction_date' : self.doc.voucher_date, + 'transaction_date' : getdate(self.doc.modified).strftime('%Y-%m-%d'), 'posting_date' : self.doc.posting_date, 'posting_time' : self.doc.posting_time, 'voucher_type' : 'Receivable Voucher', diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.py b/erpnext/accounts/search_criteria/collection_report/collection_report.py index fe0cb57b0c..c0f6e6144c 100644 --- a/erpnext/accounts/search_criteria/collection_report/collection_report.py +++ b/erpnext/accounts/search_criteria/collection_report/collection_report.py @@ -66,7 +66,7 @@ for r in row_list: for r in res: if r[col_idx['Against Receivable']]: - dt=sql("select voucher_date, Aging_date from `tabReceivable Voucher` where name='%s'"%r[col_idx['Against Receivable']]) + dt=sql("select date(modified), Aging_date from `tabReceivable Voucher` where name='%s'"%r[col_idx['Against Receivable']]) r.append('') r.append(dt and cstr(dt[0][0]) or '') r.append(dt and cstr(dt[0][1]) or '') @@ -103,4 +103,4 @@ for r in res: r.append(val_l2) r.append(val_l3) r.append(val_l4) - r.append(val_l5_above) \ No newline at end of file + r.append(val_l5_above) diff --git a/erpnext/accounts/search_criteria/payment_report/payment_report.py b/erpnext/accounts/search_criteria/payment_report/payment_report.py index 8252103c5a..cc025bacf3 100644 --- a/erpnext/accounts/search_criteria/payment_report/payment_report.py +++ b/erpnext/accounts/search_criteria/payment_report/payment_report.py @@ -66,7 +66,7 @@ for r in row_list: for r in res: if r[col_idx['Against Payable']]: - dt=sql("select voucher_date, aging_date from `tabPayable Voucher` where name='%s'"%r[col_idx['Against Payable']]) + dt=sql("select date(modified), aging_date from `tabPayable Voucher` where name='%s'"%r[col_idx['Against Payable']]) r.append('') r.append(dt and cstr(dt[0][0]) or '') r.append(dt and cstr(dt[0][1]) or '') @@ -102,4 +102,4 @@ for r in res: r.append(val_l2) r.append(val_l3) r.append(val_l4) - r.append(val_l5_above) \ No newline at end of file + r.append(val_l5_above) diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.py b/erpnext/selling/search_criteria/variance_report/variance_report.py index e4ebf33ebf..6948eac4ae 100644 --- a/erpnext/selling/search_criteria/variance_report/variance_report.py +++ b/erpnext/selling/search_criteria/variance_report/variance_report.py @@ -60,7 +60,7 @@ elif based_on == 'Sales Partner': if under == 'Receivable Voucher': under_detail = 'RV' - dt = 'voucher_date' + dt = 'posting_date' else: under_detail = under dt = "transaction_date" @@ -516,4 +516,4 @@ for r in res: tot_target = 0 elif tl == 1: - out.append(r) \ No newline at end of file + out.append(r)