Fix minore

This commit is contained in:
Pek5892 2024-03-11 17:23:42 +01:00
parent 169df3fc07
commit c7cdee2a67
7 changed files with 31 additions and 37 deletions

View File

@ -212,13 +212,7 @@ echo '
});
</script>';
if ($dbo->isInstalled()) {
try {
$custom_css = html_entity_decode(setting('CSS Personalizzato'));
} catch (QueryException $e) {
}
}
$custom_css = $dbo->isInstalled() ? html_entity_decode(setting('CSS Personalizzato')) : '';
if (!empty($custom_css)) {
echo '
<style>'.$custom_css.'</style>';

View File

@ -106,7 +106,7 @@ function get($param, $raw = false)
*/
function setting($name, $again = false)
{
return Settings::getValue($name);
return Setting::where('name', '=', $name)->first()->valore;
}
/**

View File

@ -58,7 +58,7 @@ class Impostazioni extends AppResource
{
// Gestione della visualizzazione dei dettagli del record
$query = 'SELECT `id` AS id,
`zz_settings_lang`.`name`,
`zz_settings_lang`.`title`,
`valore` AS contenuto,
`tipo`
FROM

View File

@ -103,7 +103,7 @@ class Settings
*/
public static function setValue($setting, $value)
{
$setting = self::get($setting);
$setting = Setting::find($setting);
$value = (is_array($value) ? implode(',', $value) : $value);
// Trasformazioni
@ -155,7 +155,7 @@ class Settings
*/
public static function input($setting, $required = false)
{
$setting = self::get($setting);
$setting = Setting::where('name', '=', $setting)->orWhere('id', '=', $setting)->first();
// Lista predefinita
if (preg_match("/list\[(.+?)\]/", $setting->tipo, $m)) {
@ -170,7 +170,7 @@ class Settings
}
$result = '
{[ "type": "select", "multiple": 0, "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "values": '.json_encode($list).', "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
{[ "type": "select", "multiple": 0, "label": '.json_encode($setting->name).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "values": '.json_encode($list).', "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
}
// Lista multipla
@ -203,26 +203,26 @@ class Settings
}
$result = '
{[ "type": "select", "multiple": 1, "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.'][]", "values": '.json_encode($list).', "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
{[ "type": "select", "multiple": 1, "label": '.json_encode($setting->name).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.'][]", "values": '.json_encode($list).', "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
}
// Lista da query
elseif (preg_match('/^query=(.+?)$/', $setting->tipo, $m)) {
$result = '
{[ "type": "select", "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "values": "'.str_replace('"', '\"', $setting->tipo).'", "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
{[ "type": "select", "label": '.json_encode($setting->name).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "values": "'.str_replace('"', '\"', $setting->tipo).'", "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
}
// Boolean (checkbox)
elseif ($setting->tipo == 'boolean') {
$result = '
{[ "type": "checkbox", "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "placeholder": "'.tr('Attivo').'", "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
{[ "type": "checkbox", "label": '.json_encode($setting->name).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "placeholder": "'.tr('Attivo').'", "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
}
// Editor
elseif ($setting->tipo == 'ckeditor') {
$result = input([
'type' => 'ckeditor',
'label' => json_encode($setting->nome),
'label' => json_encode($setting->title),
'readonly' => !$setting->editable,
'name' => 'setting['.$setting->id.']',
'value' => $setting->valore,
@ -234,18 +234,18 @@ class Settings
// Campi di default
elseif (in_array($setting->tipo, ['textarea', 'timestamp', 'date', 'time'])) {
$result = '
{[ "type": "'.$setting->tipo.'", "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "value": '.json_encode($setting->valore).', "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
{[ "type": "'.$setting->tipo.'", "label": '.json_encode($setting->name).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "value": '.json_encode($setting->valore).', "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
}
// Campo di testo
else {
$numerico = in_array($setting->tipo, ['integer', 'decimal']);
$tipo = preg_match('/password/i', $setting->nome, $m) ? 'password' : $setting->tipo;
$tipo = preg_match('/password/i', $setting->name, $m) ? 'password' : $setting->tipo;
$tipo = $numerico ? 'number' : 'text';
$result = '
{[ "type": "'.$tipo.'", "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "value": "'.$setting->valore.'"'.($numerico && $setting->tipo == 'integer' ? ', "decimals": 0' : '').', "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
{[ "type": "'.$tipo.'", "label": '.json_encode($setting->name).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "value": "'.$setting->valore.'"'.($numerico && $setting->tipo == 'integer' ? ', "decimals": 0' : '').', "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}';
}
return $result;

View File

@ -20,6 +20,8 @@
use Symfony\Component\Filesystem\Exception\IOException;
use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem;
use Models\Cache;
use Models\Setting;
/**
* Classe dedicata alla gestione delle procedure di aggiornamento del database del progetto.
*
@ -420,7 +422,7 @@ class Update
public static function getSettings()
{
$settings = database()->table('zz_settings')->pluck('tipo', 'nome')->toArray();
$settings = Setting::get()->toArray();
return $settings;
}

View File

@ -40,7 +40,7 @@ $cliente = $dbo->fetchOne($queryc);
* @deprecated
*/
$id_azienda = setting('Azienda predefinita');
$azienda = $dbo->fetchOne('SELECT *, (SELECT `iban` FROM `co_banche` WHERE `id` IN (SELECT `id_banca_azienda` FROM `co_documenti` WHERE `id` = '.prepare($id_record).')) AS codiceiban, (SELECT `nome` FROM `co_banche` WHERE `id` IN (SELECT `id_banca_azienda` FROM `co_documenti` WHERE `id` = '.prepare($id_record).')) AS appoggiobancario, (SELECT `bic` FROM `co_banche` WHERE `id` IN (SELECT `id_banca_azienda` FROM `co_documenti` WHERE `id` = '.prepare($id_record).")) AS bic FROM `an_anagrafiche` WHERE `idanagrafica` = ".prepare($id_azienda));
$azienda = $dbo->fetchOne('SELECT *, (SELECT `iban` FROM `co_banche` WHERE `id` IN (SELECT `id_banca_azienda` FROM `co_documenti` WHERE `id` = '.prepare($id_record).')) AS codiceiban, (SELECT `nome` FROM `co_banche` WHERE `id` IN (SELECT `id_banca_azienda` FROM `co_documenti` WHERE `id` = '.prepare($id_record).')) AS appoggiobancario, (SELECT `bic` FROM `co_banche` WHERE `id` IN (SELECT `id_banca_azienda` FROM `co_documenti` WHERE `id` = '.prepare($id_record).")) AS bic FROM `an_anagrafiche` WHERE `idanagrafica` = (SELECT `valore` FROM `zz_settings` WHERE `name`='Azienda predefinita')");
// Prefissi e contenuti del replace
/**

View File

@ -1086,8 +1086,6 @@ ALTER TABLE `fe_regime_fiscale`
ALTER TABLE `fe_regime_fiscale_lang` ADD CONSTRAINT `fe_regime_fiscale_lang_ibfk_1` FOREIGN KEY (`id_record`) REFERENCES `fe_regime_fiscale`(`codice`) ON DELETE CASCADE ON UPDATE RESTRICT;
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `codice` AS id, CONCAT(`codice`, \' - \', `name`)as descrizione FROM fe_regime_fiscale LEFT JOIN `fe_regime_fiscale_lang` ON (`fe_regime_fiscale_lang`.`id_record`=`fe_regime_fiscale`.`codice` AND `fe_regime_fiscale_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `nome` = \'Lingua\'))' WHERE `zz_settings`.`nome` = 'Regime fiscale';
-- Aggiunta tabella fe_stati_documento_lang
CREATE TABLE IF NOT EXISTS `fe_stati_documento_lang` (
`id` int NOT NULL,
@ -2097,7 +2095,7 @@ ALTER TABLE `zz_settings_lang`
ALTER TABLE `zz_settings_lang`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
INSERT INTO `zz_settings_lang` (`id`, `id_lang`, `id_record`, `title`) SELECT NULL, (SELECT `id` FROM `zz_langs` WHERE `iso_code` = 'it'), `id`, `nome`, FROM `zz_settings`;
INSERT INTO `zz_settings_lang` (`id`, `id_lang`, `id_record`, `title`) SELECT NULL, (SELECT `id` FROM `zz_langs` WHERE `iso_code` = 'it'), `id`, `name` FROM `zz_settings`;
ALTER TABLE `zz_settings_lang` ADD CONSTRAINT `zz_settings_lang_ibfk_1` FOREIGN KEY (`id_record`) REFERENCES `zz_settings`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
@ -2108,28 +2106,28 @@ UPDATE `zz_settings` SET `tipo` = 'query=SELECT `in_statiintervento`.`id`, `name
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `in_statiintervento`.`id`, `name` AS text FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Stato dell'attività dopo la firma";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `in_statiintervento`.`id`, `name` AS text FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Stato predefinito dell'attività";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `in_statiintervento`.`id`, `name` AS text FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Stato predefinito dell'attività";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `in_statiintervento`.`id`, `name` AS text FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Stato predefinito dell'attività da Dashboard";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `in_statiintervento`.`id`, `name` AS text FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Stato predefinito dell'attività da Dashboard";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_iva`.`id`, `name` AS text FROM `co_iva` LEFT JOIN `co_iva_lang` ON (`co_iva_lang`.`id_record` = `co_iva`.`id` AND `co_iva_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Iva predefinita";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_iva`.`id`, `name` AS text FROM `co_iva` LEFT JOIN `co_iva_lang` ON (`co_iva_lang`.`id_record` = `co_iva`.`id` AND `co_iva_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Iva predefinita";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_pagamenti`.`id`, `name` AS descrizione FROM `co_pagamenti` LEFT JOIN `co_pagamenti_lang` ON (`co_pagamenti_lang`.`id_record` = `co_pagamenti`.`id` AND `co_pagamenti_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Tipo di pagamento predefinito";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_pagamenti`.`id`, `name` AS descrizione FROM `co_pagamenti` LEFT JOIN `co_pagamenti_lang` ON (`co_pagamenti_lang`.`id_record` = `co_pagamenti`.`id` AND `co_pagamenti_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Tipo di pagamento predefinito";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_iva`.`id`, IF(`codice_natura_fe` IS NULL, IF(`codice` IS NULL, `name`, CONCAT(`codice`, " - ", `name`)), CONCAT( IF(`codice` IS NULL, `name`, CONCAT(`codice`, " - ", `name`)), " (", `codice_natura_fe`, ")" )) AS descrizione FROM `co_iva` LEFT JOIN `co_iva_lang` ON (`co_iva_lang`.`id_record` = `co_iva`.`id` AND `co_iva_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `deleted_at` IS NULL ORDER BY `name` ASC' WHERE `zz_settings`.`name` = "Iva da applicare su marca da bollo";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_iva`.`id`, IF(`codice_natura_fe` IS NULL, IF(`codice` IS NULL, `name`, CONCAT(`codice`, " - ", `name`)), CONCAT( IF(`codice` IS NULL, `name`, CONCAT(`codice`, " - ", `name`)), " (", `codice_natura_fe`, ")" )) AS descrizione FROM `co_iva` LEFT JOIN `co_iva_lang` ON (`co_iva_lang`.`id_record` = `co_iva`.`id` AND `co_iva_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua")) WHERE `deleted_at` IS NULL ORDER BY `name` ASC' WHERE `zz_settings`.`name` = "Iva da applicare su marca da bollo";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_iva`.`id`, CONCAT(`codice`," - ",`name`) AS descrizione FROM `co_iva` LEFT JOIN `co_iva_lang` ON (`co_iva_lang`.`id_record` = `co_iva`.`id` AND `co_iva_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE codice_natura_fe LIKE "N3.%" AND `deleted_at` IS NULL ORDER BY `name` ASC' WHERE `zz_settings`.`name` = "Iva per lettere d'intento";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `co_iva`.`id`, CONCAT(`codice`," - ",`name`) AS descrizione FROM `co_iva` LEFT JOIN `co_iva_lang` ON (`co_iva_lang`.`id_record` = `co_iva`.`id` AND `co_iva_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua")) WHERE codice_natura_fe LIKE "N3.%" AND `deleted_at` IS NULL ORDER BY `name` ASC' WHERE `zz_settings`.`name` = "Iva per lettere d'intento";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_segments`.`id`, `name` AS descrizione FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments_lang`.`id_record` = `zz_segments`.`id` AND `zz_segments_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `id_module` = (SELECT `zz_modules`.`id` FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `name`="Fatture di vendita") ORDER BY `name`' WHERE `zz_settings`.`name` = "Sezionale per autofatture di vendita";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_segments`.`id`, `name` AS descrizione FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments_lang`.`id_record` = `zz_segments`.`id` AND `zz_segments_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `id_module` = (SELECT `zz_modules`.`id` FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua")) WHERE `name`="Fatture di vendita") ORDER BY `name`' WHERE `zz_settings`.`name` = "Sezionale per autofatture di vendita";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_segments`.`id`, `name` AS descrizione FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments_lang`.`id_record` = `zz_segments`.`id` AND `zz_segments_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `id_module` = (SELECT `zz_modules`.`id` FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `name`="Fatture di acquisto") ORDER BY `name`' WHERE `zz_settings`.`name` = "Sezionale per autofatture di acquisto";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_segments`.`id`, `name` AS descrizione FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments_lang`.`id_record` = `zz_segments`.`id` AND `zz_segments_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `id_module` = (SELECT `zz_modules`.`id` FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua")) WHERE `name`="Fatture di acquisto") ORDER BY `name`' WHERE `zz_settings`.`name` = "Sezionale per autofatture di acquisto";
UPDATE `zz_settings` SET `tipo` = 'SELECT `codice` AS id, CONCAT(`codice`, " - ", `name`)as descrizione FROM `fe_regime_fiscale` LEFT JOIN `fe_regime_fiscale_lang` ON (`fe_regime_fiscale_lang`.`id_record`=`fe_regime_fiscale`.`codice` AND `fe_regime_fiscale_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Regime fiscale";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `codice` AS id, CONCAT(`codice`, " - ", `name`)as descrizione FROM `fe_regime_fiscale` LEFT JOIN `fe_regime_fiscale_lang` ON (`fe_regime_fiscale_lang`.`id_record`=`fe_regime_fiscale`.`codice` AND `fe_regime_fiscale_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Regime fiscale";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `an_anagrafiche`.`idanagrafica` AS id, `ragione_sociale` AS descrizione FROM `an_anagrafiche` INNER JOIN `an_tipianagrafiche_anagrafiche` ON `an_anagrafiche`.`idanagrafica` = `an_tipianagrafiche_anagrafiche`.`idanagrafica` WHERE `idtipoanagrafica` = (SELECT `idtipoanagrafica` FROM `an_tipianagrafiche` LEFT JOIN `an_tipianagrafiche_lang` ON (`an_tipianagrafiche_lang`.`id_record` = `an_tipianagrafiche`.`id` AND `an_tipianagrafiche_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `name` = "Fornitore") AND `deleted_at` IS NULL' WHERE `zz_settings`.`name` = "Terzo intermediario";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `an_anagrafiche`.`idanagrafica` AS id, `ragione_sociale` AS descrizione FROM `an_anagrafiche` INNER JOIN `an_tipianagrafiche_anagrafiche` ON `an_anagrafiche`.`idanagrafica` = `an_tipianagrafiche_anagrafiche`.`idanagrafica` WHERE `idtipoanagrafica` = (SELECT `idtipoanagrafica` FROM `an_tipianagrafiche` LEFT JOIN `an_tipianagrafiche_lang` ON (`an_tipianagrafiche_lang`.`id_record` = `an_tipianagrafiche`.`id` AND `an_tipianagrafiche_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua")) WHERE `name` = "Fornitore") AND `deleted_at` IS NULL' WHERE `zz_settings`.`name` = "Terzo intermediario";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_modules`.`id`, `title` AS descrizione FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\")) WHERE `enabled` = 1 AND `options` != "" AND `options` != "menu" AND `options` IS NOT NULL ORDER BY `order` ASC' WHERE `zz_settings`.`name` = "Prima pagina";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_modules`.`id`, `title` AS descrizione FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua")) WHERE `enabled` = 1 AND `options` != "" AND `options` != "menu" AND `options` IS NOT NULL ORDER BY `order` ASC' WHERE `zz_settings`.`name` = "Prima pagina";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_currencies`.`id`, `name` AS descrizione FROM `zz_currencies` LEFT JOIN `zz_currencies_lang` ON (`zz_currencies_lang`.`id_record` = `zz_currencies`.`id` AND `zz_currencies_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Valuta";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_currencies`.`id`, `name` AS descrizione FROM `zz_currencies` LEFT JOIN `zz_currencies_lang` ON (`zz_currencies_lang`.`id_record` = `zz_currencies`.`id` AND `zz_currencies_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Valuta";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `em_templates`.`id`, `name` AS descrizione FROM `em_templates` LEFT JOIN `em_templates_lang` ON (`em_templates_lang`.`id_record` = `em_templates`.`id` AND `em_templates_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = \"Lingua\"))' WHERE `zz_settings`.`name` = "Template email invio sollecito";
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `em_templates`.`id`, `name` AS descrizione FROM `em_templates` LEFT JOIN `em_templates_lang` ON (`em_templates_lang`.`id_record` = `em_templates`.`id` AND `em_templates_lang`.`id_lang` = (SELECT `valore` FROM `zz_settings` WHERE `name` = "Lingua"))' WHERE `zz_settings`.`name` = "Template email invio sollecito";