diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-06 02:38:46 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-06 02:39:30 -0500 |
commit | a05d39b7226a7a383dc30132a2fac2bbd30a54ec (patch) | |
tree | b8a91ddd64b1c7c43612f341bff62530aa986003 /src/chain.cc | |
parent | 05d0f1a17f9f4a9d659274d91dfb164055453637 (diff) | |
download | fork-ledger-a05d39b7226a7a383dc30132a2fac2bbd30a54ec.tar.gz fork-ledger-a05d39b7226a7a383dc30132a2fac2bbd30a54ec.tar.bz2 fork-ledger-a05d39b7226a7a383dc30132a2fac2bbd30a54ec.zip |
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.
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 39 |
1 files changed, 4 insertions, 35 deletions
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; } |