fix: Handle for custom field IFSC code in Bank remittance report. (#23905)

* fix: Handel for custom field IFSC code

* fix: changes_requested
This commit is contained in:
Anurag Mishra 2020-11-17 17:52:59 +05:30 committed by GitHub
parent 7aa60d1dea
commit 3271437314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,33 +47,39 @@ def execute(filters=None):
"fieldtype": "Int",
"fieldname": "employee_account_no",
"width": 50
},
{
}
]
if frappe.db.has_column('Employee', 'ifsc_code'):
columns.append({
"label": _("IFSC Code"),
"fieldtype": "Data",
"fieldname": "bank_code",
"width": 100
},
{
"label": _("Currency"),
"fieldtype": "Data",
"fieldname": "currency",
"width": 50
},
{
"label": _("Net Salary Amount"),
"fieldtype": "Currency",
"options": "currency",
"fieldname": "amount",
"width": 100
}
]
})
columns += [{
"label": _("Currency"),
"fieldtype": "Data",
"fieldname": "currency",
"width": 50
},
{
"label": _("Net Salary Amount"),
"fieldtype": "Currency",
"options": "currency",
"fieldname": "amount",
"width": 100
}]
data = []
accounts = get_bank_accounts()
payroll_entries = get_payroll_entries(accounts, filters)
salary_slips = get_salary_slips(payroll_entries)
get_emp_bank_ifsc_code(salary_slips)
if frappe.db.has_column('Employee', 'ifsc_code'):
get_emp_bank_ifsc_code(salary_slips)
for salary in salary_slips:
if salary.bank_name and salary.bank_account_no and salary.debit_acc_no and salary.status in ["Submitted", "Paid"]: