summaryrefslogtreecommitdiff
path: root/src/output.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-17 19:48:42 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-17 19:48:42 -0400
commit93d195f1d97c376c26e5a7e88d6b0fc6e3b8e2d0 (patch)
treef72c2d5adb24d446eaa763f56b2db47342df0045 /src/output.h
parent07f4aefdfde719c57aa4574a53e1f33b6e295a58 (diff)
downloadfork-ledger-93d195f1d97c376c26e5a7e88d6b0fc6e3b8e2d0.tar.gz
fork-ledger-93d195f1d97c376c26e5a7e88d6b0fc6e3b8e2d0.tar.bz2
fork-ledger-93d195f1d97c376c26e5a7e88d6b0fc6e3b8e2d0.zip
Only display a final balance total if necessary
In the case where only one top-level account is being reported, there is no reason to duplicate the total balance shown.
Diffstat (limited to 'src/output.h')
-rw-r--r--src/output.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/output.h b/src/output.h
index 6952a4a5..bb1b907b 100644
--- a/src/output.h
+++ b/src/output.h
@@ -163,14 +163,11 @@ protected:
report_t& report;
format_t format;
item_predicate disp_pred;
- bool print_final_total;
public:
format_accounts(report_t& _report,
- const string& _format = "",
- const bool _print_final_total = true)
- : report(_report), format(_format), disp_pred(),
- print_final_total(_print_final_total)
+ const string& _format = "")
+ : report(_report), format(_format), disp_pred()
{
TRACE_CTOR(format_accounts, "report&, const string&, const bool");
@@ -184,8 +181,8 @@ public:
TRACE_DTOR(format_accounts);
}
- virtual void post_accounts(account_t& account);
- virtual void flush();
+ virtual std::size_t post_accounts(account_t& account);
+ virtual void flush();
virtual void operator()(account_t& account);
};
@@ -209,8 +206,8 @@ class format_equity : public format_accounts
TRACE_DTOR(format_equity);
}
- virtual void flush();
- virtual void post_accounts(account_t& account);
+ virtual std::size_t post_accounts(account_t& account);
+ virtual void flush();
};
} // namespace ledger