From d258b212672dabf8b25ec9716522ac787a8a3924 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Thu, 23 Nov 2023 14:17:05 +0100 Subject: [PATCH] Order members alphabetically by the fields defining the name --- admin/_facture_common.php | 2 +- admin/_inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/_facture_common.php b/admin/_facture_common.php index 2daeca1..c0d781b 100644 --- a/admin/_facture_common.php +++ b/admin/_facture_common.php @@ -292,7 +292,7 @@ $tpl->assign('date', $date->format('d/m/Y')); $tpl->assign(compact('liste', 'radio', 'step', 'designations', 'prix', 'from_user', 'identite', 'csrf_key', 'doc')); -$tpl->assign('users', $db->getAssoc('SELECT id, '.$identite.' FROM users WHERE id_category != -2 NOT IN (SELECT id FROM users_categories WHERE hidden = 1);')); +$tpl->assign('users', $db->getAssoc('SELECT id, '.$identite.' FROM users WHERE id_category != -2 NOT IN (SELECT id FROM users_categories WHERE hidden = 1) ORDER BY ' .$identite. ';')); $tpl->assign('clients', $db->getAssoc('SELECT id, nom FROM plugin_facturation_clients;')); $tpl->assign('require_number', $require_number); $tpl->assign('number_pattern', PATTERNS_LIST[$plugin->getConfig('pattern')]); diff --git a/admin/_inc.php b/admin/_inc.php index 25c365b..582e462 100644 --- a/admin/_inc.php +++ b/admin/_inc.php @@ -29,7 +29,7 @@ $tpl->assign('www_url', \Paheko\WWW_URL); $tpl->assign('f_obj', $facture); -$identite = implode( '', \Paheko\Users\DynamicFields::getNameFields()); +$identite = implode(',', \Paheko\Users\DynamicFields::getNameFields()); $tpl->register_function('money_fac', function (array $params) {