mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-16 13:32:13 +00:00
fix: set billing hours to hours
This commit is contained in:
@@ -108,15 +108,10 @@ class Timesheet(Document):
|
|||||||
self.per_billed = (self.total_billed_hours * 100) / self.total_billable_hours
|
self.per_billed = (self.total_billed_hours * 100) / self.total_billable_hours
|
||||||
|
|
||||||
def update_billing_hours(self, args):
|
def update_billing_hours(self, args):
|
||||||
if args.is_billable:
|
if args.is_billable and (
|
||||||
if flt(args.billing_hours) == 0.0:
|
flt(args.billing_hours) == 0.0 or flt(args.billing_hours) != flt(args.hours)
|
||||||
args.billing_hours = args.hours
|
):
|
||||||
elif flt(args.billing_hours) > flt(args.hours):
|
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:
|
else:
|
||||||
args.billing_hours = 0
|
args.billing_hours = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user