From 5637c14a35200eb64c8c32df1b108755e87a4f1e Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Mon, 6 Feb 2023 13:04:38 +0100 Subject: [PATCH 1/3] Fix #1169 --- update/2_4_40.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update/2_4_40.sql b/update/2_4_40.sql index 369f3beef..e2666030b 100644 --- a/update/2_4_40.sql +++ b/update/2_4_40.sql @@ -165,5 +165,5 @@ INSERT INTO zz_settings(nome, valore, tipo, editable, sezione) VALUES ('Posizion -- Miglioria segmenti scadenzario UPDATE `zz_segments` SET `name` = 'Scadenzario completo' WHERE `zz_segments`.`name` = 'Scadenziaro completo'; -UPDATE `zz_segments` SET `clause` = '(`co_scadenziario`.`scadenza` BETWEEN \'|period_start|\' AND \'|period_end|\' AND idtipodocumento < 14)' WHERE `zz_segments`.`name` = 'Scadenzario completo'; -INSERT INTO `zz_segments` (`id_module`, `name`, `clause`, `position`, `pattern`,`note`, `dicitura_fissa`,`predefined`, `predefined_accredito`, `predefined_addebito`, `autofatture`, `is_sezionale`) VALUES ((SELECT `id` FROM `zz_modules` WHERE `name` = 'Scadenzario'), 'Scadenzario autofatture', '(idtipodocumento >= 14)', 'WHR', '####', '', '', 0, 0, 0, 0, 0); \ No newline at end of file +UPDATE `zz_segments` SET `clause` = "(`co_scadenziario`.`scadenza` BETWEEN '|period_start|' AND '|period_end|' AND codice_tipo_documento_fe NOT IN ('TD16', 'TD17', 'TD18', 'TD19', 'TD20', 'TD21', 'TD22', 'TD23', 'TD26', 'TD27', 'TD28'))" WHERE `zz_segments`.`name` = 'Scadenzario completo'; +INSERT INTO `zz_segments` (`id_module`, `name`, `clause`, `position`, `pattern`,`note`, `dicitura_fissa`,`predefined`, `predefined_accredito`, `predefined_addebito`, `autofatture`, `is_sezionale`) VALUES ((SELECT `id` FROM `zz_modules` WHERE `name` = 'Scadenzario'), 'Scadenzario autofatture', "(codice_tipo_documento_fe IN ('TD16', 'TD17', 'TD18', 'TD19', 'TD20', 'TD21', 'TD22', 'TD23', 'TD26', 'TD27', 'TD28'))", 'WHR', '####', '', '', 0, 0, 0, 0, 0); \ No newline at end of file From e64bcb8eef28ea188bc3220ba624859c624ea049 Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Mon, 6 Feb 2023 16:09:55 +0100 Subject: [PATCH 2/3] Fix impostazione filtri statistiche anagrafica --- plugins/statistiche_anagrafiche/info.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/statistiche_anagrafiche/info.php b/plugins/statistiche_anagrafiche/info.php index a59bc14f6..77582fb87 100755 --- a/plugins/statistiche_anagrafiche/info.php +++ b/plugins/statistiche_anagrafiche/info.php @@ -163,8 +163,15 @@ echo '
- '.tr('Attività').' - '.($interventi->count() > 0 ? ''.tr('Visualizza').' ' : '').' + '.tr('Attività').''; + if ($anagrafica->isTipo('Cliente')){ + echo' + '.($interventi->count() > 0 ? ''.tr('Visualizza').' ' : '').''; + } else { + echo ' + '.($interventi->count() > 0 ? ''.tr('Visualizza').' ' : '').''; + } + echo'
'.$interventi->count().'
From bbd1d1cad7c186a21ffeeb9f5ec5e7cf007144a0 Mon Sep 17 00:00:00 2001 From: loviuz Date: Mon, 6 Feb 2023 16:27:36 +0100 Subject: [PATCH 3/3] Fix temporanea per forzare il ricaricamento di datatables alla ricerca --- assets/src/js/functions/datatables.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/assets/src/js/functions/datatables.js b/assets/src/js/functions/datatables.js index 8544c346f..4235e7770 100755 --- a/assets/src/js/functions/datatables.js +++ b/assets/src/js/functions/datatables.js @@ -275,6 +275,7 @@ function initComplete(settings) { const api = this.api(); const $this = $(this); const search = getTableSearch(); + var forceSearch = false; api.columns('.search').every(function () { const column = this; @@ -286,6 +287,10 @@ function initComplete(settings) { const value = search['search_' + name] ? search['search_' + name] : ''; + if (value !== '') { + forceSearch = true; + } + $('
') .appendTo(column.header()) .on('keyup', function (e) { @@ -333,6 +338,10 @@ function initComplete(settings) { }); }); + if (forceSearch) { + $('table.main-records:visible .search > input:not(:emptyVal)').first().trigger('keyup'); + } + // Disabilito l'ordinamento alla pressione del tasto invio sull' $("thead input, .search").on('keypress', function (e) { stopTableSorting(e); @@ -549,3 +558,7 @@ function getTable(selector) { }, }; } + +$.expr[':'].emptyVal = function(obj){ + return obj.value === ''; +}; \ No newline at end of file