1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-19 02:31:22 +01:00

Fix minori

This commit is contained in:
Pek5892 2024-03-25 11:09:20 +01:00
parent 4592e7de5b
commit 5fff793da2
2 changed files with 6 additions and 2 deletions

View File

@ -49,7 +49,11 @@ class ButtonManager implements ManagerInterface
protected function getInfo($options)
{
if ($options['type'] == 'print') {
$print = PrintTemplate::find($options['id']);
$print = PrintTemplate::find((new PrintTemplate())->getByField('title', $options['id']));
if (empty($print)) {
$print = PrintTemplate::find($options['id']);
}
$result = [
'link' => \Prints::getHref($options['id'], $options['id_record'], $options['parameters']),

View File

@ -1912,7 +1912,7 @@ ALTER TABLE `my_impianti_interventi` ADD `note` TEXT NOT NULL AFTER `idimpianto`
-- Aggiornato plugin Impianti
UPDATE `zz_plugins` SET `script` = '', `directory` = 'impianti_intervento', `options` = 'custom' WHERE `zz_plugins`.`id` = (SELECT `id_record` FROM `zz_plugins_lang` WHERE `name` = 'Impianti');
UPDATE `zz_plugins` SET `options` = '{\"main_query\": [{\"type\": \"table\", \"fields\": \"Numero, Data inizio, Data fine, Tipo\", \"query\": \"SELECT in_interventi.id, in_interventi.codice AS Numero, DATE_FORMAT(MAX(orario_inizio),\'%d/%m/%Y\') AS \'Data inizio\', DATE_FORMAT(MAX(orario_fine),\'%d/%m/%Y\') AS \'Data fine\', (SELECT name FROM in_tipiintervento LEFT JOIN in_tipiintervento_lang ON (in_tipiintervento_lang.id_record = in_tipiintervento.id AND in_tipiintervento_lang.id_lang = (SELECT `valore` FROM `zz_settings` WHERE `nome` = "Lingua"))WHERE in_tipiintervento.id=in_interventi.idtipointervento) AS \'Tipo\', (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \'Interventi\') AS _link_module_, in_interventi.id AS _link_record_ FROM in_interventi LEFT JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idintervento` = `in_interventi`.`id` INNER JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento`=`in_statiintervento`.`id` WHERE 1=1 AND in_interventi.deleted_at IS NULL AND idanagrafica = |id_parent| GROUP BY `in_interventi`.`id` HAVING 2=2 ORDER BY in_interventi.id DESC\"}]}' WHERE `zz_plugins`.`id` = (SELECT `id_record` FROM `zz_plugins_lang` WHERE `name` = 'Storico attività');
UPDATE `zz_plugins` SET `options` = ' { "main_query": [ { "type": "table", "fields": "Numero, Data inizio, Data fine, Tipo", "query": "SELECT in_interventi.id, in_interventi.codice AS Numero, DATE_FORMAT(MAX(orario_inizio), ''%d/%m/%Y'') AS ''Data inizio'', DATE_FORMAT(MAX(orario_fine), ''%d/%m/%Y'') AS ''Data fine'', (SELECT name FROM in_tipiintervento LEFT JOIN in_tipiintervento_lang ON (in_tipiintervento_lang.id_record = in_tipiintervento.id AND in_tipiintervento_lang.id_lang = (SELECT `valore` FROM `zz_settings` WHERE `nome` = ''Lingua''))WHERE in_tipiintervento.id=in_interventi.idtipointervento) AS ''Tipo'', (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = ''Interventi'' LIMIT 1) AS _link_module_, in_interventi.id AS _link_record_ FROM in_interventi LEFT JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idintervento` = `in_interventi`.`id` INNER JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento`=`in_statiintervento`.`id` WHERE 1=1 AND in_interventi.deleted_at IS NULL AND idanagrafica = |id_parent| GROUP BY `in_interventi`.`id` HAVING 2=2 ORDER BY in_interventi.id DESC"} ]}' WHERE `zz_plugins`.`id` = (SELECT `id_record` FROM `zz_plugins_lang` WHERE `name` = 'Storico attività');
-- Allineamento vista Ddt di vendita
UPDATE `zz_modules` SET `options` = "