summaryrefslogtreecommitdiff
path: root/src/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-13 15:04:53 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 15:04:53 -0400
commit0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582 (patch)
tree985c50c080c077fa931ed9bf01c3895cbb851eda /src/journal.cc
parent40f553228f5a28034c6635fdcb4c86af28a385ed (diff)
parentcf0147fcd04fc7ec4b3849350430e47169581e64 (diff)
downloadfork-ledger-0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582.tar.gz
fork-ledger-0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582.tar.bz2
fork-ledger-0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582.zip
Merge branch 'next'
Diffstat (limited to 'src/journal.cc')
-rw-r--r--src/journal.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/journal.cc b/src/journal.cc
index fd6d3eac..ed1e26be 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -105,7 +105,8 @@ account_t * journal_t::find_account_re(const string& regexp)
return master->find_account_re(regexp);
}
-bool journal_t::add_xact(xact_t * xact)
+bool journal_t::add_xact(xact_t * xact,
+ optional<date_t::year_type> current_year)
{
xact->journal = this;
@@ -114,16 +115,17 @@ bool journal_t::add_xact(xact_t * xact)
return false;
}
- extend_xact(xact);
+ extend_xact(xact, current_year);
xacts.push_back(xact);
return true;
}
-void journal_t::extend_xact(xact_base_t * xact)
+void journal_t::extend_xact(xact_base_t * xact,
+ optional<date_t::year_type> current_year)
{
foreach (auto_xact_t * auto_xact, auto_xacts)
- auto_xact->extend_xact(*xact);
+ auto_xact->extend_xact(*xact, current_year);
}
bool journal_t::remove_xact(xact_t * xact)