From ad885ec106a7344e761daa53da166f0acd6c26e4 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 10 May 2021 22:28:22 +0300 Subject: [PATCH] when accumulating running totals, consider sub-accounts too --- .../net/ktnx/mobileledger/async/TransactionAccumulator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java b/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java index fd796f2d..d3131f77 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java @@ -69,7 +69,7 @@ public class TransactionAccumulator { for (LedgerTransactionAccount acc : transaction.getAccounts()) { if (acc.getAccountName() .equals(accumulateAccount) || - LedgerAccount.isParentOf(acc.getAccountName(), accumulateAccount)) + LedgerAccount.isParentOf(accumulateAccount, acc.getAccountName())) { BigDecimal amt = runningTotal.get(acc.getCurrency()); if (amt == null) -- 2.39.2