From 141308597784f77414032b00f239e0601f9d4d38 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 2 Feb 2010 17:07:05 -0500 Subject: Added a --pivot=TAG option This is equivalent to the following: --account='"TAG:" + tag(/TAG/)' --- src/chain.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/chain.cc') diff --git a/src/chain.cc b/src/chain.cc index 113a71d8..ecb39e0b 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -158,11 +158,21 @@ post_handler_ptr chain_post_handlers(report_t& report, report.session.journal->master, report.HANDLER(date_).str(), report)); - if (report.HANDLED(account_)) + + if (report.HANDLED(account_)) { handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, report.session.journal->master, report.HANDLER(account_).str(), report)); + } + else if (report.HANDLED(pivot_)) { + string pivot = report.HANDLER(pivot_).str(); + pivot = string("\"") + pivot + ":\" + tag(/" + pivot + "/)"; + handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, + report.session.journal->master, pivot, + report)); + } + if (report.HANDLED(payee_)) handler.reset(new transfer_details(handler, transfer_details::SET_PAYEE, report.session.journal->master, -- cgit v1.2.3