renames set_payment_schedule and removes it from validation

This commit is contained in:
tunde 2017-08-18 21:29:23 +01:00
parent 43870aa8db
commit 4c5efa3dec

View File

@ -44,7 +44,6 @@ class AccountsController(TransactionBase):
self.set_total_in_words() self.set_total_in_words()
if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return: if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return:
self.set_payment_schedule()
self.validate_payment_schedule() self.validate_payment_schedule()
self.validate_due_date() self.validate_due_date()
self.validate_advance_entries() self.validate_advance_entries()
@ -616,7 +615,7 @@ class AccountsController(TransactionBase):
for item in duplicate_list: for item in duplicate_list:
self.remove(item) self.remove(item)
def set_payment_schedule(self): def _set_payment_schedule(self):
if not self.get("payment_schedule"): if not self.get("payment_schedule"):
if self.due_date: if self.due_date:
self.append("payment_schedule", { self.append("payment_schedule", {