diff --git a/src/cost.ts b/src/cost.ts index decc7bf..8cce24e 100644 --- a/src/cost.ts +++ b/src/cost.ts @@ -145,8 +145,11 @@ function calculateServiceTotals( thisMonthServiceTotal += price; } - if (dateObj.isSameOrAfter(startOfLast7Days) && dateObj.isSameOrBefore(dayjs().startOf('day'))) { - last7DaysServiceTotal += price; + if ( + dateObj.isSameOrAfter(startOfLast7Days) && + dateObj.isSameOrBefore(dayjs().startOf('day')) + ) { + last7DaysServiceTotal += price; } if (dateObj.isSame(startOfYesterday, 'day')) {