From 88d8310a475eae6b223ffb7d72f9ecc47758519d Mon Sep 17 00:00:00 2001 From: Nishka Gosalia Date: Tue, 9 Dec 2025 16:20:20 +0530 Subject: [PATCH] fix: updating base amounts through python for timesheet --- .../projects/doctype/timesheet_detail/timesheet_detail.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py index 1ce2e7977d5..4e6bfa801c9 100644 --- a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py +++ b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py @@ -91,6 +91,11 @@ class TimesheetDetail(Document): self.billing_amount = self.billing_rate * (self.billing_hours or 0) self.costing_amount = self.costing_rate * (self.hours or 0) + exchange_rate = flt(frappe.get_value("Timesheet", self.parent, "exchange_rate")) or 1.0 + self.base_billing_rate = flt(self.billing_rate) * exchange_rate + self.base_costing_rate = flt(self.costing_rate) * exchange_rate + self.base_billing_amount = flt(self.billing_amount) * exchange_rate + self.base_costing_amount = flt(self.costing_amount) * exchange_rate def validate_dates(self): """Validate that to_time is not before from_time."""