Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create recurring Additional salary for new recurring period #2578

Open
1 task done
ahmadpak opened this issue Jan 4, 2025 · 0 comments
Open
1 task done

Cannot create recurring Additional salary for new recurring period #2578

ahmadpak opened this issue Jan 4, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ahmadpak
Copy link

ahmadpak commented Jan 4, 2025

Information about bug

While trying to create recurring additional salary the system is given error for a duplicate entry. On investagating there is no duplicate entry in the specified period

image

Module

Payroll

Version

frappe 15.50.1 version-15
erpnext 15.46.1 version-15
hrms 15.33.4 version-15
lending 0.0.1 version-15
payments 0.0.1 version-15

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

hook.js:608 Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 50, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1726, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 342, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 364, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 295, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1103, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 974, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1334, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1316, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 971, in fn
    return method_object(*args, **kwargs)
  File "apps/hrms/hrms/payroll/doctype/additional_salary/additional_salary.py", line 28, in validate
    self.validate_duplicate_additional_salary()
  File "apps/hrms/hrms/payroll/doctype/additional_salary/additional_salary.py", line 140, in validate_duplicate_additional_salary
    frappe.throw(msg, title=_("Duplicate Overwritten Salary"))
  File "apps/frappe/frappe/__init__.py", line 603, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 568, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 519, in _raise_exception
    raise exc
frappe.exceptions.ValidationError: Additional Salary for this salary component with Overwrite Salary Structure Amount enabled already exists for this dateReference: HR-ADS-23-10-00001

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant