diff options
author | John Wiegley <johnw@newartisans.com> | 2004-06-21 18:49:43 -0400 |
---|---|---|
committer | johnw <johnw@newartisans.com> | 2004-06-21 18:49:43 -0400 |
commit | adb3965e947d4891c8ab59a63cf6e7f7db1f25fb (patch) | |
tree | 5e83bee089c7cfcf19b535a60aa83349ecea22fd /ledger.cc | |
parent | f077b655d01364275c1f8944aee0a0ed2d530245 (diff) | |
download | fork-ledger-adb3965e947d4891c8ab59a63cf6e7f7db1f25fb.tar.gz fork-ledger-adb3965e947d4891c8ab59a63cf6e7f7db1f25fb.tar.bz2 fork-ledger-adb3965e947d4891c8ab59a63cf6e7f7db1f25fb.zip |
further pricing fixes
Diffstat (limited to 'ledger.cc')
-rw-r--r-- | ledger.cc | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -448,6 +448,23 @@ void totals::print(std::ostream& out, int width) const } } +void totals::print_street(std::ostream& out, int width, std::time_t * when, + bool use_history, bool download) const +{ + totals street_balance; + + for (const_iterator i = amounts.begin(); i != amounts.end(); i++) { + if ((*i).second->is_zero()) + continue; + + amount * street = (*i).second->street(when, use_history, download); + street_balance.credit(street); + delete street; + } + + street_balance.print(out, width); +} + account::~account() { for (accounts_map_iterator i = children.begin(); |