diff options
author | John Wiegley <johnw@newartisans.com> | 2009-06-26 17:09:34 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-06-26 17:15:35 +0100 |
commit | 2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce (patch) | |
tree | 5225fc7f164feed6a0af36f552b9fa713a3d8840 /src/report.h | |
parent | 4574c30fcfd3b03bab9a368a6ff2928af7e11e28 (diff) | |
download | fork-ledger-2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce.tar.gz fork-ledger-2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce.tar.bz2 fork-ledger-2ef1934bb0dbcd08dfe8d4dc68bfd1509c8f51ce.zip |
Restored --price option, added baseline test
This option reports only in terms of the annotated price of the
commodities involved, otherwise it reports the amounts themselves. It
can be used in conjunction with other reports, as it applies to the
displayed amounts, not the actual amounts being calculated.
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/report.h b/src/report.h index 6f442b5d..71dc4ca2 100644 --- a/src/report.h +++ b/src/report.h @@ -158,6 +158,7 @@ public: value_t fn_format_date(call_scope_t& scope); value_t fn_ansify_if(call_scope_t& scope); value_t fn_percent(call_scope_t& scope); + value_t fn_price(call_scope_t& scope); value_t fn_now(call_scope_t&) { return terminus; @@ -613,8 +614,10 @@ public: }); OPTION_(report_t, price, DO() { // -I - parent->HANDLER(revalued).off(); - parent->HANDLER(amount_).set_expr(string("--price"), "price"); + parent->HANDLER(display_amount_) + .set_expr(string("--price"), "price(amount_expr)"); + parent->HANDLER(display_total_) + .set_expr(string("--price"), "price(total_expr)"); }); OPTION__(report_t, prices_format_, CTOR(report_t, prices_format_) { |