import net.ktnx.mobileledger.App;
import net.ktnx.mobileledger.err.HTTPException;
-import net.ktnx.mobileledger.json.AccountListParser;
-import net.ktnx.mobileledger.json.ParsedBalance;
-import net.ktnx.mobileledger.json.ParsedLedgerAccount;
-import net.ktnx.mobileledger.json.ParsedLedgerTransaction;
-import net.ktnx.mobileledger.json.TransactionListParser;
+import net.ktnx.mobileledger.json.v1_15.AccountListParser;
+import net.ktnx.mobileledger.json.v1_15.ParsedBalance;
+import net.ktnx.mobileledger.json.v1_15.ParsedLedgerAccount;
+import net.ktnx.mobileledger.json.v1_15.ParsedLedgerTransaction;
+import net.ktnx.mobileledger.json.v1_15.TransactionListParser;
import net.ktnx.mobileledger.model.Data;
import net.ktnx.mobileledger.model.LedgerAccount;
import net.ktnx.mobileledger.model.LedgerTransaction;
HashMap<String, Void> accountNames = new HashMap<>();
HashMap<String, LedgerAccount> syntheticAccounts = new HashMap<>();
LedgerAccount lastAccount = null, prevAccount = null;
- boolean onlyStarred = Data.optShowOnlyStarred.get();
HttpURLConnection http = NetworkUtil.prepareConnection(profile, "journal");
http.setAllowUserInteraction(false);
}
acc.setHasSubAccounts(true);
acc.removeAmounts(); // filled below when amounts are parsed
- if ((!onlyStarred || !acc.isHiddenByStar()) &&
- acc.isVisible(accountList)) accountList.add(acc);
+ if (acc.isVisible(accountList))
+ accountList.add(acc);
L(String.format("gap-filling with %s", aName));
accountNames.put(aName, null);
profile.storeAccount(db, acc);
}
}
- if ((!onlyStarred || !lastAccount.isHiddenByStar()) &&
- lastAccount.isVisible(accountList))
+ if (lastAccount.isVisible(accountList))
accountList.add(lastAccount);
accountNames.put(acct_name, null);
if (currency == null) currency = "";
amount = amount.replace(',', '.');
transaction.addAccount(new LedgerTransactionAccount(acc_name,
- Float.valueOf(amount), currency));
+ Float.valueOf(amount), currency, null));
L(String.format(Locale.ENGLISH, "%d: %s = %s",
transaction.getId(), acc_name, amount));
}