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:
commit
bbd930184c
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user