From 7c7e5c5e367778c6d54a1bb2be2db5c73db0492b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 16 May 2007 05:38:32 +0000 Subject: Now using xpath_t::path_t to select nodes. --- src/journal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/journal.cc') diff --git a/src/journal.cc b/src/journal.cc index 2f501aff..295db452 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -153,7 +153,7 @@ bool entry_base_t::finalize() // account if one has been set. if (journal && journal->basket && transactions.size() == 1) { - assert(balance.is_type(value_t::AMOUNT)); + assert(balance.is_amount()); transaction_t * nxact = new transaction_t(journal->basket); // The amount doesn't need to be set because the code below will // balance this transaction against the other. @@ -166,7 +166,7 @@ bool entry_base_t::finalize() // determine its price by dividing the unit count into the value of // the balance. This is done for the last eligible commodity. - if (! saw_null && balance && balance.is_type(value_t::BALANCE) && + if (! saw_null && balance && balance.is_balance() && balance.as_balance().amounts.size() == 2) { transactions_list::const_iterator x = transactions.begin(); assert((*x)->amount); -- cgit v1.2.3