diff --git a/src/HTMLBuilder/Handler/SelectHandler.php b/src/HTMLBuilder/Handler/SelectHandler.php index 968257947..2a7987718 100755 --- a/src/HTMLBuilder/Handler/SelectHandler.php +++ b/src/HTMLBuilder/Handler/SelectHandler.php @@ -2,6 +2,8 @@ namespace HTMLBuilder\Handler; +use AJAX; + /** * Gestione dell'input di tipo "select". * @@ -117,17 +119,18 @@ class SelectHandler implements HandlerInterface /** * Gestione dell'input di tipo "select" con richieste AJAX (nome della richiesta indicato tramite attributo "ajax-source"). - * Esempio: {[ "type": "select", "label": "Select di test", "name": "test", "ajax-source": "test" ]}. + * Esempio: {[ "type": "select", "label": "Select di test", "name": "test", "ajax-source": "test", "ajax-info": "id_test=1,test=si" ]}. * * @param string $op - * @param array $elements + * @param array $elements + * @param array $info * * @return string */ protected function select2($op, $elements, $info) { // Richiamo del file dedicato alle richieste AJAX per ottenere il valore iniziale del select - $response = \AJAX::select($op, $elements, null, 0, 100, $info); + $response = AJAX::select($op, $elements, null, 0, 100, $info); $html = ''; $results = $response['results']; diff --git a/update/2_4_17.sql b/update/2_4_17.sql index 17fb32c9f..a5084dedc 100644 --- a/update/2_4_17.sql +++ b/update/2_4_17.sql @@ -45,3 +45,6 @@ UPDATE `or_righe_ordini` SET `idarticolo` = NULL WHERE `idarticolo` = 0; ALTER TABLE `co_righe_promemoria` CHANGE `idarticolo` `idarticolo` INT(11) NULL; UPDATE `co_righe_promemoria` SET `idarticolo` = NULL WHERE `idarticolo` = 0; + +-- Fix link del plugin "Ddt del cliente" +UPDATE `zz_plugins` SET `options` = ' { "main_query": [ { "type": "table", "fields": "Numero, Data, Descrizione, Qtà", "query": "SELECT dt_ddt.id, IF(dt_tipiddt.dir = \'entrata\', (SELECT `id` FROM `zz_modules` WHERE `name` = \'Ddt di vendita\'), (SELECT `id` FROM `zz_modules` WHERE `name` = \'Ddt di acquisto\')) AS _link_module_, dt_ddt.id AS _link_record_, IF(dt_ddt.numero_esterno = \'\', dt_ddt.numero, dt_ddt.numero_esterno) AS Numero, DATE_FORMAT(dt_ddt.data, \'%d/%m/%Y\') AS Data, dt_righe_ddt.descrizione AS `Descrizione`, REPLACE(REPLACE(REPLACE(FORMAT(dt_righe_ddt.qta, 2), \',\', \'#\'), \'.\', \',\'), \'#\', \'.\') AS `Qtà` FROM dt_ddt LEFT JOIN dt_righe_ddt ON dt_ddt.id=dt_righe_ddt.idddt JOIN dt_tipiddt ON dt_ddt.idtipoddt = dt_tipiddt.id WHERE dt_ddt.idanagrafica=|id_parent| GROUP BY dt_ddt.id HAVING 2=2 ORDER BY dt_ddt.id DESC"} ]}' WHERE `zz_plugins`.`name` = 'Ddt del cliente';