fix: Ignore GL Entry on cancel

This commit is contained in:
Deepesh Garg 2020-06-07 21:23:55 +05:30
parent 3fed098f16
commit df93589032
2 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ class LoanDisbursement(AccountsController):
def on_cancel(self):
self.make_gl_entries(cancel=1)
self.ignore_linked_doctypes = ['GL Entry']
def set_missing_values(self):
if not self.disbursement_date:

View File

@ -31,6 +31,7 @@ class LoanInterestAccrual(AccountsController):
self.update_is_accrued()
self.make_gl_entries(cancel=1)
self.ignore_linked_doctypes = ['GL Entry']
def update_is_accrued(self):
frappe.db.set_value('Repayment Schedule', self.repayment_schedule_name, 'is_accrued', 0)