diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-19 23:10:37 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-19 23:10:37 -0400 |
commit | 88634973a29693402edd4eb8e943531354c51893 (patch) | |
tree | 550f6fca09e80d1a0877e06c3433b37c5bb2e6d5 /journal.cc | |
parent | d568319495a0695582797de0be4b85e1e06e73b2 (diff) | |
download | fork-ledger-88634973a29693402edd4eb8e943531354c51893.tar.gz fork-ledger-88634973a29693402edd4eb8e943531354c51893.tar.bz2 fork-ledger-88634973a29693402edd4eb8e943531354c51893.zip |
Some basic fixes to get things almost running, although we still can't parse
my personal ledger file yet.
Diffstat (limited to 'journal.cc')
-rw-r--r-- | journal.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -108,7 +108,7 @@ bool entry_base_t::finalize() if (! ((*x)->flags & TRANSACTION_VIRTUAL) || ((*x)->flags & TRANSACTION_BALANCE)) { amount_t * p = (*x)->cost ? (*x)->cost : &(*x)->amount; - if (*p) { + if (! p->is_null()) { if (no_amounts) { balance = *p; no_amounts = false; @@ -251,7 +251,7 @@ bool entry_base_t::finalize() case value_t::AMOUNT: (*x)->amount = balance.as_amount_lval(); - (*x)->amount.negate(); + (*x)->amount.in_place_negate(); (*x)->flags |= TRANSACTION_CALCULATED; balance += (*x)->amount; |