Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Create Salary Slips not working with more than 30 employees

I am trying to run a payroll entry in ERPNext: v13.3.0 (version-13) & Frappe Framework: v13.3.0 (version-13) and all is working just fine except when employees are more that 30 I get the following traceback error
Traceback (most recent call last):
File “/home/erp/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 100, in execute_job
method(**kwargs)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/payroll_entry/payroll_entry.py”, line 578, in create_salary_slips_for_employees
ss.insert()
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 237, in insert
self.run_before_save_methods()
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 960, in run_before_save_methods
self.run_method(“validate”)
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 858, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 1147, in composer
return composed(self, method, *args, **kwargs)
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 1130, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 852, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 49, in validate
self.get_emp_and_working_day_details()
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 169, in get_emp_and_working_day_details
self.pull_sal_struct()
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 222, in pull_sal_struct
make_salary_slip(self.salary_structure_doc.name, self)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_structure/salary_structure.py”, line 181, in make_salary_slip
doc = get_mapped_doc(“Salary Structure”, source_name, {
File “/home/erp/frappe-bench/apps/frappe/frappe/model/mapper.py”, line 127, in get_mapped_doc
postprocess(source_doc, target_doc)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_structure/salary_structure.py”, line 179, in postprocess
target.run_method(‘process_salary_structure’, for_preview=for_preview)
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 858, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 1147, in composer
return composed(self, method, *args, **kwargs)
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 1130, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erp/frappe-bench/apps/frappe/frappe/model/document.py”, line 852, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 1115, in process_salary_structure
self.calculate_net_pay()
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 455, in calculate_net_pay
self.calculate_component_amounts(“deductions”)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 479, in calculate_component_amounts
self.add_additional_salary_components(component_type)
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/salary_slip/salary_slip.py”, line 565, in add_additional_salary_components
additional_salaries = get_additional_salaries(self.employee,
File “/home/erp/frappe-bench/apps/erpnext/erpnext/payroll/doctype/additional_salary/additional_salary.py”, line 141, in get_additional_salaries
frappe.throw(
(“Multiple Additional Salaries with overwrite property exist for Salary Component {0} between {1} and {2}.”).format(
File “/home/erp/frappe-bench/apps/frappe/frappe/init.py”, line 427, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/erp/frappe-bench/apps/frappe/frappe/init.py”, line 406, in msgprint
_raise_exception()
File “/home/erp/frappe-bench/apps/frappe/frappe/init.py”, line 360, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Multiple Additional Salaries with overwrite property exist for Salary Component Surcharge between 2021-04-16 and 2021-05-15.

I have tried getting rid of overwrite property from all Additional Salaries but I can’t seem to have it working. Though after removing the overwrite property, the error doesn’t show up again. I have also increased nginx timeout period but nothing does seem to work. Any workaround is highly appreciated.