Skip to content

Commit

Permalink
fix: incorrect IFSC codes in bank remittance report (#1538)
Browse files Browse the repository at this point in the history
* fix: faulty ifsc codes in bank remittance report

* refactor(payroll): bank remittance report

* refactor: format bank_remittance.py
  • Loading branch information
vinyselopal authored Mar 26, 2024
1 parent 0443333 commit 2b3904a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions hrms/payroll/report/bank_remittance/bank_remittance.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ def execute(filters=None):
"hidden": 1,
"width": 200,
},
{"label": _("Payment Date"), "fieldtype": "Data", "fieldname": "payment_date", "width": 100},
{
"label": _("Payment Date"),
"fieldtype": "Data",
"fieldname": "payment_date",
"width": 100,
},
{
"label": _("Employee Name"),
"fieldtype": "Link",
Expand Down Expand Up @@ -146,12 +151,10 @@ def get_emp_bank_ifsc_code(salary_slips):
emp_names = [d.employee for d in salary_slips]
ifsc_codes = get_all("Employee", [("name", "IN", emp_names)], ["ifsc_code", "name"])

ifsc_codes_map = {}
for code in ifsc_codes:
ifsc_codes_map[code.name] = code
ifsc_codes_map = {code.name: code.ifsc_code for code in ifsc_codes}

for slip in salary_slips:
slip["ifsc_code"] = ifsc_codes_map[code.name]["ifsc_code"]
slip["ifsc_code"] = ifsc_codes_map[slip.employee]

return salary_slips

Expand Down

0 comments on commit 2b3904a

Please sign in to comment.