From a1a51ce1a6b6ab2415078eb94d5b19b66b8e16ed Mon Sep 17 00:00:00 2001 From: Labeeb Mattra Date: Thu, 30 Jun 2022 13:58:13 +0530 Subject: [PATCH] Add ref no to balance adjustment remarks --- .../loan_balance_adjustment/loan_balance_adjustment.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/loan_management/doctype/loan_balance_adjustment/loan_balance_adjustment.py b/erpnext/loan_management/doctype/loan_balance_adjustment/loan_balance_adjustment.py index 69ab6468be..a582cfecc4 100644 --- a/erpnext/loan_management/doctype/loan_balance_adjustment/loan_balance_adjustment.py +++ b/erpnext/loan_management/doctype/loan_balance_adjustment/loan_balance_adjustment.py @@ -100,13 +100,18 @@ class LoanBalanceAdjustment(AccountsController): gle_map = [] loan_account = frappe.db.get_value("Loan", self.loan, "loan_account") + remarks = "{} against loan {}".format( + self.adjustment_type.capitalize(), self.loan + ) + if self.reference_number: + remarks += "with reference no. {}".format(self.reference_number) loan_entry = { "account": loan_account, "against": self.adjustment_account, "against_voucher_type": "Loan", "against_voucher": self.loan, - "remarks": _("{} against loan:".format(self.adjustment_type)) + self.loan, + "remarks": _(remarks), "cost_center": self.cost_center, "party_type": self.applicant_type, "party": self.applicant, @@ -117,7 +122,7 @@ class LoanBalanceAdjustment(AccountsController): "against": loan_account, "against_voucher_type": "Loan", "against_voucher": self.loan, - "remarks": _("{} against loan:".format(self.adjustment_type)) + self.loan, + "remarks": _(remarks), "cost_center": self.cost_center, "posting_date": self.posting_date, }