diff options
author | John Wiegley <johnw@newartisans.com> | 2010-02-05 05:35:14 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-02-05 05:35:14 -0500 |
commit | 547137096051ab985dca6f8e5c7be191b62ccb0c (patch) | |
tree | 2f3a39c4b71b8cb8b232502401e8dd2c8c2247ef /src/report.h | |
parent | c6873d32aa121289e87be7eb16ff531c6d468d2a (diff) | |
parent | 69da18cd303b10f9badd542141ffdfd546009508 (diff) | |
download | ledger-547137096051ab985dca6f8e5c7be191b62ccb0c.tar.gz ledger-547137096051ab985dca6f8e5c7be191b62ccb0c.tar.bz2 ledger-547137096051ab985dca6f8e5c7be191b62ccb0c.zip |
Merge branch 'next'
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/report.h b/src/report.h index 94d39215..08819e23 100644 --- a/src/report.h +++ b/src/report.h @@ -273,6 +273,7 @@ public: HANDLER(pending).report(out); HANDLER(percent).report(out); HANDLER(period_).report(out); + HANDLER(pivot_).report(out); HANDLER(plot_amount_format_).report(out); HANDLER(plot_total_format_).report(out); HANDLER(prepend_format_).report(out); @@ -362,7 +363,7 @@ public: OPTION_(report_t, average, DO() { // -A parent->HANDLER(display_total_) - .set_expr(string("--average"), "total_expr/count"); + .set_expr(string("--average"), "count>0?(total_expr/count):0"); }); OPTION__(report_t, balance_format_, CTOR(report_t, balance_format_) { @@ -715,6 +716,8 @@ public: string_value(text.as_string() + " " + str())); }); + OPTION(report_t, pivot_); + OPTION__(report_t, plot_amount_format_, CTOR(report_t, plot_amount_format_) { on(none, "%(format_date(date, \"%Y-%m-%d\")) %(quantity(scrub(display_amount)))\n"); |