From 737f40a55ec1727d4dc2fb83c6f0c06ec55af08f Mon Sep 17 00:00:00 2001 From: Bacca97 Date: Fri, 22 Jun 2018 10:34:48 +0200 Subject: [PATCH] Aggiunta stampa ordini con costi --- update/2_4_1.sql | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/update/2_4_1.sql b/update/2_4_1.sql index 7a6ba6898..a9ea7966a 100644 --- a/update/2_4_1.sql +++ b/update/2_4_1.sql @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `co_movimenti_modelli` ( `idmastrino` int(11) NOT NULL, `descrizione` text NOT NULL, `idconto` int(11) NOT NULL -) ENGINE=InnoDB; +); ALTER TABLE `co_movimenti_modelli` ADD PRIMARY KEY (`id`); @@ -93,8 +93,7 @@ CREATE TABLE IF NOT EXISTS `co_righe_contratti_materiali` ( `tipo_sconto` enum('UNT','PRC') NOT NULL DEFAULT 'UNT', PRIMARY KEY (`id`), KEY `id_riga_contratto` (`id_riga_contratto`) -) ENGINE=InnoDB; - +); -- Struttura della tabella `co_righe_contratti_articoli` @@ -119,8 +118,7 @@ CREATE TABLE IF NOT EXISTS `co_righe_contratti_articoli` ( PRIMARY KEY (`id`), KEY `id_riga_contratto` (`id_riga_contratto`), KEY `idimpianto` (`idimpianto`) -) ENGINE=InnoDB; - +); -- Modifica query wiget per mostrare solo quelli che non sono stati rinnovati @@ -277,21 +275,6 @@ UPDATE `zz_views` SET `summable` = '1' WHERE `zz_views`.`id_module` = (SELECT ` -- Collego il preventivo alla riga dell'ordine ALTER TABLE `or_righe_ordini` ADD `idpreventivo` INT(11) NOT NULL AFTER `idarticolo`; --- Fix foreign keys (2.4) -ALTER TABLE `zz_emails` - ADD FOREIGN KEY (`id_module`) REFERENCES `zz_modules`(`id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`id_smtp`) REFERENCES `zz_smtp`(`id`) ON DELETE CASCADE; - -ALTER TABLE `zz_email_print` - ADD FOREIGN KEY (`id_email`) REFERENCES `zz_emails`(`id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`id_print`) REFERENCES `zz_prints`(`id`) ON DELETE CASCADE; - -ALTER TABLE `zz_fields` - ADD FOREIGN KEY (`id_module`) REFERENCES `zz_modules`(`id`) ON DELETE CASCADE, - ADD FOREIGN KEY (`id_plugin`) REFERENCES `zz_plugins`(`id`) ON DELETE CASCADE; - -ALTER TABLE `zz_field_record` - ADD FOREIGN KEY (`id_field`) REFERENCES `zz_fields`(`id`) ON DELETE CASCADE; - -ALTER TABLE `zz_prints` - ADD FOREIGN KEY (`id_module`) REFERENCES `zz_modules`(`id`) ON DELETE CASCADE; +-- Aggiunta stampa ordini con costi +UPDATE `zz_prints` SET `options` = '{"pricing":true}', `main` = '1' WHERE `zz_prints`.`name` = 'Ordine fornitore'; +INSERT INTO `zz_prints` (`id`, `id_module`, `is_record`, `name`, `title`, `directory`, `previous`, `options`, `icon`, `version`, `compatibility`, `order`, `main`, `default`, `enabled`) VALUES (NULL, '25', '1', 'Ordine fornitore (senza costi)', 'Ordine fornitore (senza costi)', 'ordini', 'idordine', '{"pricing":false}', 'fa fa-print', '', '', '0', '0', '1', '1');