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: explicitly check if additional salary is recurring while fetching components for payroll #30489

Merged

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Mar 30, 2022

Steps to Replicate

  1. Create an Additional Salary with Is Recurring checked, set From Date and To Date
  2. Save.
  3. Disable Is Recurring, set Payroll Date field.
  4. Save and Submit.
  5. Now this additional salary component is not supposed to be recurring, but it will still show up in every Salary Slip till "To Date".

Fix

The query that fetches additional salaries in the salary slip only checks if Payroll Date is within the period or both From Date and To Date are within the period. It doesn't explicitly check for Is Recurring checkbox. Modified query to check the same.

@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #30489 (dc3a3c8) into develop (7e719a1) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #30489      +/-   ##
===========================================
+ Coverage    60.88%   60.92%   +0.04%     
===========================================
  Files         1082     1082              
  Lines        69062    69063       +1     
===========================================
+ Hits         42045    42078      +33     
+ Misses       27017    26985      -32     
Impacted Files Coverage Δ
...oll/doctype/additional_salary/additional_salary.py 69.89% <100.00%> (+0.32%) ⬆️
erpnext/accounts/doctype/bank/bank.py 71.42% <0.00%> (-14.29%) ⬇️
...t/accounts/report/sales_register/sales_register.py 72.51% <0.00%> (-7.02%) ⬇️
...saction/incorrect_balance_qty_after_transaction.py 90.69% <0.00%> (-6.98%) ⬇️
...pnext/setup/doctype/sales_partner/sales_partner.py 65.21% <0.00%> (-4.35%) ⬇️
...e/asset_value_adjustment/asset_value_adjustment.py 86.04% <0.00%> (-3.49%) ⬇️
...next/accounts/doctype/bank_account/bank_account.py 77.27% <0.00%> (-2.28%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 61.08% <0.00%> (-2.27%) ⬇️
...pnext/accounts/report/gross_profit/gross_profit.py 81.48% <0.00%> (-0.83%) ⬇️
erpnext/controllers/sales_and_purchase_return.py 85.13% <0.00%> (-0.75%) ⬇️
... and 26 more

@ruchamahabal ruchamahabal merged commit 9ff1904 into frappe:develop Mar 30, 2022
@ruchamahabal ruchamahabal deleted the fix-additional-salary-linking branch March 30, 2022 09:17
mergify bot pushed a commit that referenced this pull request Mar 30, 2022
…g components for payroll (#30489)

(cherry picked from commit 9ff1904)
ruchamahabal added a commit that referenced this pull request Mar 30, 2022
…g components for payroll (backport #30489) (#30491)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant