summaryrefslogtreecommitdiff
path: root/src/chain.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-16 18:11:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-16 18:11:23 -0400
commit15bfeb3cb1d04657d9fc7dc6120e5c460dc0db2b (patch)
treefa1075c7f7ac4709ac2cb8c4b82f22697159119d /src/chain.cc
parent053ecc9366e9b7875ccb10edbff0b8c357cb0c38 (diff)
downloadfork-ledger-15bfeb3cb1d04657d9fc7dc6120e5c460dc0db2b.tar.gz
fork-ledger-15bfeb3cb1d04657d9fc7dc6120e5c460dc0db2b.tar.bz2
fork-ledger-15bfeb3cb1d04657d9fc7dc6120e5c460dc0db2b.zip
Added several new reporting options
To help with gathering specific reports: - --payee-as-account copies the entry's payee field to the account, allowing the subtotal report to show unique payees for each period. - --comm-as-account copies the transaction's amount's commodity to the account. - --code-as-account copies the entry's code to the account Also created aliases for some of these options, for conistency's sake: - --commodity-as-payee is now an alias for --comm-as-payee - --commodity-as-account is now an alias for --comm-as-account
Diffstat (limited to 'src/chain.cc')
-rw-r--r--src/chain.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chain.cc b/src/chain.cc
index aa5ef0ab..64881c6f 100644
--- a/src/chain.cc
+++ b/src/chain.cc
@@ -199,6 +199,12 @@ xact_handler_ptr chain_xact_handlers(report_t& report,
handler.reset(new set_comm_as_payee(handler));
else if (report.HANDLED(code_as_payee))
handler.reset(new set_code_as_payee(handler));
+ else if (report.HANDLED(payee_as_account))
+ handler.reset(new set_payee_as_account(handler, report.session.master.get()));
+ else if (report.HANDLED(comm_as_account))
+ handler.reset(new set_comm_as_account(handler, report.session.master.get()));
+ else if (report.HANDLED(code_as_account))
+ handler.reset(new set_code_as_account(handler, report.session.master.get()));
return handler;
}