From e8ea2d4938fcbb0988fd1e2021d97a519c67ffd8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 11 Nov 2009 03:41:59 -0500 Subject: Automated postings defer amount expression calculation This allows for value expressions to be used which reference the incoming posting, for example: = Income:Clients: (Liabilities:Taxes:VAT1) (floor(amount) * 1) (Liabilities:Taxes:VAT2) 0.19 2009/07/27 * Invoice Assets:Bank:Checking $1,190.45 Income:Clients:ACME_Inc The automated posting for VAT1 will use the floored amount multiplied by a factor, while the posting for VAT2 multiples the whole amount as before. --- src/journal.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/journal.cc') diff --git a/src/journal.cc b/src/journal.cc index 550b4f4c..b7ad9a23 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -126,9 +126,7 @@ bool journal_t::add_xact(xact_t * xact) { xact->journal = this; - if (! xact_finalize_hooks.run_hooks(*xact, false) || - ! xact->finalize() || - ! xact_finalize_hooks.run_hooks(*xact, true)) { + if (! xact->finalize() || ! xact_finalize_hooks.run_hooks(*xact)) { xact->journal = NULL; return false; } -- cgit v1.2.3