summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2019-07-05 13:31:18 -0700
committerGitHub <noreply@github.com>2019-07-05 13:31:18 -0700
commit2ac86f5dfeda2cb5fd8d948cc4a75a2ce2d45025 (patch)
tree590fd3181804d0380aee174e005eb89dba8fe1fd /src
parentc4eab0007a788703bc63db82fd995ef646820529 (diff)
parentbb78c6e059a191814dcea1a31f97d40208248b97 (diff)
downloadfork-ledger-2ac86f5dfeda2cb5fd8d948cc4a75a2ce2d45025.tar.gz
fork-ledger-2ac86f5dfeda2cb5fd8d948cc4a75a2ce2d45025.tar.bz2
fork-ledger-2ac86f5dfeda2cb5fd8d948cc4a75a2ce2d45025.zip
Change --invert to invert displayed amounts and totals, not amo… (#1804)
Change --invert to invert displayed amounts and totals, not amounts
Diffstat (limited to 'src')
-rw-r--r--src/filters.cc9
-rw-r--r--src/report.h3
2 files changed, 2 insertions, 10 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 8daf6700..98288880 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -894,16 +894,7 @@ void subtotal_posts::operator()(post_t& post)
account_t * acct = post.reported_account();
assert(acct);
-#if 0
- // jww (2012-04-06): The problem with doing this early is that
- // fn_display_amount will recalculate this again. For example, if you
- // use --invert, it will invert both here and in the display amount,
- // effectively negating it.
- bind_scope_t bound_scope(*amount_expr.get_context(), post);
- value_t amount(amount_expr.calc(bound_scope));
-#else
value_t amount(post.amount);
-#endif
post.xdata().compound_value = amount;
post.xdata().add_flags(POST_EXT_COMPOUND);
diff --git a/src/report.h b/src/report.h
index 1bda0407..7775e21d 100644
--- a/src/report.h
+++ b/src/report.h
@@ -732,7 +732,8 @@ public:
OPTION(report_t, inject_);
OPTION_(report_t, invert, DO() {
- OTHER(amount_).on(whence, "-amount_expr");
+ OTHER(display_amount_).on(whence, "-display_amount");
+ OTHER(display_total_).on(whence, "-display_total");
});
OPTION_