Merge branch 'develop' into naming-series-proj

This commit is contained in:
Nabin Hait
2020-10-22 21:46:13 +05:30
committed by GitHub
447 changed files with 112707 additions and 24064 deletions

View File

@@ -48,8 +48,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-10-26 17:37:25.638190",
"modified_by": "rohitw1991@gmail.com",
"modified": "2020-09-18 17:26:09.703215",
"modified_by": "Administrator",
"module": "Projects",
"name": "Dependent Task",
"name_case": "",

View File

@@ -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)
return flt(activity_duration, precision), flt(billing_duration, precision)