summaryrefslogtreecommitdiff
path: root/src/journal.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-12 21:39:28 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 01:03:48 -0400
commit8d2fce1ae8a1b8c3cce4e22d807421915a0001ce (patch)
tree6d71920ff303e3a70b6a2ae89b21a8c8e8372913 /src/journal.h
parent5ec85538d9690634a2b1ee7c422e109700eb0627 (diff)
downloadfork-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/journal.h')
-rw-r--r--src/journal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/journal.h b/src/journal.h
index ca6b6e4f..183d074d 100644
--- a/src/journal.h
+++ b/src/journal.h
@@ -140,8 +140,10 @@ public:
account_t * find_account(const string& name, bool auto_create = true);
account_t * find_account_re(const string& regexp);
- bool add_xact(xact_t * xact);
- void extend_xact(xact_base_t * xact);
+ bool add_xact(xact_t * xact,
+ optional<date_t::year_type> current_year = none);
+ void extend_xact(xact_base_t * xact,
+ optional<date_t::year_type> current_year = none);
bool remove_xact(xact_t * xact);
xacts_list::iterator xacts_begin() {