summaryrefslogtreecommitdiff
path: root/src/journal.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/journal.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/journal.cc')
-rw-r--r--src/journal.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/journal.cc b/src/journal.cc
index ed1e26be..fd6d3eac 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -105,8 +105,7 @@ account_t * journal_t::find_account_re(const string& regexp)
return master->find_account_re(regexp);
}
-bool journal_t::add_xact(xact_t * xact,
- optional<date_t::year_type> current_year)
+bool journal_t::add_xact(xact_t * xact)
{
xact->journal = this;
@@ -115,17 +114,16 @@ bool journal_t::add_xact(xact_t * xact,
return false;
}
- extend_xact(xact, current_year);
+ extend_xact(xact);
xacts.push_back(xact);
return true;
}
-void journal_t::extend_xact(xact_base_t * xact,
- optional<date_t::year_type> current_year)
+void journal_t::extend_xact(xact_base_t * xact)
{
foreach (auto_xact_t * auto_xact, auto_xacts)
- auto_xact->extend_xact(*xact, current_year);
+ auto_xact->extend_xact(*xact);
}
bool journal_t::remove_xact(xact_t * xact)