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: Editable Letter Head field in Salary Structure Doctype #2436

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

asmitahase
Copy link
Contributor

@asmitahase asmitahase commented Nov 21, 2024

Issue

Salary Structure doctype has "fetch from" setting to fetch company default letterhead so no other letter head can be set while creating salary structure. The same field value is mapped to salary slip, so for companies where the salary letter head is different from company letter head, the letter head field has to be changed manually while creating salary slip.

Fix

Removed "fetch from company default letter head" setting from Salary Structure and used form script to set the field value instead.

Before

  • Uneditable Letter Head in Salary Structure
Screenshot 2024-11-21 at 7 17 54 PM

After

  • Editable Letter Head in Salary Structure
Screenshot 2024-11-21 at 6 47 51 PM
  • After selecting the employee Letter Head maps to the one set in Salary Structure
Screenshot 2024-11-21 at 6 54 03 PM Screenshot 2024-11-21 at 6 56 16 PM

no-tests

…doctype, to make it editable, set the company defualt letter head using form script instead
@asmitahase asmitahase changed the title fix(Salary Structure): Editable Letter Head field in Salary Structure Doctype fix: Editable Letter Head field in Salary Structure Doctype Nov 21, 2024
@@ -48,7 +48,6 @@
"search_index": 1
},
{
"fetch_from": "company.default_letter_head",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, you can let this be and just enable "fetch if empty". That will let you overwrite the letter head

Also let's enable "Allow on Submit" for this field so that people don't have to cancel the entire structure to edit this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart, shoulda thought of that, done

… if empty" to make the field editable, intead of using form script to set the value
"modified_by": "Administrator",
"module": "Payroll",
"name": "Salary Structure",
"naming_rule": "Set by user",
"owner": "Administrator",
"permissions": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default perms got removed accidentally IG

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they're removed while saving the updated doctype settings, couldn't figure out why, added them back

@ruchamahabal ruchamahabal merged commit 7dd0009 into frappe:develop Nov 22, 2024
7 checks passed
frappe-pr-bot pushed a commit that referenced this pull request Nov 26, 2024
## [15.35.3](v15.35.2...v15.35.3) (2024-11-26)

### Bug Fixes

* Editable Letter Head field in Salary Structure Doctype (backport [#2436](#2436)) ([#2443](#2443)) ([f948a36](f948a36))
* filters on vehicle expenses report (backport [#2440](#2440)) ([#2447](#2447)) ([4e4425c](4e4425c))
* ignore linked ledger entry record on employee advance cancellation (backport [#2432](#2432)) ([#2433](#2433)) ([e1d9514](e1d9514))
* redundant fetching of Interviewers in Interview ([#2441](#2441)) ([62cd631](62cd631))
* **Salary Structure Assignment:** validate cost center company on server-side (backport [#2445](#2445)) ([#2450](#2450)) ([7f5e969](7f5e969))
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