Merge pull request #31273 from ruthra-kumar/ignore_payment_ledger_on_loan_cancelation

fix: ignore payment ledger on cancellation of loan
This commit is contained in:
Deepesh Garg 2022-06-10 10:55:48 +05:30 committed by GitHub
commit bbd930184c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ class Loan(AccountsController):
def on_cancel(self):
self.unlink_loan_security_pledge()
self.ignore_linked_doctypes = ["GL Entry"]
self.ignore_linked_doctypes = ["GL Entry", "Payment Ledger Entry"]
def set_missing_fields(self):
if not self.company:

View File

@ -29,7 +29,7 @@ class LoanDisbursement(AccountsController):
def on_cancel(self):
self.set_status_and_amounts(cancel=1)
self.make_gl_entries(cancel=1)
self.ignore_linked_doctypes = ["GL Entry"]
self.ignore_linked_doctypes = ["GL Entry", "Payment Ledger Entry"]
def set_missing_values(self):
if not self.disbursement_date:

View File

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

View File

@ -41,7 +41,7 @@ class LoanRepayment(AccountsController):
self.check_future_accruals()
self.update_repayment_schedule(cancel=1)
self.mark_as_unpaid()
self.ignore_linked_doctypes = ["GL Entry"]
self.ignore_linked_doctypes = ["GL Entry", "Payment Ledger Entry"]
self.make_gl_entries(cancel=1)
def set_missing_values(self, amounts):

View File

@ -42,7 +42,7 @@ class LoanWriteOff(AccountsController):
def on_cancel(self):
self.update_outstanding_amount(cancel=1)
self.ignore_linked_doctypes = ["GL Entry"]
self.ignore_linked_doctypes = ["GL Entry", "Payment Ledger Entry"]
self.make_gl_entries(cancel=1)
def update_outstanding_amount(self, cancel=0):