diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-29 21:38:20 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-29 21:44:21 -0400 |
commit | 1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d (patch) | |
tree | d5c7e3897763a8a9d4b05c438d1c1bcb8020ee04 /walk.cc | |
parent | 42e1d725aa9deb41396ba4c73c8499c7c3798508 (diff) | |
download | ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.tar.gz ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.tar.bz2 ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.zip |
The register report has begun printing real data, although not all the pieces
are in place yet and the formatting is still off.
Diffstat (limited to 'walk.cc')
-rw-r--r-- | walk.cc | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -54,8 +54,7 @@ void add_xact_to(const xact_t& xact, value_t& value) value += xact_xdata_(xact).value; } else if (xact.cost || (! value.is_null() && ! value.is_realzero())) { - // jww (2008-04-24): Is this costly? - value.add(xact.amount, xact.cost ? optional<amount_t>(*xact.cost) : none); + value.add(xact.amount, xact.cost); } else { value = xact.amount; @@ -201,7 +200,10 @@ void calc_xacts::operator()(xact_t& xact) xact_xdata_t& xdata(xact_xdata(xact)); if (last_xact && xact_has_xdata(*last_xact)) { - xdata.total += xact_xdata_(*last_xact).total; + if (xdata.total.is_null()) + xdata.total = xact_xdata_(*last_xact).total; + else + xdata.total += xact_xdata_(*last_xact).total; xdata.index = xact_xdata_(*last_xact).index + 1; } else { xdata.index = 0; |