fix bug. increasing == ASC

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6640 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas
2002-01-23 12:24:51 +00:00
parent 7c0d00b623
commit 566e52044c

View File

@@ -98,11 +98,19 @@ sql_sort_order (char *p, sort_type_t sort_type, gboolean increasing)
case BY_STANDARD:
if (TRUE == increasing)
{
p = stpcpy (p, "gncTransaction.date_posted DESC, gncTransaction.num DESC, "
"gncTransaction.date_entered DESC, gncTransaction.description");
} else {
p = stpcpy (p, "gncTransaction.date_posted ASC, gncTransaction.num ASC, "
"gncTransaction.date_entered ASC, gncTransaction.description");
p = stpcpy (p,
"gncTransaction.date_posted ASC, "
"gncTransaction.num ASC, "
"gncTransaction.date_entered ASC, "
"gncTransaction.description");
}
else
{
p = stpcpy (p,
"gncTransaction.date_posted DESC, "
"gncTransaction.num DESC, "
"gncTransaction.date_entered DESC, "
"gncTransaction.description");
}
break;
case BY_DATE:
@@ -173,11 +181,11 @@ sql_sort_order (char *p, sort_type_t sort_type, gboolean increasing)
if (TRUE == increasing)
{
p = stpcpy (p, " DESC ");
p = stpcpy (p, " ASC ");
}
else
{
p = stpcpy (p, " ASC ");
p = stpcpy (p, " DESC ");
}
return p;