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: incorrect amount based on payment days in timesheet salary slip #28845

Merged
merged 6 commits into from
Dec 14, 2021

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Dec 13, 2021

Problem

  1. Create a Salary Structure with "Salary Slip Based on Timesheet" enabled.
  2. Add other components to the structure with "Depends on Payment Days" checked.
  3. Mark the Employee absent for a few days.
  4. Create a Salary Slip. If the Payment Days are less than the Total Days, the system won't calculate amounts based on Payment Days for other components.

Fix

It skips Payment Days calculation for all components when Salary Slip is based on Timesheet. It should only skip payment days calculation for the Timesheet Component and correctly calculate for others.

@ruchamahabal ruchamahabal added the needs-tests This PR needs automated unit-tests. label Dec 14, 2021
@ruchamahabal ruchamahabal removed the needs-tests This PR needs automated unit-tests. label Dec 14, 2021
@codecov
Copy link

codecov bot commented Dec 14, 2021

Codecov Report

Merging #28845 (7ff0aa7) into develop (7fd0610) will increase coverage by 7.35%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #28845      +/-   ##
===========================================
+ Coverage    47.28%   54.63%   +7.35%     
===========================================
  Files         1125     1125              
  Lines        66983    66984       +1     
===========================================
+ Hits         31674    36600    +4926     
+ Misses       35309    30384    -4925     
Impacted Files Coverage Δ
erpnext/payroll/doctype/salary_slip/salary_slip.py 83.73% <100.00%> (+0.02%) ⬆️
erpnext/education/doctype/student/student.py 73.68% <0.00%> (-3.16%) ⬇️
...ion/doctype/course_enrollment/course_enrollment.py 44.00% <0.00%> (-2.00%) ⬇️
...ype/account/chart_of_accounts/chart_of_accounts.py 77.24% <0.00%> (-0.69%) ⬇️
erpnext/controllers/buying_controller.py 86.84% <0.00%> (+0.23%) ⬆️
erpnext/projects/doctype/project/project.py 54.09% <0.00%> (+0.35%) ⬆️
erpnext/accounts/doctype/account/account.py 71.76% <0.00%> (+0.39%) ⬆️
erpnext/controllers/item_variant.py 70.76% <0.00%> (+0.51%) ⬆️
...stock/doctype/purchase_receipt/purchase_receipt.py 90.90% <0.00%> (+0.53%) ⬆️
...rpnext/accounts/doctype/pos_invoice/pos_invoice.py 70.47% <0.00%> (+0.55%) ⬆️
... and 169 more

@ruchamahabal
Copy link
Member Author

Unrelated test case failing. Will fix separately

@ruchamahabal ruchamahabal merged commit b027050 into frappe:develop Dec 14, 2021
@ruchamahabal
Copy link
Member Author

@Mergifyio backport version-13-hotfix version-12-hotfix

mergify bot pushed a commit that referenced this pull request Dec 14, 2021
fix: incorrect amount based on payment days in timesheet salary slip
(cherry picked from commit b027050)
mergify bot pushed a commit that referenced this pull request Dec 14, 2021
fix: incorrect amount based on payment days in timesheet salary slip
(cherry picked from commit b027050)

# Conflicts:
#	erpnext/hr/doctype/salary_slip/salary_slip.py
#	erpnext/payroll/doctype/salary_slip/test_salary_slip.py
#	erpnext/projects/doctype/timesheet/test_timesheet.py
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

backport version-13-hotfix version-12-hotfix

✅ Backports have been created

ruchamahabal added a commit that referenced this pull request Dec 14, 2021
…#28874)

fix: incorrect amount based on payment days in timesheet salary slip
(cherry picked from commit b027050)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
…esheet

fix: incorrect amount based on payment days in timesheet salary slip
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
…esheet

fix: incorrect amount based on payment days in timesheet salary slip
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.

None yet

1 participant