From: Damyan Ivanov Date: Mon, 10 May 2021 19:28:22 +0000 (+0300) Subject: when accumulating running totals, consider sub-accounts too X-Git-Tag: v0.19.0~1 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=ad885ec106a7344e761daa53da166f0acd6c26e4;p=mobile-ledger.git when accumulating running totals, consider sub-accounts too --- 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)