refactor: Auto Repeat next schedule date function params (#23959)

* refactor: Auto Repeat next schedule date function params

* refactor: Auto Repeat next schedule date function params
This commit is contained in:
Rucha Mahabal 2020-12-16 14:51:42 +05:30 committed by Shivam Mishra
parent ec959bc3b9
commit 7d848b1785

View File

@ -418,8 +418,7 @@ class SalesOrder(SellingController):
def on_recurring(self, reference_doc, auto_repeat_doc):
def _get_delivery_date(ref_doc_delivery_date, red_doc_transaction_date, transaction_date):
delivery_date = get_next_schedule_date(ref_doc_delivery_date,
auto_repeat_doc.frequency, auto_repeat_doc.start_date, cint(auto_repeat_doc.repeat_on_day))
delivery_date = auto_repeat_doc.get_next_schedule_date(schedule_date=ref_doc_delivery_date)
if delivery_date <= transaction_date:
delivery_date_diff = frappe.utils.date_diff(ref_doc_delivery_date, red_doc_transaction_date)