]> git.ktnx.net Git - mobile-ledger.git/commitdiff
when accumulating running totals, consider sub-accounts too
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 10 May 2021 19:28:22 +0000 (22:28 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 10 May 2021 19:28:22 +0000 (22:28 +0300)
app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java

index fd796f2d5f68e3788c9c9f9c5d65de3462888ac4..d3131f776e2181807193f494be38b32c4ad44fe0 100644 (file)
@@ -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)