1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-10 22:53:52 +01:00

Fix ordinamento stampe + aggiunta stampa ordine fornitore con costi

This commit is contained in:
Luca 2018-06-07 12:23:42 +02:00
parent b243eaeb6d
commit 6562be2fff
2 changed files with 14 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class Prints
if (empty(self::$prints)) {
$database = Database::getConnection();
$results = $database->fetchArray('SELECT * FROM zz_prints WHERE enabled = 1');
$results = $database->fetchArray('SELECT * FROM zz_prints WHERE enabled = 1 ORDER BY `order`');
$prints = [];

View File

@ -247,4 +247,16 @@ INSERT INTO `zz_group_view` (`id_gruppo`, `id_vista`) VALUES
(1, (SELECT id FROM `zz_views` WHERE id_module=(SELECT id FROM zz_modules WHERE name='Preventivi') AND name='idanagrafica' )),
(2, (SELECT id FROM `zz_views` WHERE id_module=(SELECT id FROM zz_modules WHERE name='Preventivi') AND name='idanagrafica' )),
(3, (SELECT id FROM `zz_views` WHERE id_module=(SELECT id FROM zz_modules WHERE name='Preventivi') AND name='idanagrafica' )),
(4, (SELECT id FROM `zz_views` WHERE id_module=(SELECT id FROM zz_modules WHERE name='Preventivi') AND name='idanagrafica' ));
(4, (SELECT id FROM `zz_views` WHERE id_module=(SELECT id FROM zz_modules WHERE name='Preventivi') AND name='idanagrafica' ));
-- Stampa ordine con costi costi + default per invio email
UPDATE `zz_prints` SET `name` = 'Ordine fornitore (senza costi)', `title` = 'Ordine fornitore (senza costi)', `order` = 1 WHERE `zz_prints`.`name` = 'Ordine fornitore' AND options = '{"pricing":false}' AND `zz_prints`.`id_module` = (SELECT id FROM zz_modules WHERE name='Ordini fornitore') ;
INSERT INTO `zz_prints` (`id`, `id_module`, `is_record`, `name`, `title`, `directory`, `previous`, `options`, `icon`, `version`, `compatibility`, `order`, `main`, `default`, `enabled`) VALUES (NULL, (SELECT id FROM zz_modules WHERE name='Ordini fornitore'), '1', 'Ordine fornitore', 'Ordine fornitore', 'ordini', 'idordine', '{"pricing":true}', 'fa fa-print', '', '', '0', '1', '1', '1');
-- default invio ordini al fornitore con i prezzi
UPDATE `zz_email_print` SET `id_print` = (SELECT id FROM zz_prints WHERE name = 'Ordine fornitore') WHERE `zz_email_print`.`id_email` = (SELECT id FROM zz_emails WHERE id_module = (SELECT id FROM zz_modules WHERE name='Ordini fornitore'));
-- Ordino stampa ordine cliente senza costi
UPDATE `zz_prints` SET `order` = 1 WHERE `zz_prints`.`name` = 'Ordine cliente (senza costi)' AND options = '{"pricing":false}' AND `zz_prints`.`id_module` = (SELECT id FROM zz_modules WHERE name='Ordini cliente');