🐛 (reports) fix incorrect cashflow balance (#1518)

* 🐛 (reports) fix incorrect cashflow balance

Fixing a small typo here where multiple transfers across different payees on the same day fail to be summed up resulting in significant balance errors.

* release notes

* Update 1518.md
This commit is contained in:
Martin French
2023-08-13 13:21:17 +08:00
committed by GitHub
parent 42af73cdff
commit 6ebcbc8738
2 changed files with 8 additions and 2 deletions

View File

@@ -25,8 +25,8 @@ export function indexCashFlow(data, date, isTransfer) {
const results = {};
data.forEach(item => {
let findExisting = results[item.date]
? results[item.date][item.xfer]
? results[item.date][item.xfer]
? results[item.date][item.isTransfer]
? results[item.date][item.isTransfer]
: 0
: 0;
let result = { [item[isTransfer]]: item.amount + findExisting };

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [martinfrench92]
---
Fix incorrect cashflow balance