Skip to content

Commit

Permalink
fix: warn user if billing hours > actual hours
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal committed Nov 21, 2023
1 parent 9e971e6 commit 642eaaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erpnext/projects/doctype/timesheet/timesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def update_billing_hours(self, args):
if args.is_billable:
if flt(args.billing_hours) == 0.0:
args.billing_hours = args.hours
elif flt(args.billing_hours) > args.hours:
frappe.msgprint(
_("Warning - Row {0}: Billing Hours are more than Actual Hours").format(args.idx),
indicator="orange",
alert=True,
)
else:
args.billing_hours = 0

Expand Down

0 comments on commit 642eaaa

Please sign in to comment.