private boolean expanded;
private List<LedgerAmount> amounts;
private boolean hasSubAccounts;
+ private boolean amountsExpanded;
public LedgerAccount(String name) {
this.setName(name);
public void removeAmounts() {
if (amounts != null) amounts.clear();
}
+ public boolean amountsExpanded() { return amountsExpanded; }
+ public void setAmountsExpanded(boolean flag) { amountsExpanded = flag; }
+ public void toggleAmountsExpanded() { amountsExpanded = !amountsExpanded; }
}
class MobileLedgerDatabase extends SQLiteOpenHelper implements AutoCloseable {
private static final String DB_NAME = "MoLe.db";
- private static final int LATEST_REVISION = 20;
+ private static final int LATEST_REVISION = 21;
private static final String CREATE_DB_SQL = "create_db";
private final Application mContext;
-create table accounts(profile varchar not null, name varchar not null, name_upper varchar not null, hidden boolean not null default 0, keep boolean not null default 0, level integer not null, parent_name varchar, expanded default 1);
+create table accounts(profile varchar not null, name varchar not null, name_upper varchar not null, hidden boolean not null default 0, keep boolean not null default 0, level integer not null, parent_name varchar, expanded default 1, amounts_expanded boolean default 0);
create unique index un_accounts on accounts(profile, name);
create table options(profile varchar not null, name varchar not null, value varchar);
create unique index un_options on options(profile,name);
--- /dev/null
+alter table accounts add amounts_expanded boolean default 0;
\ No newline at end of file