From 996e9027fa72236b9f19d3f0f7322294a2b758a1 Mon Sep 17 00:00:00 2001 From: valentina Date: Fri, 22 Nov 2024 12:36:05 +0100 Subject: [PATCH] fix: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 52b867a13..dafbb6051 100755 --- a/modules/anagrafiche/ajax/select.php +++ b/modules/anagrafiche/ajax/select.php @@ -389,7 +389,7 @@ switch ($resource) { $user = Auth::user(); $id_azienda = setting('Azienda predefinita'); - $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`) 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"; $where[] = '`idanagrafica`='.prepare($id_azienda);