mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fix: Reload loan Table in Salary Slip when change Employee (#31525)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com> Co-authored-by: bahaaabed <bahaa.9999.sh@gmail.com> Co-authored-by: newhr1 <104132586+newhr1@users.noreply.github.com>
This commit is contained in:
@@ -1363,9 +1363,8 @@ class SalarySlip(TransactionBase):
|
|||||||
self.total_interest_amount = 0
|
self.total_interest_amount = 0
|
||||||
self.total_principal_amount = 0
|
self.total_principal_amount = 0
|
||||||
|
|
||||||
if not self.get("loans"):
|
self.set("loans", [])
|
||||||
for loan in self.get_loan_details():
|
for loan in self.get_loan_details():
|
||||||
|
|
||||||
amounts = calculate_amounts(loan.name, self.posting_date, "Regular Payment")
|
amounts = calculate_amounts(loan.name, self.posting_date, "Regular Payment")
|
||||||
|
|
||||||
if amounts["interest_amount"] or amounts["payable_principal_amount"]:
|
if amounts["interest_amount"] or amounts["payable_principal_amount"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user