Fix link del plugin Ddt del cliente

This commit is contained in:
Thomas Zilio 2020-07-31 11:22:29 +02:00
parent e1f758c52f
commit df0afff1b1
2 changed files with 9 additions and 3 deletions

View File

@ -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'];

View File

@ -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';