summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-17 21:19:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-17 21:19:31 -0400
commit4ec2dfeef13ead1d87302ef953e05efec102bb25 (patch)
tree0ff109dd6aaccf466ecbd64f80ae3138b9219b6a /src/output.cc
parent93d195f1d97c376c26e5a7e88d6b0fc6e3b8e2d0 (diff)
downloadfork-ledger-4ec2dfeef13ead1d87302ef953e05efec102bb25.tar.gz
fork-ledger-4ec2dfeef13ead1d87302ef953e05efec102bb25.tar.bz2
fork-ledger-4ec2dfeef13ead1d87302ef953e05efec102bb25.zip
Added --flat option, to flatten the balance report
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/output.cc b/src/output.cc
index 2e068631..31208c26 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -222,11 +222,13 @@ std::size_t format_accounts::post_accounts(account_t& account)
DEBUG("account.display", "Should we display " << account.fullname());
if (account.has_flags(ACCOUNT_EXT_MATCHING) ||
- account.children_with_flags(ACCOUNT_EXT_MATCHING) > 1) {
+ (! flatten_list &&
+ account.children_with_flags(ACCOUNT_EXT_MATCHING) > 1)) {
DEBUG("account.display", " Yes, because it matched");
format_account = true;
}
- else if (account.children_with_flags(ACCOUNT_EXT_VISITED) &&
+ else if (! flatten_list &&
+ account.children_with_flags(ACCOUNT_EXT_VISITED) &&
! account.children_with_flags(ACCOUNT_EXT_MATCHING)) {
DEBUG("account.display",
" Maybe, because it has visited, but no matching, children");