fix: Billing hours is not updated in Time sheet#19026 (#42404)

This commit is contained in:
Poorvi-R-Bhat
2024-07-19 14:46:24 +05:30
committed by GitHub
parent 930ecb3170
commit d62eb0f5c1
2 changed files with 2 additions and 0 deletions

View File

@@ -296,6 +296,7 @@ frappe.ui.form.on("Timesheet Detail", {
hours: function (frm, cdt, cdn) {
calculate_end_time(frm, cdt, cdn);
update_billing_hours(frm, cdt, cdn);
calculate_billing_costing_amount(frm, cdt, cdn);
calculate_time_and_amount(frm);
},

View File

@@ -36,6 +36,7 @@ class Timesheet(Document):
for row in self.time_logs:
if row.to_time and row.from_time:
row.hours = time_diff_in_hours(row.to_time, row.from_time)
self.update_billing_hours(row)
def calculate_total_amounts(self):
self.total_hours = 0.0