From 85e8f861b0e39d762f37f542e5592c1e18758d44 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Wed, 25 Oct 2023 09:20:19 +0200 Subject: [PATCH] Fix select sedi azienda --- modules/anagrafiche/ajax/select.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/anagrafiche/ajax/select.php b/modules/anagrafiche/ajax/select.php index ea4974681..f968f4c72 100755 --- a/modules/anagrafiche/ajax/select.php +++ b/modules/anagrafiche/ajax/select.php @@ -362,7 +362,7 @@ switch ($resource) { $user = Auth::user(); $id_azienda = setting('Azienda predefinita'); - $query = "SELECT * FROM (SELECT '0' AS id, CONCAT_WS(' - ', \"".tr('Sede legale')."\" , (SELECT CONCAT (citta, IF(indirizzo!='',CONCAT(' (', indirizzo, ')'), ''),' (', ragione_sociale,')') FROM an_anagrafiche |where|)) AS descrizione UNION SELECT id, CONCAT_WS(' - ', nomesede, CONCAT(citta, IF(indirizzo!='',CONCAT(' (', indirizzo, ')'), '')) ) FROM an_sedi |where|) AS tab |filter| ORDER BY descrizione"; + $query = "SELECT * FROM (SELECT '0' AS id, 'Sede legale' AS nomesede, CONCAT_WS(' - ', \"".tr('Sede legale')."\" , (SELECT CONCAT (citta, IF(indirizzo!='',CONCAT(' (', indirizzo, ')'), ''),' (', ragione_sociale,')') FROM an_anagrafiche |where|)) AS descrizione UNION SELECT id, nomesede, CONCAT_WS(' - ', nomesede, CONCAT(citta, IF(indirizzo!='',CONCAT(' (', indirizzo, ')'), '')) ) FROM an_sedi |where|) AS tab |filter| ORDER BY descrizione"; foreach ($elements as $element) { $filter[] = 'id='.prepare($element);