summaryrefslogtreecommitdiff
path: root/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-02-25 13:17:36 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:26 -0400
commit70b3eda8d13fd6f8805791b52c1191619cf1fc03 (patch)
tree507771356689066b331fdff138b539c287d2306d /journal.cc
parent88a895a4944efcae0f7dbc7e7d73bef817cd317e (diff)
downloadfork-ledger-70b3eda8d13fd6f8805791b52c1191619cf1fc03.tar.gz
fork-ledger-70b3eda8d13fd6f8805791b52c1191619cf1fc03.tar.bz2
fork-ledger-70b3eda8d13fd6f8805791b52c1191619cf1fc03.zip
*** no comment ***
Diffstat (limited to 'journal.cc')
-rw-r--r--journal.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/journal.cc b/journal.cc
index 9e073388..232bb97a 100644
--- a/journal.cc
+++ b/journal.cc
@@ -55,7 +55,7 @@ bool transaction_t::valid() const
if (cost && ! cost->valid())
return false;
- if (flags & ~0x000f)
+ if (flags & ~0x001f)
return false;
return true;
@@ -109,6 +109,7 @@ bool entry_base_t::finalize()
// The amount doesn't need to be set because the code below will
// balance this transaction against the other.
add_transaction(nxact);
+ nxact->flags |= TRANSACTION_CALCULATED;
}
// If one transaction of a two-line transaction is of a different
@@ -191,6 +192,7 @@ bool entry_base_t::finalize()
} else {
transaction_t * nxact = new transaction_t((*x)->account);
add_transaction(nxact);
+ nxact->flags |= TRANSACTION_CALCULATED;
nxact->amount = amt;
}
@@ -203,6 +205,7 @@ bool entry_base_t::finalize()
case value_t::AMOUNT:
(*x)->amount = *((amount_t *) balance.data);
(*x)->amount.negate();
+ (*x)->flags |= TRANSACTION_CALCULATED;
balance += (*x)->amount;
break;