summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-14 03:18:32 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-14 03:23:09 -0400
commitdcffd218a1e90ee9a1cdd295c0a3015edc395448 (patch)
tree5957423c9ef3d629461f413e163917626c300c9d /src/xact.cc
parente2fa8c6145679231cda5ad6b6e7440f6f16e654a (diff)
downloadfork-ledger-dcffd218a1e90ee9a1cdd295c0a3015edc395448.tar.gz
fork-ledger-dcffd218a1e90ee9a1cdd295c0a3015edc395448.tar.bz2
fork-ledger-dcffd218a1e90ee9a1cdd295c0a3015edc395448.zip
Revised how Ledger handles the "current year"
Now when the Y directive sets the current year for a region, it affects everything, as if the clock really were set back to that year.
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/xact.cc b/src/xact.cc
index a0b9ef37..d8ed3f8b 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -629,8 +629,7 @@ namespace {
} // unnamed namespace
-void auto_xact_t::extend_xact(xact_base_t& xact,
- optional<date_t::year_type> current_year)
+void auto_xact_t::extend_xact(xact_base_t& xact)
{
posts_list initial_posts(xact.posts.begin(), xact.posts.end());
@@ -680,10 +679,8 @@ void auto_xact_t::extend_xact(xact_base_t& xact,
if (deferred_notes) {
foreach (deferred_tag_data_t& data, *deferred_notes) {
if (data.apply_to_post == NULL)
- initial_post->parse_tags(data.tag_data.c_str(),
- bound_scope,
- data.overwrite_existing,
- current_year);
+ initial_post->parse_tags(data.tag_data.c_str(), bound_scope,
+ data.overwrite_existing);
}
}
if (check_exprs) {
@@ -778,10 +775,8 @@ void auto_xact_t::extend_xact(xact_base_t& xact,
if (deferred_notes) {
foreach (deferred_tag_data_t& data, *deferred_notes) {
if (data.apply_to_post == post)
- new_post->parse_tags(data.tag_data.c_str(),
- bound_scope,
- data.overwrite_existing,
- current_year);
+ new_post->parse_tags(data.tag_data.c_str(), bound_scope,
+ data.overwrite_existing);
}
}
}