From 2a099dcc1780881571ef06747521f7200e03fcc2 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 26 Sep 2012 12:41:49 +0530 Subject: [PATCH] email digest - ordered accounts by lft and removed padding for each item --- erpnext/setup/doctype/email_digest/email_digest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index a34066c505..421ae64e8c 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -258,7 +258,7 @@ class DocType: def get_html(self, label, currency, value, style=None): """get html output""" - return """

+ return """

%(label)s: %(currency)s%(value)s @@ -293,7 +293,8 @@ class DocType: if not hasattr(self, "accounts"): self.accounts = webnotes.conn.sql("""select name, is_pl_account, debit_or_credit, account_type, account_name, master_type - from `tabAccount` where company=%s and docstatus < 2""", + from `tabAccount` where company=%s and docstatus < 2 + order by lft""", (self.doc.company,), as_dict=1) return self.accounts