summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-14 17:14:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-14 17:14:56 -0400
commitf3bedb88b24ae8b2047ad86e57b161265c2812f5 (patch)
treee6e5954f40a09e7fd002f242523c1eb0f318b397 /src/xact.cc
parent0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582 (diff)
parent63b4bdaecff5a865bff22e8e7914bef6ab46fa6b (diff)
downloadfork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.tar.gz
fork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.tar.bz2
fork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.zip
Merge branch 'next'
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 1188fd0f..d8ed3f8b 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -509,7 +509,7 @@ namespace {
foreach (post_t * p, post.xact->posts) {
bind_scope_t bound_scope(args, *p);
- if (expr->calc(bound_scope).to_boolean())
+ if (expr->calc(bound_scope, args.locus, args.depth).to_boolean())
return true;
}
return false;
@@ -522,7 +522,7 @@ namespace {
foreach (post_t * p, post.xact->posts) {
bind_scope_t bound_scope(args, *p);
- if (! expr->calc(bound_scope).to_boolean())
+ if (! expr->calc(bound_scope, args.locus, args.depth).to_boolean())
return false;
}
return true;
@@ -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) {
@@ -694,9 +691,9 @@ void auto_xact_t::extend_xact(xact_base_t& xact,
else if (! pair.first.calc(bound_scope).to_boolean()) {
if (pair.second == auto_xact_t::EXPR_ASSERTION) {
throw_(parse_error,
- _("Transaction assertion failed: %1" << pair.first));
+ _("Transaction assertion failed: %1") << pair.first);
} else {
- warning_(_("Transaction check failed: %1" << pair.first));
+ warning_(_("Transaction check failed: %1") << pair.first);
}
}
}
@@ -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);
}
}
}