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

fix(Salary Structure Assignment): validate cost center company on server-side (backport #2445) #2449

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 25, 2024

There is a filter for cost center selection based on company in Salary Structure Assignment already. But that won't work when assignments are created via data import.

This error doesn't get caught until accrual entry for payroll is attempted and it fails silently:

ValidationError: Journal Entry ACC-JV-2024-00060: Cost Center Executives - ADAED does not belong to Company Alchemative DMCC

Add a server-side validation in Salary Structure Assignment itself:

image
This is an automatic backport of pull request #2445 done by [Mergify](https://mergify.com).

…ver-side (#2445)

(cherry picked from commit a3bc4e5)

# Conflicts:
#	hrms/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py
Copy link
Contributor Author

mergify bot commented Nov 25, 2024

Cherry-pick of a3bc4e5 has failed:

On branch mergify/bp/version-14-hotfix/pr-2445
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit a3bc4e585.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@ruchamahabal
Copy link
Member

unrelated test failure

@ruchamahabal ruchamahabal merged commit 51831cb into version-14-hotfix Nov 26, 2024
6 of 7 checks passed
frappe-pr-bot pushed a commit that referenced this pull request Nov 26, 2024
## [14.35.2](v14.35.1...v14.35.2) (2024-11-26)

### Bug Fixes

* filters on vehicle expenses report (backport [#2440](#2440)) ([#2446](#2446)) ([6d35f11](6d35f11))
* ignore linked ledger entry record on employee advance cancellation (backport [#2432](#2432)) ([#2434](#2434)) ([8058d74](8058d74))
* **Salary Structure Assignment:** validate cost center company on server-side (backport [#2445](#2445)) ([#2449](#2449)) ([51831cb](51831cb))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.35.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@ruchamahabal ruchamahabal deleted the mergify/bp/version-14-hotfix/pr-2445 branch November 26, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants