From 5f0406129125ae538d88f98f4c3bbdc842b4e161 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 21 Mar 2012 11:47:00 +0530 Subject: [PATCH] changes in recurring invoice print format --- erpnext/accounts/doctype/gl_control/gl_control.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py index 21b768024e..fa98441258 100644 --- a/erpnext/accounts/doctype/gl_control/gl_control.py +++ b/erpnext/accounts/doctype/gl_control/gl_control.py @@ -560,10 +560,12 @@ def send_notification(new_rv): - +
Customer
%s
%s
Invoice Date: %s
Period: %s to %s
Due Date: %s
Invoice Date : %s
Invoice Period : %s to %s
Due Date : %s
- ''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, new_rv.doc.posting_date, add_days(add_months(new_rv.doc.posting_date, -1), 1), new_rv.doc.posting_date, new_rv.doc.due_date) + ''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \ + getdate(add_days(add_months(new_rv.doc.posting_date, -1), 1)).strftime("%d-%m-%Y"), getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"),\ + getdate(new_rv.doc.due_date).strftime("%d-%m-%Y")) tbl = ''' @@ -596,14 +598,13 @@ def send_notification(new_rv):
- Terms: + Terms and Conditions: %s - ''' % (new_rv.doc.net_total, new_rv.doc.total_tax,new_rv.doc.grand_total, new_rv.doc.in_words,new_rv.doc.terms) + ''' % (new_rv.doc.net_total, new_rv.doc.other_charges_total,new_rv.doc.grand_total, new_rv.doc.in_words,new_rv.doc.terms) msg = hd + tbl + totals - msgprint(msg) from webnotes.utils.email_lib import sendmail - #sendmail(recipients = new_rv.doc.notification_email_address.split(", "), \ - # sender=new_rv.doc.owner, subject=subject, parts=[['text/plain', msg]]) + sendmail(recipients = new_rv.doc.notification_email_address.split(", "), \ + sender=new_rv.doc.owner, subject=subject, parts=[['text/plain', msg]])