From 94a18109d7690b8756995aadfd70e36ee0159495 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 22 Dec 2011 17:34:11 +0530 Subject: [PATCH] Fixed issue: If account of type "Bank or Cash" is not associated to any GL Entry, then it displays an alert in the email digest email body --- erpnext/setup/doctype/email_digest/email_digest.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 62b1e3e2e41..3498a7f55f3 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -660,12 +660,19 @@ class DocType: if self.doc.fields[k]: if k in result: table_list.append(body_dict[k]['table']) - elif k in ['collections', 'payments', 'bank_balance']: + elif k in ['collections', 'payments']: table_list.append(\ "
[" + \ k.capitalize() + \ - "]
Missing: Ledger of type 'Bank or Cash'\ + "]
Missing: Account of type 'Bank or Cash'\
") + elif k=='bank_balance': + table_list.append(\ + "
[" + \ + "Bank Balance" + \ + "]
Alert: GL Entry not found for Account of type 'Bank or Cash'\ +
") + i = 0 result = []