Skip to content

Commit

Permalink
fix: timesheet per billed state edge case (backport #40010) (#40028)
Browse files Browse the repository at this point in the history
fix: timesheet per billed state edge case (#40010)

If value is 100.0000x then it won't set status correctly but will set it the next time it's loaded from db.

(cherry picked from commit 38e88db)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush authored Feb 22, 2024
1 parent 865cba4 commit 2a2f314
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 @@ -77,7 +77,7 @@ def update_billing_hours(self, args):
def set_status(self):
self.status = {"0": "Draft", "1": "Submitted", "2": "Cancelled"}[str(self.docstatus or 0)]

if self.per_billed == 100:
if flt(self.per_billed, self.precision("per_billed")) >= 100.0:
self.status = "Billed"

if self.sales_invoice:
Expand Down

0 comments on commit 2a2f314

Please sign in to comment.