Aggiunta tabella zz_currencies_lang
This commit is contained in:
parent
ba8d30ecb0
commit
eff9ad1783
|
@ -193,7 +193,7 @@ switch (post('op')) {
|
|||
break;
|
||||
|
||||
case 'add':
|
||||
$idtipoanagrafica = post('idtipoanagrafica');
|
||||
$idtipoanagrafica = (array)post('idtipoanagrafica');
|
||||
$ragione_sociale = post('ragione_sociale');
|
||||
|
||||
$anagrafica = Anagrafica::build($ragione_sociale, post('nome'), post('cognome'), $idtipoanagrafica);
|
||||
|
|
|
@ -187,7 +187,7 @@ class Translator extends Util\Singleton
|
|||
{
|
||||
if (!isset(self::$currency)) {
|
||||
$id = setting('Valuta');
|
||||
$valuta = database()->fetchOne('SELECT symbol FROM zz_currencies WHERE id = '.prepare($id));
|
||||
$valuta = database()->fetchOne('SELECT `symbol` FROM `zz_currencies` WHERE `id` = '.prepare($id));
|
||||
|
||||
self::$currency = $valuta['symbol'];
|
||||
}
|
||||
|
|
|
@ -1510,6 +1510,30 @@ INSERT INTO `zz_widgets` (`id`, `name`, `type`, `id_module`, `location`, `class`
|
|||
INSERT INTO `zz_prints` (`id`, `id_module`, `is_record`, `name`, `title`, `filename`, `directory`, `previous`, `options`, `icon`, `version`, `compatibility`, `order`, `predefined`, `default`, `enabled`) VALUES
|
||||
(NULL, (SELECT id FROM zz_modules WHERE name = 'Articoli'), 0, 'Inventario cespiti', 'Inventario cespiti', 'Cespiti', 'magazzino_cespiti', '', '', 'fa fa-print', '', '', 0, 0, 1, 1);
|
||||
|
||||
-- Aggiunta tabella zz_currencies_lang
|
||||
CREATE TABLE IF NOT EXISTS `zz_currencies_lang` (
|
||||
`id` int NOT NULL,
|
||||
`id_lang` int NOT NULL,
|
||||
`id_record` int NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL
|
||||
);
|
||||
ALTER TABLE `zz_currencies_lang`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `zz_currencies_lang`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
INSERT INTO `zz_currencies_lang` (`id`, `id_lang`, `id_record`, `name`, `title`) SELECT NULL, (SELECT `id` FROM `zz_langs` WHERE `iso_code` = 'it'), `id`, `name`, `title` FROM `zz_currencies`;
|
||||
|
||||
ALTER TABLE `zz_currencies`
|
||||
DROP `name`,
|
||||
DROP `title`;
|
||||
|
||||
ALTER TABLE `zz_currencies_lang` ADD CONSTRAINT `zz_currencies_lang_ibfk_1` FOREIGN KEY (`id_record`) REFERENCES `zz_currencies`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
|
||||
|
||||
UPDATE `zz_settings` SET `tipo` = 'query=SELECT `zz_currencies`.`id` AS id, CONCAT(`title`, \' - \', `symbol`) AS text 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 `nome` = "Lingua"))' WHERE `zz_settings`.`nome` = 'Valuta';
|
||||
|
||||
-- Aggiunta tabella zz_widgets_lang
|
||||
CREATE TABLE IF NOT EXISTS `zz_widgets_lang` (
|
||||
`id` int NOT NULL,
|
||||
|
|
|
@ -155,6 +155,7 @@ return [
|
|||
'zz_api_resources',
|
||||
'zz_cache',
|
||||
'zz_currencies',
|
||||
'zz_currencies_lang',
|
||||
'zz_checks',
|
||||
'zz_check_user',
|
||||
'zz_checklists',
|
||||
|
|
Loading…
Reference in New Issue