From 151a8d87ee299b54da262346471aa71a729a6eb2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 26 Oct 2009 18:52:26 -0400 Subject: Fixed sorting in bal reports when --flat is used Note that sorting on the "total" is not the same thing as sorting on the "display_total" when multiple commodities are in use and the -X flag is selected! One should always sort on display_total, since that's the value which is shown in the report. 'T' is a synonym for display_total. --- src/compare.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/compare.h') diff --git a/src/compare.h b/src/compare.h index e1207bc3..c0a72327 100644 --- a/src/compare.h +++ b/src/compare.h @@ -53,6 +53,9 @@ namespace ledger { class post_t; class account_t; +void push_sort_value(std::list& sort_values, + expr_t::ptr_op_t node, scope_t& scope); + /** * @brief Brief * @@ -76,7 +79,9 @@ public: TRACE_DTOR(compare_items); } - void find_sort_values(std::list& sort_values, T * scope); + void find_sort_values(std::list& sort_values, scope_t& scope) { + push_sort_value(sort_values, sort_order.get_op(), scope); + } bool operator()(T * left, T * right); }; -- cgit v1.2.3