summaryrefslogtreecommitdiff
path: root/ledger.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-06-21 18:49:43 -0400
committerjohnw <johnw@newartisans.com>2004-06-21 18:49:43 -0400
commitadb3965e947d4891c8ab59a63cf6e7f7db1f25fb (patch)
tree5e83bee089c7cfcf19b535a60aa83349ecea22fd /ledger.cc
parentf077b655d01364275c1f8944aee0a0ed2d530245 (diff)
downloadfork-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.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/ledger.cc b/ledger.cc
index 4722ac31..31a369b0 100644
--- a/ledger.cc
+++ b/ledger.cc
@@ -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();