billing period in recurring sales invoice mail

This commit is contained in:
Nabin Hait 2012-03-20 17:39:48 +05:30
parent ceb9f41f15
commit 39c26f4580

View File

@ -560,10 +560,10 @@ def send_notification(new_rv):
<table cellspacing= "5" cellpadding="5" width = "100%%">
<tr>
<td width = "50%%"><b>Customer</b><br>%s<br>%s</td>
<td width = "50%%">Invoice Date: %s<br>Due Date: %s</td>
<td width = "50%%">Invoice Date: %s<br>Period: %s to %s <br>Due Date: %s</td>
</tr>
</table>
''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, new_rv.doc.posting_date, new_rv.doc.due_date)
''' % (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)
tbl = '''<table border="1px solid #CCC" width="100%%" cellpadding="0px" cellspacing="0px">
@ -603,6 +603,7 @@ def send_notification(new_rv):
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]])