From 27ec8f1e2657bb6dce0a65601e29f6ae46d52930 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 19 Sep 2012 12:00:11 +0530 Subject: [PATCH] pull all entry of bank where clearance date not mentioned in bank reconciliation --- .../doctype/bank_reconciliation/bank_reconciliation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py index 9d3b1f0b4f..03acc0af65 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py @@ -60,7 +60,13 @@ class DocType: self.doc.total_amount += flt(flt(d[4]) - flt(d[3])) def update_details(self): + vouchers = [] for d in getlist(self.doclist, 'entries'): if d.clearance_date: sql("update `tabJournal Voucher` set clearance_date = %s, modified = %s where name=%s", (d.clearance_date, nowdate(), d.voucher_id)) - msgprint("Updated") + vouchers.append(d.voucher_id) + + if vouchers: + msgprint("Clearance Date updated in %s" % vouchers) + else: + msgprint("Clearance Date not mentioned") \ No newline at end of file