Fix add hidden option INVOICE_DEFAULT_UNPAYED_SORT_ORDER to be able to

provide backward compatibility with old behaviour.
This commit is contained in:
Laurent Destailleur 2016-02-29 10:22:38 +01:00
parent 4b28dadd6e
commit 21c7aacddb

View File

@ -83,6 +83,7 @@ if ($page == -1) {
$page = 0;
}
$offset = $limit * $page;
if (! $sortorder && ! empty($conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER) && $search_status == 1) $sortorder=$conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER;
if (! $sortorder) $sortorder='DESC';
if (! $sortfield) $sortfield='f.datef';