Miglioramento stampa barcode

This commit is contained in:
Thomas Zilio 2020-03-09 18:11:04 +01:00
parent 870aec890c
commit 0cb4572223
3 changed files with 15 additions and 4 deletions

View File

@ -4,9 +4,13 @@ include_once __DIR__.'/../../core.php';
echo '<style>
.barcode {
padding: 4mm;
padding-bottom: 2.5mm;
padding: 0;
margin: 0;
vertical-align: top;
}
.barcode-cell {
text-align: center;
vertical-align: middle;
}
</style>';
@ -18,5 +22,8 @@ $height = $settings['height'] / $height_factor / $size;
$number = 1; // 32
for ($i = 0; $i < $number; ++$i) {
echo '<barcode code="'.$articolo->barcode.'" type="EAN13" height="'.$height.'" size="'.$size.'" class="barcode" />';
echo '
<div class="barcode-cell">
<barcode code="'.$articolo->barcode.'" type="EAN13" height="'.$height.'" size="'.$size.'" class="barcode" />
</div>';
}

View File

@ -0,0 +1,4 @@
<?php
echo '
';

View File

@ -448,4 +448,4 @@ UPDATE `zz_hooks` SET `name` = 'Aggiornamenti' WHERE `class` = 'Modules\\Aggiorn
-- Aggiunta stampa Barcode
INSERT INTO `zz_prints` (`id_module`, `name`, `title`, `filename`, `directory`, `icon`, `options`, `predefined`, `previous`, `enabled`, `default`) VALUES
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Articoli'), 'Barcode', 'Barcode', 'Barcode', 'barcode', 'fa fa-print', '{"width": 54, "height": 20}', 1, '', 1, 1);
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Articoli'), 'Barcode', 'Barcode', 'Barcode', 'barcode', 'fa fa-print', '{"width": 54, "height": 20, "format": [64, 55]}', 1, '', 1, 1);