Salary Register Query Report Improve

Hi All,
Sharing a small improve on this Salary Register report … due to the long fields or empty and sometimes not formatted i have made those modifications … free to add on the future fixes or addons

On the salary_register.html modified the if i > 3 with {% if (!isNaN(row[fieldname])) { %}
This way it will check if the fieldname is a Number and format it.

While on i have -1 for columns that might not have values when printing … so i have change to
columns = [
(“Salary Slip ID”) + “:Link/Salary Slip:150”,(“Employee”) + “:Link/Employee:120”, _(“Employee Name”) + “::140”, _(“Branch”) + “:Link/Branch:-1”,
_(“Department”) + “:Link/Department:-1”, _(“Designation”) + “:Link/Designation:-1”,
_(“Company”) + “:Link/Company:120”, _(“Start Date”) + “::80”, _(“End Date”) + “::80”, _(“Leave Without Pay”) + “:Float:-1”,
_(“Payment Days”) + “:Float:120”

And on the DEF Execute insde the For loop
if not ss.branch == None:columns[3] = columns[3].replace(’-1’,‘120’)
if not ss.department == None: columns[4] = columns[4].replace(’-1’,‘120’)
if not ss.designation == None: columns[5] = columns[5].replace(’-1’,‘120’)
if not ss.leave_withut_pay == None: columns[9] = columns[9].replace(’-1’,‘130’)

This way you can hide fields which are empty and format all fields.