diff --git a/erpnext/hr/report/salary_register/salary_register.html b/erpnext/hr/report/salary_register/salary_register.html
index d7bf6a78bc..4c7e1d1d3a 100644
--- a/erpnext/hr/report/salary_register/salary_register.html
+++ b/erpnext/hr/report/salary_register/salary_register.html
@@ -12,21 +12,21 @@
{% } %}
-
+
{% for(var j=0, k=data.length; j
{% for(var i=1, l=report.columns.length; i
{% var fieldname = report.columns[i].field; %}
- {% if (i > 10) { %}
- {%= format_currency(row[fieldname]) %}
- {% } else { %}
- {% if (!is_null(row[fieldname])) { %}
- {%= row[fieldname] %}
- {% } %}
+ {% if (report.columns[i].fieldtype=='Currency' && !isNaN(row[fieldname])) { %}
+ {%= format_currency(row[fieldname]) %}
+ {% } else { %}
+ {% if (!is_null(row[fieldname])) { %}
+ {%= row[fieldname] %}
+ {% } %}
{% } %}
{% } %}
diff --git a/erpnext/hr/report/salary_register/salary_register.py b/erpnext/hr/report/salary_register/salary_register.py
index 88f6f470b1..8b93182d34 100644
--- a/erpnext/hr/report/salary_register/salary_register.py
+++ b/erpnext/hr/report/salary_register/salary_register.py
@@ -19,6 +19,12 @@ def execute(filters=None):
row = [ss.name, ss.employee, ss.employee_name, ss.branch, ss.department, ss.designation,
ss.company, ss.start_date, ss.end_date, ss.leave_withut_pay, ss.payment_days]
+ 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')
+
+
for e in earning_types:
row.append(ss_earning_map.get(ss.name, {}).get(e))
@@ -34,12 +40,20 @@ def execute(filters=None):
return columns, data
def get_columns(salary_slips):
+ """
columns = [
_("Salary Slip ID") + ":Link/Salary Slip:150",_("Employee") + ":Link/Employee:120", _("Employee Name") + "::140", _("Branch") + ":Link/Branch:120",
_("Department") + ":Link/Department:120", _("Designation") + ":Link/Designation:120",
_("Company") + ":Link/Company:120", _("Start Date") + "::80", _("End Date") + "::80", _("Leave Without Pay") + ":Float:130",
_("Payment Days") + ":Float:120"
]
+ """
+ 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"
+ ]
salary_components = {_("Earning"): [], _("Deduction"): []}