Flexible invoice period in recurring invoice
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 87b3264..2f84a9c 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -485,8 +485,8 @@
and notify the concerned people
"""
rv = webnotes.conn.sql("""select name, recurring_id from `tabSales Invoice` where ifnull(convert_into_recurring_invoice, 0) = 1
- and next_date = %s and next_date <= ifnull(end_date, '2199-12-31') and docstatus=1""", nowdate(), debug=1)
- msgprint(rv)
+ and next_date = %s and next_date <= ifnull(end_date, '2199-12-31') and docstatus=1""", nowdate())
+
for d in rv:
if not webnotes.conn.sql("""select name from `tabSales Invoice` where posting_date = %s and recurring_id = %s and docstatus=1""", (nowdate(), d[1])):
prev_rv = get_obj('Sales Invoice', d[0], with_children=1)
@@ -587,6 +587,5 @@
msg = hd + tbl + totals
- msgprint(msg)
from webnotes.utils.email_lib import sendmail
sendmail(new_rv.doc.notification_email_address.split(", "), subject=subject, msg = msg)
\ No newline at end of file