summaryrefslogtreecommitdiff
path: root/src/compare.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-26 18:52:26 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-26 18:52:26 -0400
commit151a8d87ee299b54da262346471aa71a729a6eb2 (patch)
treee2151c34eb1a2756e5e4324465ebf629ef4859e6 /src/compare.h
parentd85a415bc5119d4271ca7355fe3e0ce3951c0d23 (diff)
downloadfork-ledger-151a8d87ee299b54da262346471aa71a729a6eb2.tar.gz
fork-ledger-151a8d87ee299b54da262346471aa71a729a6eb2.tar.bz2
fork-ledger-151a8d87ee299b54da262346471aa71a729a6eb2.zip
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.
Diffstat (limited to 'src/compare.h')
-rw-r--r--src/compare.h7
1 files changed, 6 insertions, 1 deletions
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_value_t>& 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_value_t>& sort_values, T * scope);
+ void find_sort_values(std::list<sort_value_t>& sort_values, scope_t& scope) {
+ push_sort_value(sort_values, sort_order.get_op(), scope);
+ }
bool operator()(T * left, T * right);
};