If a balance report is multi-lined, print a total
This commit is contained in:
parent
dbcaa35d4b
commit
d0963ece02
2 changed files with 4 additions and 10 deletions
|
|
@ -197,19 +197,10 @@ void format_accounts::flush()
|
|||
foreach (account_t * account, posted_accounts) {
|
||||
post_account(*account);
|
||||
|
||||
if (report.HANDLED(flat) && account->has_flags(ACCOUNT_EXT_DISPLAYED))
|
||||
if (account->has_flags(ACCOUNT_EXT_DISPLAYED))
|
||||
top_displayed++;
|
||||
}
|
||||
|
||||
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)) {
|
||||
top_displayed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! report.HANDLED(no_total) && top_displayed > 1 &&
|
||||
report.session.master->family_total()) {
|
||||
bind_scope_t bound_scope(report, *report.session.master);
|
||||
|
|
|
|||
|
|
@ -8,5 +8,8 @@ bal --account=Master
|
|||
0.350 VMMXX Master
|
||||
0.350 VMMXX Assets:Investments:Vanguard:VMMXX
|
||||
$-0.35 Income:Dividends:Vanguard:VMMXX
|
||||
--------------------
|
||||
$-0.35
|
||||
0.350 VMMXX
|
||||
>>>2
|
||||
=== 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue