From 5b7b431dc97ef77fd888e8a233269219063428e6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:25:37 +0530 Subject: [PATCH] fix(Timesheet): reset billing hours equal to hours if they exceed actual hours (backport #38134) (#38153) fix(Timesheet): reset billing hours equal to hours if they exceed actual hours (#38134) (cherry picked from commit 20c6e9fca29d80016cefb83deee4e44ac9bc1d47) Co-authored-by: Rucha Mahabal --- erpnext/projects/doctype/timesheet/timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 11156f4b50..8e464b5c6b 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -69,7 +69,7 @@ class Timesheet(Document): 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