[fix] Subscription patch (#10827)

This commit is contained in:
rohitwaghchaure 2017-09-18 16:58:05 +05:30 committed by Rohit Waghchaure
parent 850eaa73b0
commit d02744b436

View File

@ -18,7 +18,7 @@ def execute():
make_subscription(doctype, data)
def get_data(doctype):
return frappe.db.sql(""" select name, from_date, end_date, recurring_type,recurring_id
return frappe.db.sql(""" select name, from_date, end_date, recurring_type,recurring_id,
next_date, notify_by_email, notification_email_address, recurring_print_format,
repeat_on_day_of_month, submit_on_creation
from `tab{0}` where is_recurring = 1 and next_date >= %s
@ -39,7 +39,4 @@ def make_subscription(doctype, data):
'submit_on_creation': data.submit_on_creation
}).insert(ignore_permissions=True)
doc.submit()
if not doc.subscription:
frappe.db.set_value(doctype, data.name, "subscription", doc.name)
doc.submit()