From 11221b5702fed3546b3f1058b0d052d43a08f7e6 Mon Sep 17 00:00:00 2001 From: Ly Tuan Kiet Date: Sat, 18 Jan 2025 21:26:06 +0700 Subject: [PATCH] fix: round revenue calculation in AnalyticSchema - Added logic to round the revenue value to the nearest whole number before returning the analytic data. - This change aims to ensure that revenue figures are presented in a more user-friendly format, enhancing clarity in analytic reports. --- src/Analytic/analytic.schema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Analytic/analytic.schema.ts b/src/Analytic/analytic.schema.ts index 800904a..de4650c 100644 --- a/src/Analytic/analytic.schema.ts +++ b/src/Analytic/analytic.schema.ts @@ -461,6 +461,8 @@ export class AnalyticSchema extends PothosSchema { revenue += actualRevenue; } } + // round revenue to number + revenue = Math.round(revenue); // return analytic return { topServices: topServices,