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

feat: Bulk Salary Structure Assignment #1367

Merged

Conversation

krantheman
Copy link
Member

@krantheman krantheman commented Jan 31, 2024

Bulk Salary Structure Assignment

This PR introduces the Bulk Salary Structure Assignment DocType, a replacement and enhancement to the Bulk Salary Structure Assignment Dialog.

The Problem - Bulk Salary Structure Assignment Dialog

image

Issues with the BSSA Dialog include, but are not limited to:

  • Inability to select specific Employees.
  • Inability to set varying Base & Variable amounts for different Employees.
  • Limited filtering options.
  • Prerequisite navigation to a Salary Structure document.
  • Potential loss of progress due to clicking outside.

The Solution - Bulk Salary Structure Assignment DocType

bulk-salary-structure-assignment.mp4

Tackling the aforementioned issues, features of the BSSA DocType include:

  • Ability to select specific Employees.
  • Ability to set varying Base & Variable amounts. This can also be done in bulk via row selection.
  • Addition of the Filter Group component to set complex Employee filters.
  • Ease of navigation and selection of any Salary Structure from within the page.
  • Automatic fetching of Default Base Pay of Employees based on their Grade.
  • Identification of Employees without preexisting Assignments for a specific date.

Miscellaneous

In this PR, I have also:

  • Edited the Create -> Bulk Assignments button in Salary Structure to redirect to the BSSA DocType.
  • Added Bulk Salary Structure Assignment to the Salary Payout workspace and the Salary Structure List View.
  • Commonified the notify_status function by moving it from leave_control_panely.py to utils.py.
  • Commonified the create_employee_grade function by moving it from test_salary_structure.py to test_utils.py.

Documentation

https://frappehr.com/docs/v14/en/salary-structure-assignment-tool

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2024

Codecov Report

Attention: Patch coverage is 79.38144% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 72.85%. Comparing base (cd6b82a) to head (153774a).
Report is 41 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1367      +/-   ##
===========================================
- Coverage    73.06%   72.85%   -0.22%     
===========================================
  Files          201      202       +1     
  Lines        11046    11153     +107     
===========================================
+ Hits          8071     8125      +54     
- Misses        2975     3028      +53     
Files Coverage Δ
...doctype/leave_control_panel/leave_control_panel.py 86.44% <100.00%> (+3.95%) ⬆️
...yroll/doctype/salary_structure/salary_structure.py 80.31% <80.95%> (-1.00%) ⬇️
hrms/hr/utils.py 78.32% <60.00%> (-1.13%) ⬇️
...ure_assignment/bulk_salary_structure_assignment.py 84.31% <84.31%> (ø)

... and 7 files with indirect coverage changes

@ruchamahabal
Copy link
Member

Very clean implementation overall 👏

@krantheman krantheman force-pushed the bulk-salary-structure-assignment branch from 5686d50 to 7f60245 Compare February 29, 2024 10:55
@krantheman krantheman force-pushed the bulk-salary-structure-assignment branch from 7f60245 to 3a9e51a Compare February 29, 2024 10:56
@krantheman krantheman force-pushed the bulk-salary-structure-assignment branch from 2a2efe6 to 82ad53f Compare February 29, 2024 12:18
@ruchamahabal
Copy link
Member

ruchamahabal commented Mar 5, 2024

enqueue function should be accessible outside the class (public function). Also a message to inform the user that its enqueued

image

Can you make this change? Just test it once by enqueuing irrespective of the number. Also lets enqueue if its > 30

@ruchamahabal
Copy link
Member

ERPNext install is failing on develop. Merging this as its unrelated and tests are passing locally

@ruchamahabal ruchamahabal merged commit 5399c76 into frappe:develop Mar 11, 2024
4 of 7 checks passed
@krantheman krantheman deleted the bulk-salary-structure-assignment branch March 11, 2024 08:59
ruchamahabal added a commit that referenced this pull request Mar 11, 2024
…1367

feat: Bulk Salary Structure Assignment (backport #1367)
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