diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-23 19:20:57 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-23 19:20:57 -0400 |
commit | cb751913ef85305f2f13cd3a9af80adc00278627 (patch) | |
tree | 167fa2a4e4e640b3a63ec56671f713f7160bd9c9 | |
parent | 944c63e6f26d1f05ba6f63c60f510d3796872f3e (diff) | |
download | fork-ledger-cb751913ef85305f2f13cd3a9af80adc00278627.tar.gz fork-ledger-cb751913ef85305f2f13cd3a9af80adc00278627.tar.bz2 fork-ledger-cb751913ef85305f2f13cd3a9af80adc00278627.zip |
Fixed a minor bug in handling of automated xacts
There was a if statement with an inverse boolean meaning, which caused
some automated transaction postings to have a null amount.
-rw-r--r-- | src/xact.cc | 2 | ||||
-rw-r--r-- | test/baseline/opt-actual.test | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/xact.cc b/src/xact.cc index f62f8c09..1b08c667 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -367,7 +367,7 @@ void auto_xact_t::extend_xact(xact_base_t& xact, bool post_handler) amount_t amt; assert(post->amount); if (! post->amount.commodity()) { - if (! post_handler) + if (post_handler) continue; assert(initial_post->amount); amt = initial_post->amount * post->amount; diff --git a/test/baseline/opt-actual.test b/test/baseline/opt-actual.test index 3b08e9b9..1d9ddc89 100644 --- a/test/baseline/opt-actual.test +++ b/test/baseline/opt-actual.test @@ -2,6 +2,7 @@ print --actual <<< = account =~ /Books/ Expenses:Taxes 0.05 + Assets:Checking -0.05 2008/01/01 January Expenses:Books $10.00 |