Set sort order for GncEntry quickfill to LIFO by-date.

Previously, the insertion order was random instead of by-date.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20051 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2011-01-10 20:12:39 +00:00
parent a39583c860
commit ae30067f56

View File

@ -104,9 +104,17 @@ static void entry_cb(gpointer data, gpointer user_data)
* current book. */
static QofQuery *new_query_for_entrys(QofBook *book)
{
GSList *primary_sort_params = NULL;
QofQuery *query = qof_query_create_for (GNC_ID_ENTRY);
g_assert(book);
qof_query_set_book (query, book);
/* Set the sort order: By DATE_ENTERED, increasing, and returning
* only one single resulting item. */
primary_sort_params = qof_query_build_param_list(ENTRY_DATE_ENTERED, NULL);
qof_query_set_sort_order (query, primary_sort_params, NULL, NULL);
qof_query_set_sort_increasing (query, TRUE, TRUE, TRUE);
return query;
}