From 0a0d2ce4133d6bf62bdbbb66a8a77fa95737590f Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 13 Nov 2024 11:43:02 +0530 Subject: [PATCH] fix: Ignore loan adjustment doctype on cancel --- .../loan_management/doctype/loan_repayment/loan_repayment.js | 2 +- .../loan_management/doctype/loan_repayment/loan_repayment.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lending/loan_management/doctype/loan_repayment/loan_repayment.js b/lending/loan_management/doctype/loan_repayment/loan_repayment.js index 1a16a192..1dda36a3 100644 --- a/lending/loan_management/doctype/loan_repayment/loan_repayment.js +++ b/lending/loan_management/doctype/loan_repayment/loan_repayment.js @@ -5,7 +5,7 @@ lending.common.setup_filters("Loan Repayment"); frappe.ui.form.on('Loan Repayment', { setup(frm) { - frm.ignore_doctypes_on_cancel_all = ["Process Loan Classification", "Loan Repayment Repost", + frm.ignore_doctypes_on_cancel_all = ["Process Loan Classification", "Loan Repayment Repost", "Loan Adjustment", "Loan Restructure", "Loan Repayment Schedule", "Sales Invoice", "Loan Demand", "Loan Interest Accrual"]; if (frappe.meta.has_field("Loan Repayment", "repay_from_salary")) { frm.add_fetch("against_loan", "repay_from_salary", "repay_from_salary"); diff --git a/lending/loan_management/doctype/loan_repayment/loan_repayment.py b/lending/loan_management/doctype/loan_repayment/loan_repayment.py index 29f3ebcb..562dae5f 100644 --- a/lending/loan_management/doctype/loan_repayment/loan_repayment.py +++ b/lending/loan_management/doctype/loan_repayment/loan_repayment.py @@ -420,6 +420,7 @@ def on_cancel(self): "Sales Invoice", "Loan Repayment Schedule", "Loan Repayment Repost", + "Loan Adjustment", ] self.make_gl_entries(cancel=1) self.post_suspense_entries(cancel=1)