diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-12 21:39:28 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 01:03:48 -0400 |
commit | 8d2fce1ae8a1b8c3cce4e22d807421915a0001ce (patch) | |
tree | 6d71920ff303e3a70b6a2ae89b21a8c8e8372913 /src/textual.cc | |
parent | 5ec85538d9690634a2b1ee7c422e109700eb0627 (diff) | |
download | fork-ledger-8d2fce1ae8a1b8c3cce4e22d807421915a0001ce.tar.gz fork-ledger-8d2fce1ae8a1b8c3cce4e22d807421915a0001ce.tar.bz2 fork-ledger-8d2fce1ae8a1b8c3cce4e22d807421915a0001ce.zip |
Automated xacts may now contain "deferred tags"
For example, consider the following automated transaction:
= /Food/
; Next Date:: date + 10
(Expenses:Tax) 1.00
; Next Date:: date + 20
This will add a metadata field named 'Next Date' to the _matching
posting_, with a value that is 10 days later than that posting. It will
also generate a new posting for that transaction, whose amount is the
same as the matching posting. Further, it will add a 'Next Date'
metadata tag to the _generated posting_ whose value is 20 days later
than the date of the matching posting.
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/textual.cc b/src/textual.cc index 2e8b011f..4d133302 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -577,7 +577,7 @@ void instance_t::period_xact_directive(char * line) pe->journal = &context.journal; if (pe->finalize()) { - context.journal.extend_xact(pe.get()); + context.journal.extend_xact(pe.get(), current_year); context.journal.period_xacts.push_back(pe.get()); pe->pos->end_pos = curr_pos; @@ -1254,7 +1254,7 @@ post_t * instance_t::parse_post(char * line, foreach (const state_t& state, context.state_stack) if (state.type() == typeid(string)) post->parse_tags(boost::get<string>(state).c_str(), context.scope, - true); + true, current_year); } TRACE_STOP(post_details, 1); @@ -1426,7 +1426,7 @@ xact_t * instance_t::parse_xact(char * line, foreach (const state_t& state, context.state_stack) if (state.type() == typeid(string)) xact->parse_tags(boost::get<string>(state).c_str(), context.scope, - false); + false, current_year); } TRACE_STOP(xact_details, 1); |