From cad0f314f49ca558e65e7ac6227e56242360283a Mon Sep 17 00:00:00 2001 From: Patrick Nagurny Date: Fri, 30 Nov 2018 11:50:45 -0500 Subject: [PATCH] display non income/expense transactions --- src/app/dashboard/dashboard.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/dashboard/dashboard.ts b/src/app/dashboard/dashboard.ts index 3e5b70f..d669570 100644 --- a/src/app/dashboard/dashboard.ts +++ b/src/app/dashboard/dashboard.ts @@ -90,6 +90,13 @@ export class DashboardPage implements OnInit { return tree.accountIsChildOf(account, expenses) || tree.accountIsChildOf(account, income); }); + // If it's not an income or expense transaction but it has 2 splits we can still display something + if(!splits.length && tx.splits.length === 2) { + splits = tx.splits.filter(split => { + return split.amount < 0; + }); + } + return splits.map(split => { let recentTx = new RecentTx(); recentTx.split = split;