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(Additional Salary): mapped amount gets overwritten by salary component amount (backport #2420) #2429

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 19, 2024

Issue

Amount field in New Additional Salary Doctype gets overwritten by amount field in Salary Component after selecting salary component. This behaviour is ideal except for scenarios like creating a "deduction from salary" from "employee advance"

Before

While creating new additional salary
Screenshot 2024-11-14 at 6 42 03 PM
While creating deduction from salary
Screenshot 2024-11-14 at 6 44 31 PM

After

While creating new additional salary (same as before)
Screenshot 2024-11-14 at 6 48 28 PM
While creating deduction from salary: Deduction amount referencing the employee advance doctype isn't overweritten
Screenshot 2024-11-14 at 6 48 09 PM

Fix

Removed "fetch from" "Salary Component" Setting on amount field in Additional Salary Doctype
Added conditional fetching and setting based on referenced doctype

no-tests


This is an automatic backport of pull request #2420 done by Mergify.

…mount even if mapped from a reference document (#2420)

(cherry picked from commit a53a9a7)

# Conflicts:
#	hrms/payroll/doctype/additional_salary/additional_salary.json
@mergify mergify bot requested a review from ruchamahabal as a code owner November 19, 2024 09:46
@mergify mergify bot added the conflicts label Nov 19, 2024
Copy link
Contributor Author

mergify bot commented Nov 19, 2024

Cherry-pick of a53a9a7 has failed:

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

You are currently cherry-picking commit a53a9a7a3.
  (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)

Changes to be committed:
	modified:   hrms/payroll/doctype/additional_salary/additional_salary.js

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

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 ruchamahabal changed the title fix(Additional Salary): amount gets overwritten by salary component amount even if mapped from a reference document (backport #2420) fix(Additional Salary): mapped amount gets overwritten by salary component amount (backport #2420) Nov 19, 2024
@ruchamahabal ruchamahabal merged commit 072e953 into version-15-hotfix Nov 19, 2024
8 checks passed
frappe-pr-bot pushed a commit that referenced this pull request Nov 20, 2024
## [15.35.2](v15.35.1...v15.35.2) (2024-11-20)

### Bug Fixes

* **Additional Salary:** mapped amount gets overwritten by salary component amount (backport [#2420](#2420)) ([#2429](#2429)) ([072e953](072e953))
* PWA translation in employee checkin and attendance request ([f03c998](f03c998))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 15.35.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants