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: payment days calculation for employees joining/leaving mid-month #30863

Merged
merged 3 commits into from
May 3, 2022

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented May 2, 2022

Incorrect calculation for payment days in Salary Slip when employee joins/leaves mid month. It shouldn't consider DOJ and DOR while excluding days before joining or after relieving in unmarked days. Caught in failing tests

image

  • Cover more cases in tests

@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

Merging #30863 (07274b5) into develop (54d16de) will increase coverage by 1.81%.
The diff coverage is 31.57%.

@@             Coverage Diff             @@
##           develop   #30863      +/-   ##
===========================================
+ Coverage    61.47%   63.29%   +1.81%     
===========================================
  Files         1079      985      -94     
  Lines        69715    67115    -2600     
===========================================
- Hits         42859    42478     -381     
+ Misses       26856    24637    -2219     
Impacted Files Coverage Δ
erpnext/accounts/deferred_revenue.py 75.96% <0.00%> (+0.96%) ⬆️
...ype/bank_statement_import/bank_statement_import.py 0.00% <0.00%> (ø)
...octype/bank_transaction/bank_transaction_upload.py 0.00% <0.00%> (ø)
...next/accounts/doctype/subscription/subscription.py 82.59% <0.00%> (+0.45%) ⬆️
...t/accounts/report/general_ledger/general_ledger.py 67.91% <ø> (+0.68%) ⬆️
...trial_balance_for_party/trial_balance_for_party.py 0.00% <ø> (ø)
...crm/doctype/linkedin_settings/linkedin_settings.py 0.00% <0.00%> (ø)
...crm/doctype/social_media_post/social_media_post.py 0.00% <0.00%> (ø)
erpnext/e_commerce/api.py 73.17% <0.00%> (+1.74%) ⬆️
erpnext/e_commerce/redisearch_utils.py 36.42% <0.00%> (+0.25%) ⬆️
... and 100 more

@ruchamahabal ruchamahabal merged commit 924cf77 into frappe:develop May 3, 2022
@ruchamahabal ruchamahabal deleted the ss-test-fix branch May 3, 2022 05:57
mergify bot pushed a commit that referenced this pull request May 3, 2022
ruchamahabal added a commit that referenced this pull request May 3, 2022
…#30863) (#30883)

(cherry picked from commit 924cf77)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request May 3, 2022
# [13.28.0](v13.27.1...v13.28.0) (2022-05-03)

### Bug Fixes

* Consistent accounting dimensions across Sales and Purchase docs ([5df5058](5df5058))
* convert default_item_manufacturer to link field ([#30835](#30835)) ([#30866](#30866)) ([37fad7e](37fad7e))
* Cost center filter on payment reconciliation ([22e7f03](22e7f03))
* filters not working in Shift Assignment Calendar view ([#30822](#30822)) ([3cdbb65](3cdbb65))
* Ignore custom field validation while setup ([ee54bf7](ee54bf7))
* **india:** e-invoice generation for registered composition gst category type ([#30814](#30814)) ([#30877](#30877)) ([246869d](246869d))
* Multi currency opening invoices ([2e62d51](2e62d51))
* payment days calculation for employees joining/leaving mid-month ([#30863](#30863)) ([#30883](#30883)) ([a1b0813](a1b0813))
* Period Closing Voucher is considering GL entries with is_cancelled=1 ([#30865](#30865)) ([5a5b49b](5a5b49b))
* **pos:** number pad translations ([b01f855](b01f855))
* **pos:** search field doesn't reset on checkout ([edbf551](edbf551))
* Supply type for overseas invoices with payment of tax ([fdcc591](fdcc591))
* supply type for sez invoices with payment of tax ([cf08710](cf08710))
* Use `account_type == 'Stock'` to filter stock accounts ([93482f3](93482f3))
* **UX:** misleading stock entry lables ([#30870](#30870)) ([#30871](#30871)) ([57b03f0](57b03f0))
* **UX:** record reason for skipping attendance or marking absent for auto attendance ([#30846](#30846)) ([f7bf4a3](f7bf4a3))
* Vat Audit report fixes ([d5319a4](d5319a4))

### Features

* Copy task color from project template (backport [#30857](#30857)) ([#30859](#30859)) ([7ee18e8](7ee18e8))
* support product bundles in picklist (backport [#30762](#30762)) ([#30826](#30826)) ([645ee2d](645ee2d))
rootsec1 added a commit to rootsec1/erpnext that referenced this pull request May 4, 2022
* fix: Allow multi-currency opening invoices

* feat: add payment terms status rpr to Selling homepage

* fix: Consistent accounting dimensions across Sales and Purchase docs

* fix: Ignore custom field validation while setup

* chore: Remove domains from Setup

* refactor: Remove education domain from ERPNext

* chore: remove files related to LMS

* chore: clean up hooks

* chore: Remove course links from training doctypes

* chore: Remove references for Assessment Group

* chore: Remove Fees Doctype

* chore: Remove references for Student doctype

* chore: Add patch to delete education doctypes

* chore: Clean up patches

* fix: Multi currency opening invoices

* fix(UX): record reason for skipping attendance or marking absent for auto attendance (frappe#30844)

* fix: Cost center filter on payment reconciliation

* fix(minor): discount accounting patch

* fix(minor): fix create_accounting_dimensions_in_orders.py

* feat: Copy task color from project template (frappe#30857)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

* chore: correct link

* fix: convert default_item_manufacturer to link field (frappe#30835)

* fix(minor): update frappe.error_log to new API (frappe#30864)

* fix(minor): update frappe.error_log to new API

* refactor: changes for updated log_error api

Co-authored-by: Ankush Menat <ankush@frappe.io>

* fix(UX): misleading stock entry lables (frappe#30870)

* fix(UX): misleading stock entry lables

* chore: field labels

[skip ci]

Co-authored-by: Marica <maricadsouza221197@gmail.com>

Co-authored-by: Marica <maricadsouza221197@gmail.com>

* test: Add test for payment reconciliation

* fix: Vat Audit report fixes

(cherry picked from commit d5319a4)

* fix: Supply type for overseas invoices with payment of tax

* fix: supply type for sez invoices with payment of tax

* fix(india): e-invoice generation for registered composition gst category type (frappe#30814)

* fix: supplier quotation comparission report button

* fix: payment days calculation for employees joining/leaving mid-month (frappe#30863)

* chore: Resolve conflicts

* fix: Ignore loan repayments made from salary slip

(cherry picked from commit b7e1d40)

* fix: show group warehouse in Sales Order (frappe#30891)

* fix: Show linked time sheets in sales invoice dashboard

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
Co-authored-by: Rushabh Mehta <rmehta@gmail.com>
Co-authored-by: sersaber <93864988+sersaber@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Saqib Ansari <nextchamp.saqib@gmail.com>
Co-authored-by: maharshivpatel <39730881+maharshivpatel@users.noreply.github.com>
Co-authored-by: Francisco Roldán <franciscoproldan@gmail.com>
deepeshgarg007 pushed a commit to deepeshgarg007/erpnext that referenced this pull request May 13, 2022
# [13.28.0](frappe/erpnext@v13.27.1...v13.28.0) (2022-05-03)

### Bug Fixes

* Consistent accounting dimensions across Sales and Purchase docs ([5df5058](frappe@5df5058))
* convert default_item_manufacturer to link field ([frappe#30835](frappe#30835)) ([frappe#30866](frappe#30866)) ([37fad7e](frappe@37fad7e))
* Cost center filter on payment reconciliation ([22e7f03](frappe@22e7f03))
* filters not working in Shift Assignment Calendar view ([frappe#30822](frappe#30822)) ([3cdbb65](frappe@3cdbb65))
* Ignore custom field validation while setup ([ee54bf7](frappe@ee54bf7))
* **india:** e-invoice generation for registered composition gst category type ([frappe#30814](frappe#30814)) ([frappe#30877](frappe#30877)) ([246869d](frappe@246869d))
* Multi currency opening invoices ([2e62d51](frappe@2e62d51))
* payment days calculation for employees joining/leaving mid-month ([frappe#30863](frappe#30863)) ([frappe#30883](frappe#30883)) ([a1b0813](frappe@a1b0813))
* Period Closing Voucher is considering GL entries with is_cancelled=1 ([frappe#30865](frappe#30865)) ([5a5b49b](frappe@5a5b49b))
* **pos:** number pad translations ([b01f855](frappe@b01f855))
* **pos:** search field doesn't reset on checkout ([edbf551](frappe@edbf551))
* Supply type for overseas invoices with payment of tax ([fdcc591](frappe@fdcc591))
* supply type for sez invoices with payment of tax ([cf08710](frappe@cf08710))
* Use `account_type == 'Stock'` to filter stock accounts ([93482f3](frappe@93482f3))
* **UX:** misleading stock entry lables ([frappe#30870](frappe#30870)) ([frappe#30871](frappe#30871)) ([57b03f0](frappe@57b03f0))
* **UX:** record reason for skipping attendance or marking absent for auto attendance ([frappe#30846](frappe#30846)) ([f7bf4a3](frappe@f7bf4a3))
* Vat Audit report fixes ([d5319a4](frappe@d5319a4))

### Features

* Copy task color from project template (backport [frappe#30857](frappe#30857)) ([frappe#30859](frappe#30859)) ([7ee18e8](frappe@7ee18e8))
* support product bundles in picklist (backport [frappe#30762](frappe#30762)) ([frappe#30826](frappe#30826)) ([645ee2d](frappe@645ee2d))
mergify bot pushed a commit that referenced this pull request May 15, 2022
# [13.28.0](v13.27.1...v13.28.0) (2022-05-03)

### Bug Fixes

* Consistent accounting dimensions across Sales and Purchase docs ([5df5058](5df5058))
* convert default_item_manufacturer to link field ([#30835](#30835)) ([#30866](#30866)) ([37fad7e](37fad7e))
* Cost center filter on payment reconciliation ([22e7f03](22e7f03))
* filters not working in Shift Assignment Calendar view ([#30822](#30822)) ([3cdbb65](3cdbb65))
* Ignore custom field validation while setup ([ee54bf7](ee54bf7))
* **india:** e-invoice generation for registered composition gst category type ([#30814](#30814)) ([#30877](#30877)) ([246869d](246869d))
* Multi currency opening invoices ([2e62d51](2e62d51))
* payment days calculation for employees joining/leaving mid-month ([#30863](#30863)) ([#30883](#30883)) ([a1b0813](a1b0813))
* Period Closing Voucher is considering GL entries with is_cancelled=1 ([#30865](#30865)) ([5a5b49b](5a5b49b))
* **pos:** number pad translations ([b01f855](b01f855))
* **pos:** search field doesn't reset on checkout ([edbf551](edbf551))
* Supply type for overseas invoices with payment of tax ([fdcc591](fdcc591))
* supply type for sez invoices with payment of tax ([cf08710](cf08710))
* Use `account_type == 'Stock'` to filter stock accounts ([93482f3](93482f3))
* **UX:** misleading stock entry lables ([#30870](#30870)) ([#30871](#30871)) ([57b03f0](57b03f0))
* **UX:** record reason for skipping attendance or marking absent for auto attendance ([#30846](#30846)) ([f7bf4a3](f7bf4a3))
* Vat Audit report fixes ([d5319a4](d5319a4))

### Features

* Copy task color from project template (backport [#30857](#30857)) ([#30859](#30859)) ([7ee18e8](7ee18e8))
* support product bundles in picklist (backport [#30762](#30762)) ([#30826](#30826)) ([645ee2d](645ee2d))

(cherry picked from commit 8cc2ea0)

# Conflicts:
#	erpnext/__init__.py
hrwX pushed a commit to hrwX/erpnext that referenced this pull request May 20, 2022
# [13.28.0](frappe/erpnext@v13.27.1...v13.28.0) (2022-05-03)

### Bug Fixes

* Consistent accounting dimensions across Sales and Purchase docs ([5df5058](frappe@5df5058))
* convert default_item_manufacturer to link field ([frappe#30835](frappe#30835)) ([frappe#30866](frappe#30866)) ([37fad7e](frappe@37fad7e))
* Cost center filter on payment reconciliation ([22e7f03](frappe@22e7f03))
* filters not working in Shift Assignment Calendar view ([frappe#30822](frappe#30822)) ([3cdbb65](frappe@3cdbb65))
* Ignore custom field validation while setup ([ee54bf7](frappe@ee54bf7))
* **india:** e-invoice generation for registered composition gst category type ([frappe#30814](frappe#30814)) ([frappe#30877](frappe#30877)) ([246869d](frappe@246869d))
* Multi currency opening invoices ([2e62d51](frappe@2e62d51))
* payment days calculation for employees joining/leaving mid-month ([frappe#30863](frappe#30863)) ([frappe#30883](frappe#30883)) ([a1b0813](frappe@a1b0813))
* Period Closing Voucher is considering GL entries with is_cancelled=1 ([frappe#30865](frappe#30865)) ([5a5b49b](frappe@5a5b49b))
* **pos:** number pad translations ([b01f855](frappe@b01f855))
* **pos:** search field doesn't reset on checkout ([edbf551](frappe@edbf551))
* Supply type for overseas invoices with payment of tax ([fdcc591](frappe@fdcc591))
* supply type for sez invoices with payment of tax ([cf08710](frappe@cf08710))
* Use `account_type == 'Stock'` to filter stock accounts ([93482f3](frappe@93482f3))
* **UX:** misleading stock entry lables ([frappe#30870](frappe#30870)) ([frappe#30871](frappe#30871)) ([57b03f0](frappe@57b03f0))
* **UX:** record reason for skipping attendance or marking absent for auto attendance ([frappe#30846](frappe#30846)) ([f7bf4a3](frappe@f7bf4a3))
* Vat Audit report fixes ([d5319a4](frappe@d5319a4))

### Features

* Copy task color from project template (backport [frappe#30857](frappe#30857)) ([frappe#30859](frappe#30859)) ([7ee18e8](frappe@7ee18e8))
* support product bundles in picklist (backport [frappe#30762](frappe#30762)) ([frappe#30826](frappe#30826)) ([645ee2d](frappe@645ee2d))

(cherry picked from commit 8cc2ea0)

# Conflicts:
#	erpnext/__init__.py
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.

1 participant