Skip to content

Commit

Permalink
fix(Timesheet): reset billing hours equal to hours if they exceed act…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
mergify[bot] and ruchamahabal authored Nov 17, 2023
1 parent 5be5fde commit 1e43605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/projects/doctype/timesheet/timesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def calculate_percentage_billed(self):

def update_billing_hours(self, args):
if args.is_billable:
if flt(args.billing_hours) == 0.0:
if flt(args.billing_hours) == 0.0 or flt(args.billing_hours) > flt(args.hours):
args.billing_hours = args.hours
else:
args.billing_hours = 0
Expand Down

0 comments on commit 1e43605

Please sign in to comment.