mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
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:
parent
a39583c860
commit
ae30067f56
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user