From 4b8d4a1cbe1aa2743dac66968789d93e0b7a1d8b Mon Sep 17 00:00:00 2001 From: Afshan <33727827+AfshanKhan@users.noreply.github.com> Date: Wed, 14 Oct 2020 15:50:26 +0530 Subject: [PATCH] fix: setting user precision instead of 2 (#23630) * fix: setting user precision instead of default * fix: removing unused imports --- erpnext/projects/report/billing_summary.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/projects/report/billing_summary.py b/erpnext/projects/report/billing_summary.py index 76379f1de2e..1cfa1ebe5af 100644 --- a/erpnext/projects/report/billing_summary.py +++ b/erpnext/projects/report/billing_summary.py @@ -136,6 +136,7 @@ def get_timesheet_details(filters, timesheet_list): return timesheet_details_map def get_billable_and_total_duration(activity, start_time, end_time): + precision = frappe.get_precision("Timesheet Detail", "hours") activity_duration = time_diff_in_hours(end_time, start_time) billing_duration = 0.0 if activity.billable: @@ -143,4 +144,4 @@ def get_billable_and_total_duration(activity, start_time, end_time): if activity_duration != activity.billing_hours: billing_duration = activity_duration * activity.billing_hours / activity.hours - return flt(activity_duration, 2), flt(billing_duration, 2) \ No newline at end of file + return flt(activity_duration, precision), flt(billing_duration, precision) \ No newline at end of file