Skip to content

Commit cd1ecf8

Browse files
committed
feat: Pre-selezione barcode automatico alla creazione di un nuovo articolo, complete #1706
1 parent ad17ce8 commit cd1ecf8

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

modules/articoli/add.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</div>
3737

3838
<div class="col-md-6">
39-
<span class="pull-right tip text-muted"><input type="checkbox" id="genera_barcode" name="genera_barcode" /> <?php echo tr('Genera automaticamente un barcode'); ?></span>
39+
<span class="pull-right tip text-muted"><input type="checkbox" id="genera_barcode" name="genera_barcode" <?php echo (setting('Genera barcode automaticamente') ? 'checked' : '');?> /> <?php echo tr('Genera automaticamente un barcode'); ?></span>
4040
{[ "type": "text", "label": "<?php echo tr('Barcode'); ?>", "name": "barcode", "required": 0, "value": "<?php echo htmlentities(filter('barcode')) ?: ''; ?>", "validation": "barcode" ]}
4141
</div>
4242
</div>

update/2_10.sql

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,11 @@ INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`, `search`, `slow`,
213213

214214
INSERT INTO `zz_views_lang` (`id_record`, `id_lang`, `name`, `help`) VALUES
215215
((SELECT `zz_views`.`id` FROM `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` WHERE `zz_modules`.`name` = 'Preventivi' AND `zz_views`.`name` = 'Sede destinazione'), '1', 'Sede destinazione', ''),
216-
((SELECT `zz_views`.`id` FROM `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` WHERE `zz_modules`.`name` = 'Preventivi' AND `zz_views`.`name` = 'Sede destinazione'), '2', 'Destination address', '');
216+
((SELECT `zz_views`.`id` FROM `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` WHERE `zz_modules`.`name` = 'Preventivi' AND `zz_views`.`name` = 'Sede destinazione'), '2', 'Destination address', '');
217+
218+
-- #1706 - Pre-selezione barcode automatico
219+
INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`) VALUES (NULL, 'Genera barcode automaticamente', '0', 'boolean', '1', 'o');
220+
221+
INSERT INTO `zz_settings_lang` (`id`, `id_lang`, `id_record`, `title`, `help`) VALUES
222+
(NULL, '1', (SELECT `id` FROM `zz_settings` WHERE `nome` = 'Genera barcode automaticamente'), 'Genera barcode automaticamente', ''),
223+
(NULL, '2', (SELECT `id` FROM `zz_settings` WHERE `nome` = 'Genera barcode automaticamente'), 'Generate barcode automatically', '');

0 commit comments

Comments
 (0)