From 0bc665c0a557b6e8b30fe5577215e73b1c3f68bd Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Tue, 15 May 2018 19:03:17 +0530 Subject: [PATCH] Salary Copmonent - Default flexible componnent --- erpnext/hr/doctype/salary_component/salary_component.json | 2 +- erpnext/hr/doctype/salary_component/salary_component.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/hr/doctype/salary_component/salary_component.json b/erpnext/hr/doctype/salary_component/salary_component.json index 6764e0ca922..3a9402f0807 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.json +++ b/erpnext/hr/doctype/salary_component/salary_component.json @@ -1001,7 +1001,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-05-16 12:27:03.005070", + "modified": "2018-05-15 18:53:09.115910", "modified_by": "Administrator", "module": "HR", "name": "Salary Component", diff --git a/erpnext/hr/doctype/salary_component/salary_component.py b/erpnext/hr/doctype/salary_component/salary_component.py index be0bf17a095..7a9e52efe25 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.py +++ b/erpnext/hr/doctype/salary_component/salary_component.py @@ -11,16 +11,16 @@ from frappe.model.naming import append_number_if_name_exists class SalaryComponent(Document): def validate(self): self.validate_abbr() - self.validate_flexi_defualt() + self.validate_flexi_default() def validate_flexi_defualt(self): - if self.is_flexible_benefit and self.is_pro_rata_applicable and self.flexi_defualt: + if self.is_flexible_benefit and self.is_pro_rata_applicable and self.flexi_default: salary_component = frappe.db.exists( 'Salary Component', { 'is_flexible_benefit': 1, 'is_pro_rata_applicable': 1, - 'flexi_defualt': 1 + 'flexi_default': 1 } ) if salary_component and salary_component != self.name: