From cb751913ef85305f2f13cd3a9af80adc00278627 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 23 Feb 2009 19:20:57 -0400 Subject: 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. --- src/xact.cc | 2 +- test/baseline/opt-actual.test | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3