This commit is contained in:
Thomas Zilio 2018-03-22 15:40:47 +01:00
commit abcfe8d2e5
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ UPDATE `co_documenti` SET `id_segment`='2' WHERE `idtipodocumento` IN (SELECT `i
-- Innesto modulo segmenti sotto "Strumenti" -- Innesto modulo segmenti sotto "Strumenti"
INSERT INTO `zz_modules` (`id`, `name`, `title`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`) VALUES INSERT INTO `zz_modules` (`id`, `name`, `title`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`) VALUES
(NULL, 'Segmenti', 'Segmenti', 'segmenti', '{ "main_query": [ { "type": "table", "fields": "id, Nome, Modulo, Maschera, Note, Predefinito", "query": "SELECT `id`, (IF(predefined=1, ''Sì'', ''No'')) AS `Predefinito`, `name` AS `Nome`, (SELECT name FROM zz_modules WHERE id = zz_segments.id_module) AS Modulo, `pattern` AS `Maschera`, `note` AS `Note` FROM `zz_segments` HAVING 2=2 ORDER BY name, id_module"} ]}', '', 'fa fa-database', '2.4', '2.4', 1, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Strumenti'), 1, 1); (NULL, 'Segmenti', 'Segmenti', 'segmenti', '{ "main_query": [ { "type": "table", "fields": "id, Nome, Modulo, Maschera, Note, Predefinito", "query": "SELECT `id`, (IF(predefined=1, ''Sì'', ''No'')) AS `Predefinito`, `name` AS `Nome`, (SELECT name FROM zz_modules WHERE id = zz_segments.id_module) AS Modulo, `pattern` AS `Maschera`, `note` AS `Note` FROM `zz_segments` HAVING 2=2 ORDER BY name, id_module"} ]}', '', 'fa fa-database', '2.4', '2.4', 1, (SELECT t.`id` FROM (SELECT * FROM `zz_modules`) t WHERE t.`name` = 'Strumenti'), 1, 1);
-- Aggiorno widget Fatturato con i sezionali -- Aggiorno widget Fatturato con i sezionali
UPDATE `zz_widgets` SET `query` = 'SELECT CONCAT_WS(" ", REPLACE(REPLACE(REPLACE(FORMAT(SUM((SELECT SUM(subtotale+iva-sconto) FROM co_righe_documenti WHERE iddocumento=co_documenti.id)+iva_rivalsainps+rivalsainps+bollo-ritenutaacconto), 2), ",", "#"), ".", ","), "#", "."), "&euro;") AS dato FROM co_documenti WHERE idtipodocumento IN (SELECT id FROM co_tipidocumento WHERE dir="entrata") |segment| AND data >= "|period_start|" AND data <= "|period_end|" AND 1=1' WHERE `zz_widgets`.`name` = 'Fatturato'; UPDATE `zz_widgets` SET `query` = 'SELECT CONCAT_WS(" ", REPLACE(REPLACE(REPLACE(FORMAT(SUM((SELECT SUM(subtotale+iva-sconto) FROM co_righe_documenti WHERE iddocumento=co_documenti.id)+iva_rivalsainps+rivalsainps+bollo-ritenutaacconto), 2), ",", "#"), ".", ","), "#", "."), "&euro;") AS dato FROM co_documenti WHERE idtipodocumento IN (SELECT id FROM co_tipidocumento WHERE dir="entrata") |segment| AND data >= "|period_start|" AND data <= "|period_end|" AND 1=1' WHERE `zz_widgets`.`name` = 'Fatturato';