mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-25 15:22:24 +01:00
Fix select sedi azienda
This commit is contained in:
parent
6db962f068
commit
85e8f861b0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user