Fix incorrect cumulative totals for Days 28+ on the Spending Report (#3679)

* Fix bug with spending report cumulative totals

* release notes

---------

Co-authored-by: Joel Rich <joelrich@protonmail.com>
This commit is contained in:
joel-rich
2024-10-20 23:59:41 -06:00
committed by GitHub
parent 4e07357221
commit 715bc00e3b
2 changed files with 7 additions and 1 deletions

View File

@@ -223,7 +223,7 @@ export function createSpendingSpreadsheet({
return arr;
}, []);
const maxCumulative = data.reduce((a, b) =>
a.cumulative < b.cumulative ? a : b,
b.cumulative === null ? a : b,
).cumulative;
const totalDaily = data.reduce((a, v) => (a = a + v.totalTotals), 0);

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [joel-rich]
---
Fix incorrect cumulative totals for Days 28+ on the Spending Report