From a05d39b7226a7a383dc30132a2fac2bbd30a54ec Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 6 Nov 2009 02:38:46 -0500 Subject: Renamed --set-reported-account to just --account This fits better with the --amount and --total options, which both change the amount and total used for calculation. Same with --account: it happens after filtering, but before calculation so that balance reports look as you'd expect. --- src/chain.cc | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'src/chain.cc') diff --git a/src/chain.cc b/src/chain.cc index defa2e97..4a3a2343 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -159,15 +159,15 @@ post_handler_ptr chain_post_handlers(report_t& report, handler.reset(new sort_posts(handler, "date")); } - if (report.HANDLED(set_reported_account_)) + if (report.HANDLED(account_)) handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, report.session.journal->master, - report.HANDLER(set_reported_account_).str(), + report.HANDLER(account_).str(), report)); - else if (report.HANDLED(set_reported_payee_)) + if (report.HANDLED(payee_)) handler.reset(new transfer_details(handler, transfer_details::SET_PAYEE, report.session.journal->master, - report.HANDLER(set_reported_payee_).str(), + report.HANDLER(payee_).str(), report)); // related_posts will pass along all posts related to the post received. If @@ -236,37 +236,6 @@ post_handler_ptr chain_post_handlers(report_t& report, report)); } - if (report.HANDLED(set_account_)) - handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, - report.session.journal->master, - report.HANDLER(set_account_).str(), - report)); - else if (report.HANDLED(set_payee_)) - handler.reset(new transfer_details(handler, transfer_details::SET_PAYEE, - report.session.journal->master, - report.HANDLER(set_payee_).str(), - report)); - else if (report.HANDLED(comm_as_payee)) - handler.reset(new transfer_details(handler, transfer_details::SET_PAYEE, - report.session.journal->master, - expr_t("commodity"), report)); - else if (report.HANDLED(code_as_payee)) - handler.reset(new transfer_details(handler, transfer_details::SET_PAYEE, - report.session.journal->master, - expr_t("code"), report)); - else if (report.HANDLED(payee_as_account)) - handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, - report.session.journal->master, - expr_t("payee"), report)); - else if (report.HANDLED(comm_as_account)) - handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, - report.session.journal->master, - expr_t("commodity"), report)); - else if (report.HANDLED(code_as_account)) - handler.reset(new transfer_details(handler, transfer_details::SET_ACCOUNT, - report.session.journal->master, - expr_t("code"), report)); - return handler; } -- cgit v1.2.3