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.
This commit is contained in:
parent
4c061d61fa
commit
38e88db2c9
@ -83,7 +83,7 @@ class Timesheet(Document):
|
|||||||
def set_status(self):
|
def set_status(self):
|
||||||
self.status = {"0": "Draft", "1": "Submitted", "2": "Cancelled"}[str(self.docstatus or 0)]
|
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"
|
self.status = "Billed"
|
||||||
|
|
||||||
if self.sales_invoice:
|
if self.sales_invoice:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user