Add reference number to repayment remarks
(cherry picked from commit 74dbf8c5d9)
# Conflicts:
# erpnext/loan_management/doctype/loan_repayment/loan_repayment.py
This commit is contained in:
@@ -387,15 +387,27 @@ class LoanRepayment(AccountsController):
|
||||
|
||||
def make_gl_entries(self, cancel=0, adv_adj=0):
|
||||
gle_map = []
|
||||
|
||||
if self.shortfall_amount and self.amount_paid > self.shortfall_amount:
|
||||
<<<<<<< HEAD
|
||||
remarks = _("Shortfall Repayment of {0}.\nRepayment against Loan: {1}").format(
|
||||
=======
|
||||
remarks = "Shortfall repayment of {0}.<br>Repayment against loan {1}".format(
|
||||
>>>>>>> 74dbf8c5d9 (Add reference number to repayment remarks)
|
||||
self.shortfall_amount, self.against_loan
|
||||
)
|
||||
elif self.shortfall_amount:
|
||||
remarks = _("Shortfall Repayment of {0}").format(self.shortfall_amount)
|
||||
remarks = "Shortfall repayment of {0} against loan {1}".format(
|
||||
self.shortfall_amount, self.against_loan
|
||||
)
|
||||
else:
|
||||
<<<<<<< HEAD
|
||||
remarks = _("Repayment against Loan: ") + self.against_loan
|
||||
=======
|
||||
remarks = "Repayment against loan " + self.against_loan
|
||||
|
||||
if self.reference_number:
|
||||
remarks += "with reference no. {}".format(self.reference_number)
|
||||
>>>>>>> 74dbf8c5d9 (Add reference number to repayment remarks)
|
||||
|
||||
if self.repay_from_salary:
|
||||
payment_account = self.payroll_payable_account
|
||||
@@ -446,7 +458,7 @@ class LoanRepayment(AccountsController):
|
||||
"debit_in_account_currency": self.amount_paid,
|
||||
"against_voucher_type": "Loan",
|
||||
"against_voucher": self.against_loan,
|
||||
"remarks": remarks,
|
||||
"remarks": _(remarks),
|
||||
"cost_center": self.cost_center,
|
||||
"posting_date": getdate(self.posting_date),
|
||||
}
|
||||
@@ -464,7 +476,7 @@ class LoanRepayment(AccountsController):
|
||||
"credit_in_account_currency": self.amount_paid,
|
||||
"against_voucher_type": "Loan",
|
||||
"against_voucher": self.against_loan,
|
||||
"remarks": remarks,
|
||||
"remarks": _(remarks),
|
||||
"cost_center": self.cost_center,
|
||||
"posting_date": getdate(self.posting_date),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user