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(Timesheet): reset billing hours equal to hours if they exceed actual hours #38134

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Nov 16, 2023

Steps to replicate

  1. Enter hours = 1, enable Is Billable, and save. This sets Billing Hours = 1 (Hours)
  2. Change hours = 0.5, save. Billing hours still remain 1
hours

Fix

Reset billing hours = hours if they exceed hours

P.S: should this happen silently or with a msgprint (?)

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Nov 16, 2023
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Merging #38134 (0ec8034) into develop (6e0362d) will decrease coverage by 0.15%.
Report is 27 commits behind head on develop.
The diff coverage is 7.52%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #38134      +/-   ##
===========================================
- Coverage    67.40%   67.26%   -0.15%     
===========================================
  Files          757      757              
  Lines        60459    60487      +28     
===========================================
- Hits         40750    40684      -66     
- Misses       19709    19803      +94     
Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 83.61% <100.00%> (+0.01%) ⬆️
erpnext/projects/doctype/timesheet/timesheet.py 78.57% <100.00%> (ø)
erpnext/accounts/utils.py 73.17% <50.00%> (-0.06%) ⬇️
erpnext/utilities/bulk_transaction.py 0.00% <0.00%> (-69.90%) ⬇️
...ctype/bulk_transaction_log/bulk_transaction_log.py 0.00% <0.00%> (-31.04%) ⬇️

... and 6 files with indirect coverage changes

@ruchamahabal ruchamahabal merged commit 20c6e9f into frappe:develop Nov 17, 2023
16 checks passed
@ruchamahabal ruchamahabal added backport version-14-hotfix backport to version 14 backport version-15-hotfix and removed needs-tests This PR needs automated unit-tests. labels Nov 17, 2023
mergify bot pushed a commit that referenced this pull request Nov 17, 2023
mergify bot pushed a commit that referenced this pull request Nov 17, 2023
mergify bot pushed a commit that referenced this pull request Nov 17, 2023
ruchamahabal added a commit that referenced this pull request Nov 17, 2023
…ual hours (backport #38134) (#38153)

fix(Timesheet): reset billing hours equal to hours if they exceed actual hours (#38134)

(cherry picked from commit 20c6e9f)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
ruchamahabal added a commit that referenced this pull request Nov 17, 2023
…ual hours (backport #38134) (#38152)

fix(Timesheet): reset billing hours equal to hours if they exceed actual hours (#38134)

(cherry picked from commit 20c6e9f)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
ruchamahabal added a commit that referenced this pull request Nov 17, 2023
…ual hours (backport #38134) (#38154)

fix(Timesheet): reset billing hours equal to hours if they exceed actual hours (#38134)

(cherry picked from commit 20c6e9f)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
@michal-bee
Copy link

Steps to replicate

  1. Enter hours = 1, enable Is Billable, and save. This sets Billing Hours = 1 (Hours)
  2. Change hours = 0.5, save. Billing hours still remain 1
hours ## Fix Reset billing hours = hours if they exceed hours

P.S: should this happen silently or with a msgprint (?)

Hello @ruchamahabal We are actually working with this as a feature. It can happen that you need to bill the Client more hours that reported in the Timesheet - one example is that there is a time booking made prior the Timesheet for specific time span. The actual work is sometimes less but we still need to bill the booked times.
As I understand your change, in our use case this would get overwritten.

@ruchamahabal
Copy link
Member Author

@michal-bee In that case maybe we should add a warning instead of silently resetting. Will make a change

frappe-pr-bot pushed a commit that referenced this pull request Nov 21, 2023
## [13.54.12](v13.54.11...v13.54.12) (2023-11-21)

### Bug Fixes

* `get_previous_allocation` return value ([6cb8a40](6cb8a40))
* backward compatible query without pluck ([958db77](958db77))
* pass check permission in render_address ([65ae8d9](65ae8d9))
* **Timesheet:** reset billing hours equal to hours if they exceed actual hours (backport [#38134](#38134)) ([#38154](#38154)) ([1e43605](1e43605))
* **Timesheet:** warn user if billing hours > actual hours instead of resetting  (backport [#38239](#38239)) ([#38242](#38242)) ([a9429e1](a9429e1))
* use `get_all` instead of `get_list` ([4b8ed0f](4b8ed0f))

### Performance Improvements

* index most queried fields in Leave Ledger Entry ([eea7bbc](eea7bbc))
* limit rows to 1 for cf leave expiry query ([635c3d5](635c3d5))
frappe-pr-bot pushed a commit that referenced this pull request Nov 21, 2023
# [15.3.0](v15.2.0...v15.3.0) (2023-11-21)

### Bug Fixes

* attributes were mandatory for manufacturers ([00b9c23](00b9c23))
* issue occured when creating supplier with contact details ([aaccfeb](aaccfeb))
* overallocation on Payment with PO/SO ([337707b](337707b))
* pass check permission in render_address ([a420e13](a420e13))
* payment entry rounding error ([384d6b5](384d6b5))
* set asset's valuation_rate according to asset quantity (backport [#38254](#38254)) ([#38256](#38256)) ([c60aaa7](c60aaa7))
* set default asset quantity as 1 [dev] (backport [#38223](#38223)) ([#38226](#38226)) ([99bf63e](99bf63e))
* Suppier name was not taken when creating address from supplier ([2b94489](2b94489))
* Supplier Quotation fields ([#37963](#37963)) ([aef955c](aef955c))
* test case for rounded total with cash disc ([eab18e6](eab18e6))
* **Timesheet:** reset billing hours equal to hours if they exceed actual hours (backport [#38134](#38134)) ([#38153](#38153)) ([5b7b431](5b7b431))
* **Timesheet:** warn user if billing hours > actual hours instead of resetting  (backport [#38239](#38239)) ([#38241](#38241)) ([1f2f5d8](1f2f5d8))
* TypeError in Subcontracting Receipt (backport [#38200](#38200)) ([#38208](#38208)) ([3f57a7e](3f57a7e))
* update modified timestamp ([a492e57](a492e57))
* **ux:** `Task` creation from `Timesheet` (backport [#38207](#38207)) ([#38211](#38211)) ([e272041](e272041))
* valuation rate for FG item for subcontracting receipt (backport [#38244](#38244)) ([#38245](#38245)) ([ed7b845](ed7b845))
* valuation rate in report Item Prices ([#38161](#38161)) ([f71234e](f71234e))
* wrong round off and rounded total ([70eccf7](70eccf7))

### Features

* add `Supplier Delivery Note` field in SCR (backport [#38127](#38127)) ([#38156](#38156)) ([b89a4a7](b89a4a7))
* Add accounting dimensions to Supplier Quotation ([7d4ac7e](7d4ac7e))
frappe-pr-bot pushed a commit that referenced this pull request Nov 22, 2023
# [14.49.0](v14.48.1...v14.49.0) (2023-11-22)

### Bug Fixes

* add revaluation journal filter in Payable report ([d0698b3](d0698b3))
* attributes were mandatory for manufacturers ([430980a](430980a))
* duplicate field in `Closing Stock Balance` ([#38105](#38105)) ([1f16c47](1f16c47))
* incorrect incoming rate for serial and batch items in standalone debit note ([#38121](#38121)) ([9a34518](9a34518))
* pass check permission in render_address ([1ccd5e4](1ccd5e4))
* payment entry rounding error ([49735bc](49735bc))
* remove ESS role when not mapped to employee (backport [#37867](#37867)) ([#38132](#38132)) ([bc01007](bc01007))
* round `unreconciled_amount` before asserting ([392ee2e](392ee2e))
* set asset's valuation_rate according to asset quantity (backport [#38254](#38254)) ([#38255](#38255)) ([00def82](00def82))
* set default asset quantity as 1 [v14] ([#38224](#38224)) ([3daf6f8](3daf6f8))
* show party values when naming by is not naming series ([dd76695](dd76695))
* Supplier Quotation fields ([#37963](#37963)) ([883eaee](883eaee))
* test case for rounded total with cash disc ([9b5185a](9b5185a))
* **Timesheet:** reset billing hours equal to hours if they exceed actual hours (backport [#38134](#38134)) ([#38152](#38152)) ([c7c751e](c7c751e))
* **Timesheet:** warn user if billing hours > actual hours instead of resetting  (backport [#38239](#38239)) ([#38240](#38240)) ([e08f114](e08f114))
* update modified timestamp ([2849e0d](2849e0d))
* valuation rate in report Item Prices ([#38161](#38161)) ([a70696e](a70696e))
* wrong round off and rounded total ([296433a](296433a))

### Features

* add `Supplier Delivery Note` field in SCR (backport [#38127](#38127)) ([#38155](#38155)) ([8d4a19c](8d4a19c))
* Add accounting dimensions to Supplier Quotation ([51e33e1](51e33e1))
* virtual parent doctype ([8dbf2ce](8dbf2ce))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants