mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
fix: loan deduction during creation of bank entry in payroll (#20194)
This commit is contained in:
committed by
Nabin Hait
parent
cf261d0788
commit
13c29aeec4
@@ -329,6 +329,10 @@ class PayrollEntry(Document):
|
|||||||
statistical_component = frappe.db.get_value("Salary Component", sal_detail.salary_component, 'statistical_component')
|
statistical_component = frappe.db.get_value("Salary Component", sal_detail.salary_component, 'statistical_component')
|
||||||
if statistical_component != 1:
|
if statistical_component != 1:
|
||||||
salary_slip_total -= sal_detail.amount
|
salary_slip_total -= sal_detail.amount
|
||||||
|
|
||||||
|
#loan deduction from bank entry during payroll
|
||||||
|
salary_slip_total -= salary_slip.total_loan_repayment
|
||||||
|
|
||||||
if salary_slip_total > 0:
|
if salary_slip_total > 0:
|
||||||
self.create_journal_entry(salary_slip_total, "salary")
|
self.create_journal_entry(salary_slip_total, "salary")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user