Merge branch 'Helkyd-develop' into develop
diff --git a/erpnext/hr/report/salary_register/salary_register.html b/erpnext/hr/report/salary_register/salary_register.html
index d7bf6a7..4c7e1d1 100644
--- a/erpnext/hr/report/salary_register/salary_register.html
+++ b/erpnext/hr/report/salary_register/salary_register.html
@@ -12,21 +12,21 @@
 			{% } %}
 		</tr>
 	</thead>
-    <tbody>
+	<tbody>
 		{% for(var j=0, k=data.length; j<k; j++) { %}
-            {%
+			{%
 				var row = data[j];
 			%}
 			<tr>
 				{% for(var i=1, l=report.columns.length; i<l; i++) { %}
 					<td class="text-right">
 						{% 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] %}
+							{% } %}
 						{% } %}
 					</td>
 				{% } %}
diff --git a/erpnext/hr/report/salary_register/salary_register.py b/erpnext/hr/report/salary_register/salary_register.py
index 88f6f47..8b93182 100644
--- a/erpnext/hr/report/salary_register/salary_register.py
+++ b/erpnext/hr/report/salary_register/salary_register.py
@@ -19,6 +19,12 @@
 		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 @@
 	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"): []}