INSERTINTO`zz_modules`(`id`,`name`,`title`,`directory`,`options`,`options2`,`icon`,`version`,`compatibility`,`order`,`parent`,`default`,`enabled`,`use_notes`,`use_checklists`)VALUES(NULL,'Listini cliente','Listini cliente','listini_cliente','SELECT |select| FROM `mg_listini` WHERE 1=1 HAVING 2=2','','fa fa-angle-right','2.*','2.*','2',(SELECT`id`FROM`zz_modules`AS`t`WHERE`t`.`name`='Magazzino'),'1','1','0','0');
((SELECT`id`FROM`zz_modules`WHEREname='Listini cliente'),'Articoli','(SELECT COUNT(id) FROM mg_listini_articoli WHERE id_listino=mg_listini.id)',4,1,0,0,0,'','',1,0,1),
((SELECT`id`FROM`zz_modules`WHEREname='Listini cliente'),'Anagrafiche','(SELECT COUNT(idanagrafica) FROM an_anagrafiche WHERE id_listino=mg_listini.id)',5,1,0,0,0,'','',1,0,1),
((SELECT`id`FROM`zz_modules`WHEREname='Listini cliente'),'Ultima modifica','(SELECT username FROM zz_users WHERE id=(SELECT id_utente FROM zz_operations WHERE id_module=(SELECT id FROM zz_modules WHERE name=\'Listinicliente\') AND id_record=mg_listini.id ORDER BY id DESC LIMIT 0,1))',6,1,0,0,0,'','',1,0,1),