diff --git a/erpnext/hr/doctype/salary_component/salary_component.py b/erpnext/hr/doctype/salary_component/salary_component.py index 35d274cd60..9108f31f9b 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.py +++ b/erpnext/hr/doctype/salary_component/salary_component.py @@ -17,6 +17,5 @@ class SalaryComponent(Document): self.salary_component.split()]).upper() self.salary_component_abbr = self.salary_component_abbr.strip() - - self.salary_component_abbr = append_number_if_name_exists('Salary Component', - self.salary_component_abbr, 'salary_component_abbr', separator='_') \ No newline at end of file + self.salary_component_abbr = append_number_if_name_exists('Salary Component', self.salary_component_abbr, + 'salary_component_abbr', separator='_', filters={"name": ["!=", self.name]}) \ No newline at end of file