From c91e16dd1e6fe99ec5ce39f749bcca356c9bb9f8 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 6 Jun 2012 11:27:38 +0530 Subject: [PATCH] email_digest updates --- .../doctype/email_digest/email_digest.py | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 734b401d7e..b0f0e9f231 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -461,13 +461,13 @@ class DocType: table_body = "" if isinstance(args['body'], basestring): - return """

%(head)s: %(body)s

""" % args + return """

%(head)s: %(body)s

""" % args else: - return """

%(head)s: """ +\ - "".join(map(lambda b: "

%s

" % b, args['body'])) + return ("""

%(head)s:

""" % args) +\ + "".join(map(lambda b: "

%s

" % b, args['body'])) - currency_amount_str = "%s %s" + currency_amount_str = "%s %s" body_dict = { @@ -552,13 +552,11 @@ class DocType: 'bank_balance': { 'table': result.get('bank_balance') and \ table({ - 'head': 'Bank Balance', - 'body': [ - [ - "%s" \ - % bank['name'], - currency_amount_str % (currency, fmt_money(bank.get('value'))) - ] for bank in (isinstance(result['bank_balance'], list) and \ + 'head': 'Bank / Cash Balance', + 'body': [(bank['name'] + ": " \ + + currency_amount_str % \ + (currency, fmt_money(bank.get('value'))) + '') + for bank in (isinstance(result['bank_balance'], list) and \ result['bank_balance'] or \ [result['bank_balance']]) ]