summaryrefslogtreecommitdiff
path: root/src/py_journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-11 03:41:59 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-11 04:22:37 -0500
commite8ea2d4938fcbb0988fd1e2021d97a519c67ffd8 (patch)
tree3aadd6947972d1b802f89b90db683994071b134c /src/py_journal.cc
parentafe87280e091d4f094f068c5f21aecccd2d1831b (diff)
downloadfork-ledger-e8ea2d4938fcbb0988fd1e2021d97a519c67ffd8.tar.gz
fork-ledger-e8ea2d4938fcbb0988fd1e2021d97a519c67ffd8.tar.bz2
fork-ledger-e8ea2d4938fcbb0988fd1e2021d97a519c67ffd8.zip
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.
Diffstat (limited to 'src/py_journal.cc')
-rw-r--r--src/py_journal.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/py_journal.cc b/src/py_journal.cc
index 17c42c21..88447b92 100644
--- a/src/py_journal.cc
+++ b/src/py_journal.cc
@@ -136,8 +136,8 @@ namespace {
py_xact_finalizer_t(object obj) : pyobj(obj) {}
py_xact_finalizer_t(const py_xact_finalizer_t& other)
: pyobj(other.pyobj) {}
- virtual bool operator()(xact_t& xact, bool post) {
- return call<bool>(pyobj.ptr(), xact, post);
+ virtual bool operator()(xact_t& xact) {
+ return call<bool>(pyobj.ptr(), xact);
}
};
@@ -161,9 +161,9 @@ namespace {
}
}
- void py_run_xact_finalizers(journal_t& journal, xact_t& xact, bool post)
+ void py_run_xact_finalizers(journal_t& journal, xact_t& xact)
{
- journal.xact_finalize_hooks.run_hooks(xact, post);
+ journal.xact_finalize_hooks.run_hooks(xact);
}
std::size_t py_read(journal_t& journal, const string& pathname)