From 61edd3d8f4c7d5a9d8cabfb9391a7e9f20a95446 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 21 Jan 2010 04:55:11 -0500 Subject: Fixed account display bug in the balance report --- src/output.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/output.cc') diff --git a/src/output.cc b/src/output.cc index 71ec6d88..bb7eff5c 100644 --- a/src/output.cc +++ b/src/output.cc @@ -152,13 +152,12 @@ format_accounts::format_accounts(report_t& _report, std::size_t format_accounts::post_account(account_t& account, const bool flat) { + if (! flat && account.parent) + post_account(*account.parent, flat); + if (account.xdata().has_flags(ACCOUNT_EXT_TO_DISPLAY) && ! account.xdata().has_flags(ACCOUNT_EXT_DISPLAYED)) { - if (! flat && account.parent && - account.parent->xdata().has_flags(ACCOUNT_EXT_TO_DISPLAY) && - ! account.parent->xdata().has_flags(ACCOUNT_EXT_DISPLAYED)) - post_account(*account.parent, flat); - + DEBUG("account.display", "Displaying account: " << account.fullname()); account.xdata().add_flags(ACCOUNT_EXT_DISPLAYED); bind_scope_t bound_scope(report, account); -- cgit v1.2.3