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): amount gets overwritten by salary component amount even if mapped from a reference document #2420

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

asmitahase
Copy link
Contributor

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

…t after selecting it, only if reference doctype is not set
@ruchamahabal ruchamahabal changed the title fix: additional salary amount is overwritten by salary component amount after selecting it, only if reference doctype is not set fix(Additional Salary): amount gets overwritten by salary component amount even if mapped from a reference document Nov 19, 2024
@ruchamahabal ruchamahabal merged commit a53a9a7 into frappe:develop Nov 19, 2024
9 checks passed
mergify bot pushed a commit that referenced this pull request Nov 19, 2024
…mount even if mapped from a reference document (#2420)

(cherry picked from commit a53a9a7)

# Conflicts:
#	hrms/payroll/doctype/additional_salary/additional_salary.json
ruchamahabal pushed a commit that referenced this pull request Nov 19, 2024
…onent amount (backport #2420) (#2429)

Co-authored-by: Asmita Hase <[email protected]>
Co-authored-by: Rucha Mahabal <[email protected]>
fix(Additional Salary): amount gets overwritten by salary component amount even if mapped from a reference document (#2420)
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))
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.

2 participants