summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-25 00:05:22 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-25 00:05:22 -0500
commit98ea23cd59cf959f3561632cc38043ab2d89f164 (patch)
tree18157b0191c83dcec9042c5ebfb4a70e48893169 /src/filters.cc
parentf01fa1a5131c287a4efe2708ffe3c9bc57b79468 (diff)
parentf81b563339598a6075fa5c9ec6cb61bbffc9ba38 (diff)
downloadfork-ledger-98ea23cd59cf959f3561632cc38043ab2d89f164.tar.gz
fork-ledger-98ea23cd59cf959f3561632cc38043ab2d89f164.tar.bz2
fork-ledger-98ea23cd59cf959f3561632cc38043ab2d89f164.zip
Merge branch 'next'
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 39097c58..0084fac7 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -430,12 +430,22 @@ changed_value_posts::changed_value_posts(post_handler_ptr handler,
display_total_expr = report.HANDLER(display_total_).expr;
changed_values_only = report.HANDLED(revalued_only);
+ string gains_equity_account_name;
+ if (report.HANDLED(unrealized_gains_))
+ gains_equity_account_name = report.HANDLER(unrealized_gains_).str();
+ else
+ gains_equity_account_name = _("Equity:Unrealized Gains");
gains_equity_account =
- report.session.journal->master->find_account(_("Equity:Unrealized Gains"));
+ report.session.journal->master->find_account(gains_equity_account_name);
gains_equity_account->add_flags(ACCOUNT_GENERATED);
+ string losses_equity_account_name;
+ if (report.HANDLED(unrealized_losses_))
+ losses_equity_account_name = report.HANDLER(unrealized_losses_).str();
+ else
+ losses_equity_account_name = _("Equity:Unrealized Losses");
losses_equity_account =
- report.session.journal->master->find_account(_("Equity:Unrealized Losses"));
+ report.session.journal->master->find_account(losses_equity_account_name);
losses_equity_account->add_flags(ACCOUNT_GENERATED);
}