Skip to content

A local-first personal finance app

:bug: (reports) fix incorrect cashflow balance (#1518)

Martin French6ebcbc873892
diff --git a/packages/desktop-client/src/components/reports/util.js b/packages/desktop-client/src/components/reports/util.js
index ac7bc5e847..1cae0b43d3 100644
--- a/packages/desktop-client/src/components/reports/util.js
+++ b/packages/desktop-client/src/components/reports/util.js
@@ -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 };
diff --git a/upcoming-release-notes/1518.md b/upcoming-release-notes/1518.md
new file mode 100644
index 0000000000..762d67ab9a
--- /dev/null
+++ b/upcoming-release-notes/1518.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [martinfrench92]
+---
+
+Fix incorrect cashflow balance
\ No newline at end of file