mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
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):
|
def make_gl_entries(self, cancel=0, adv_adj=0):
|
||||||
gle_map = []
|
gle_map = []
|
||||||
|
|
||||||
if self.shortfall_amount and self.amount_paid > self.shortfall_amount:
|
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}.\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
|
self.shortfall_amount, self.against_loan
|
||||||
)
|
)
|
||||||
elif self.shortfall_amount:
|
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:
|
else:
|
||||||
|
<<<<<<< HEAD
|
||||||
remarks = _("Repayment against Loan: ") + self.against_loan
|
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:
|
if self.repay_from_salary:
|
||||||
payment_account = self.payroll_payable_account
|
payment_account = self.payroll_payable_account
|
||||||
@@ -446,7 +458,7 @@ class LoanRepayment(AccountsController):
|
|||||||
"debit_in_account_currency": self.amount_paid,
|
"debit_in_account_currency": self.amount_paid,
|
||||||
"against_voucher_type": "Loan",
|
"against_voucher_type": "Loan",
|
||||||
"against_voucher": self.against_loan,
|
"against_voucher": self.against_loan,
|
||||||
"remarks": remarks,
|
"remarks": _(remarks),
|
||||||
"cost_center": self.cost_center,
|
"cost_center": self.cost_center,
|
||||||
"posting_date": getdate(self.posting_date),
|
"posting_date": getdate(self.posting_date),
|
||||||
}
|
}
|
||||||
@@ -464,7 +476,7 @@ class LoanRepayment(AccountsController):
|
|||||||
"credit_in_account_currency": self.amount_paid,
|
"credit_in_account_currency": self.amount_paid,
|
||||||
"against_voucher_type": "Loan",
|
"against_voucher_type": "Loan",
|
||||||
"against_voucher": self.against_loan,
|
"against_voucher": self.against_loan,
|
||||||
"remarks": remarks,
|
"remarks": _(remarks),
|
||||||
"cost_center": self.cost_center,
|
"cost_center": self.cost_center,
|
||||||
"posting_date": getdate(self.posting_date),
|
"posting_date": getdate(self.posting_date),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user