From 2142a0ab376f43d0ac3d98a0c6c1d5600dbfa9f6 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Wed, 21 Sep 2016 17:28:42 +0530 Subject: [PATCH] [Fix] Indentation fixed --- erpnext/hr/doctype/salary_slip/salary_slip.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index dbbdf7fab0a..e761450cf7a 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -54,8 +54,8 @@ class SalarySlip(TransactionBase): for key in ('earnings', 'deductions'): for struct_row in self._salary_structure_doc.get(key): amount = self.eval_condition_and_formula(struct_row, data) - if amount: - self.update_component_row(struct_row, amount, key) + if amount: + self.update_component_row(struct_row, amount, key) def update_component_row(self, struct_row, amount, key): @@ -78,16 +78,14 @@ class SalarySlip(TransactionBase): try: if d.condition: if not eval(d.condition, None, data): - return None - + return None amount = d.amount if d.amount_based_on_formula: if d.formula: amount = eval(d.formula, None, data) - data[d.abbr] = amount - return amount + except NameError as err: frappe.throw(_("Name error: {0}".format(err))) except SyntaxError as err: