From 8b0f13b340b5f63f1265f23bb6323842b791f2a9 Mon Sep 17 00:00:00 2001 From: nzambello Date: Sun, 19 Feb 2023 14:12:30 +0100 Subject: [PATCH] fix: fixed decimal digits in reports --- app/routes/reports.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/routes/reports.tsx b/app/routes/reports.tsx index e733620..d34cc4d 100644 --- a/app/routes/reports.tsx +++ b/app/routes/reports.tsx @@ -239,10 +239,17 @@ export default function ReportPage() { )?.name ?? 'No project'} - {projectData._sum.duration / 1000 / 60 / 60} h + + {(projectData._sum.duration / 1000 / 60 / 60).toFixed(2)} h + {costPerHour && ( - {(projectData._sum.duration * costPerHour) / 1000 / 60 / 60}{' '} + {( + (projectData._sum.duration * costPerHour) / + 1000 / + 60 / + 60 + ).toFixed(2)}{' '} € )}