summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-20 15:04:55 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-20 15:41:49 -0400
commit31feaad1056cda45f3b8cfa0faff45ddc8487c09 (patch)
tree8c69685fae1ec95d37dd1f45ad9a34f43e5dbd61 /src/output.cc
parent40f2ff6d6f7902c4957e0710a5a9d09c1f49ad1e (diff)
downloadfork-ledger-31feaad1056cda45f3b8cfa0faff45ddc8487c09.tar.gz
fork-ledger-31feaad1056cda45f3b8cfa0faff45ddc8487c09.tar.bz2
fork-ledger-31feaad1056cda45f3b8cfa0faff45ddc8487c09.zip
Added --no-total option
This simply omits the final total in the balance report, nothing more.
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/output.cc b/src/output.cc
index 2cc075eb..48773aa0 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -218,12 +218,12 @@ void format_accounts::post_account(account_t& account)
DEBUG("account.display", "Should we display " << account.fullname());
if (account.has_flags(ACCOUNT_EXT_MATCHING) ||
- (! flatten_list &&
+ (! report.HANDLED(flat) &&
account.children_with_flags(ACCOUNT_EXT_MATCHING) > 1)) {
DEBUG("account.display", " Yes, because it matched");
format_account = true;
}
- else if (! flatten_list &&
+ else if (! report.HANDLED(flat) &&
account.children_with_flags(ACCOUNT_EXT_VISITED) &&
! account.children_with_flags(ACCOUNT_EXT_MATCHING)) {
DEBUG("account.display",
@@ -257,11 +257,11 @@ void format_accounts::flush()
foreach (account_t * account, posted_accounts) {
post_account(*account);
- if (flatten_list && account->has_flags(ACCOUNT_EXT_DISPLAYED))
+ if (report.HANDLED(flat) && account->has_flags(ACCOUNT_EXT_DISPLAYED))
top_displayed++;
}
- if (! flatten_list) {
+ if (! report.HANDLED(flat)) {
foreach (accounts_map::value_type pair, report.session.master->accounts) {
if (pair.second->has_flags(ACCOUNT_EXT_DISPLAYED) ||
pair.second->children_with_flags(ACCOUNT_EXT_DISPLAYED))
@@ -272,7 +272,7 @@ void format_accounts::flush()
assert(report.session.master->has_xdata());
account_t::xdata_t& xdata(report.session.master->xdata());
- if (top_displayed > 1 && ! report.HANDLED(collapse) && xdata.total) {
+ if (! report.HANDLED(no_total) && top_displayed > 1 && xdata.total) {
out << "--------------------\n";
xdata.value = xdata.total;
bind_scope_t bound_scope(report, *report.session.master);