diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-11 14:45:14 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-11 14:45:14 -0500 |
commit | a034435c4287aba7fd32ed63a745e560350c924a (patch) | |
tree | f0acb080410a32c215c2c1938811cc14d512b580 /src/report.h | |
parent | 5ffa987daf4d97c52066e4c28733d826d3726297 (diff) | |
parent | f0f1b0cdfa3a0a73695eda52b25de71bd40adc5a (diff) | |
download | fork-ledger-a034435c4287aba7fd32ed63a745e560350c924a.tar.gz fork-ledger-a034435c4287aba7fd32ed63a745e560350c924a.tar.bz2 fork-ledger-a034435c4287aba7fd32ed63a745e560350c924a.zip |
Merge branch 'next'
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/report.h b/src/report.h index 38b2b07e..e27abbf9 100644 --- a/src/report.h +++ b/src/report.h @@ -143,6 +143,7 @@ public: value_t fn_rounded(call_scope_t& scope); value_t fn_unrounded(call_scope_t& scope); value_t fn_truncated(call_scope_t& scope); + value_t fn_floor(call_scope_t& scope); value_t fn_abs(call_scope_t& scope); value_t fn_justify(call_scope_t& scope); value_t fn_quoted(call_scope_t& scope); @@ -172,6 +173,12 @@ public: return option.str(); } + optional<string> maybe_format(option_t<report_t>& option) { + if (option) + return option.str(); + return none; + } + value_t reload_command(call_scope_t&); value_t echo_command(call_scope_t& scope); @@ -183,8 +190,6 @@ public: HANDLED(lots_actual)); } - bool maybe_import(const string& module); - void report_options(std::ostream& out) { HANDLER(abbrev_len_).report(out); @@ -254,6 +259,7 @@ public: HANDLER(period_).report(out); HANDLER(plot_amount_format_).report(out); HANDLER(plot_total_format_).report(out); + HANDLER(prepend_format_).report(out); HANDLER(price).report(out); HANDLER(prices_format_).report(out); HANDLER(pricesdb_format_).report(out); @@ -695,6 +701,8 @@ public: "%(format_date(date, \"%Y-%m-%d\")) %(quantity(scrub(display_total)))\n"); }); + OPTION(report_t, prepend_format_); + OPTION_(report_t, price, DO() { // -I parent->HANDLER(display_amount_) .set_expr(string("--price"), "price(amount_expr)"); |