From 642eaaa2bf7c19a39c68b6ecef7cc48fcf2d342b Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 21 Nov 2023 12:43:52 +0530 Subject: [PATCH] fix: warn user if billing hours > actual hours --- erpnext/projects/doctype/timesheet/timesheet.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 11156f4b506b..1a84975ee96c 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -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