From caa2452d5029f162dbdc8988137b447365ea4de8 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 21 Mar 2019 11:47:05 +0100 Subject: [PATCH] Migliorato ordinamento nazioni --- modules/anagrafiche/add.php | 2 +- modules/anagrafiche/edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/anagrafiche/add.php b/modules/anagrafiche/add.php index 889002e52..383b30c76 100644 --- a/modules/anagrafiche/add.php +++ b/modules/anagrafiche/add.php @@ -83,7 +83,7 @@ echo '
- {[ "type": "select", "label": "'.tr('Nazione').'", "name": "id_nazione", "values": "query=SELECT id AS id, CONCAT_WS(\' - \', iso2, nome) AS descrizione FROM an_nazioni ORDER BY nome ASC" ]} + {[ "type": "select", "label": "'.tr('Nazione').'", "name": "id_nazione", "values": "query=SELECT id AS id, CONCAT_WS(\' - \', iso2, nome) AS descrizione FROM an_nazioni ORDER BY CASE WHEN iso2=\'IT\' THEN -1 ELSE iso2 END" ]}
diff --git a/modules/anagrafiche/edit.php b/modules/anagrafiche/edit.php index df85044a8..82758cc13 100644 --- a/modules/anagrafiche/edit.php +++ b/modules/anagrafiche/edit.php @@ -151,7 +151,7 @@ if (!$cliente) {
- {[ "type": "select", "label": "", "name": "id_nazione", "values": "query=SELECT id AS id, CONCAT_WS(' - ', iso2, nome) AS descrizione FROM an_nazioni ORDER BY nome ASC", "value": "$id_nazione$" ]} + {[ "type": "select", "label": "", "name": "id_nazione", "values": "query=SELECT id AS id, CONCAT_WS(' - ', iso2, nome) AS descrizione FROM an_nazioni ORDER BY CASE WHEN iso2='IT' THEN -1 ELSE iso2 END", "value": "$id_nazione$" ]}