diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-10 02:53:56 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-10 02:53:56 -0400 |
commit | 7ffb6c472c840acf8df5a3dd652d1c111787f87f (patch) | |
tree | bd8b1e097a5f2ebb8eb9292239538be277777f67 /src/account.cc | |
parent | fd2e6c25024eefa5dfc36bed892360451862cb88 (diff) | |
download | fork-ledger-7ffb6c472c840acf8df5a3dd652d1c111787f87f.tar.gz fork-ledger-7ffb6c472c840acf8df5a3dd652d1c111787f87f.tar.bz2 fork-ledger-7ffb6c472c840acf8df5a3dd652d1c111787f87f.zip |
The balance report is working again.
Diffstat (limited to 'src/account.cc')
-rw-r--r-- | src/account.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/account.cc b/src/account.cc index 6c1f81a0..f613d983 100644 --- a/src/account.cc +++ b/src/account.cc @@ -219,8 +219,13 @@ void account_t::calculate_sums() (*pair.second).calculate_sums(); xdata_t& child_xd((*pair.second).xdata()); - add_or_set_value(xd.total, child_xd.total); - xd.total_count += child_xd.total_count + child_xd.count; + if (! child_xd.total.is_null()) { + add_or_set_value(xd.total, child_xd.total); + xd.total_count += child_xd.total_count + child_xd.count; + } else { + assert(child_xd.total_count == 0); + assert(child_xd.count == 0); + } } call_scope_t args(*this); |