Skip to content

Commit

Permalink
Merge pull request #1971 from frappe/mergify/bp/version-14-hotfix/pr-…
Browse files Browse the repository at this point in the history
…1966

feat(Salary Payments via ECS): add Net Pay column (backport #1966)
  • Loading branch information
krantheman authored Jul 15, 2024
2 parents 5e24717 + fb7b283 commit d6938b6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ def get_columns(filters):
"options": "currency",
"width": 140,
},
{
"label": _("Net Pay"),
"fieldname": "net_pay",
"fieldtype": "Currency",
"options": "currency",
"width": 140,
},
{"label": _("Bank"), "fieldname": "bank", "fieldtype": "Data", "width": 140},
{"label": _("Account No"), "fieldname": "account_no", "fieldtype": "Data", "width": 140},
]
Expand Down Expand Up @@ -104,7 +111,7 @@ def get_data(filters):
conditions = get_conditions(filters)

entry = frappe.db.sql(
""" select employee, employee_name, gross_pay
""" select employee, employee_name, gross_pay, net_pay
from `tabSalary Slip`
where docstatus = 1 %s """
% (conditions),
Expand All @@ -117,6 +124,7 @@ def get_data(filters):
"employee_name": d.employee_name,
"employee": d.employee,
"gross_pay": d.gross_pay,
"net_pay": d.net_pay,
}

if employee_data_dict.get(d.employee).get("salary_mode") == "Bank":
Expand Down

0 comments on commit d6938b6

Please sign in to comment.