diff --git a/modules/stampe_contabili/stampe_contabili.php b/modules/stampe_contabili/stampe_contabili.php
index bf20b5ce0..36583e8a9 100644
--- a/modules/stampe_contabili/stampe_contabili.php
+++ b/modules/stampe_contabili/stampe_contabili.php
@@ -26,7 +26,7 @@ use Models\PrintTemplate;
$id_record = filter('id_record');
$dir = filter('dir');
$nome_stampa = filter('nome_stampa');
-$id_print = (new PrintTemplate())->getByField('name', prepare($nome_stampa));
+$id_print = (new PrintTemplate())->getByField('name', $nome_stampa);
$id_module = (new Module())->getByField('name', 'Stampe contabili', Models\Locale::getPredefined()->id);
$year = (new Carbon($_SESSION['period_end']))->format('Y');
@@ -96,7 +96,7 @@ echo '
if ($nome_stampa != 'Liquidazione IVA') {
echo '
- {[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_sezionale", "required": "1", "values": "query=SELECT `zz_segments`.`id`, `zz_segments_lang`.`name` AS descrizione FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments`.`id` = `zz_segments_lang`.`id_record` AND `zz_segments_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `id_module` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \''.(($dir == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto').'\') AND `is_fiscale` = 1 UNION SELECT -1 AS id, \'Tutti i sezionali\' AS descrizione" ]}
+ {[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_sezionale", "required": "1", "values": "query=SELECT `zz_segments`.`id`, `zz_segments_lang`.`name` AS descrizione FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments`.`id` = `zz_segments_lang`.`id_record` AND `zz_segments_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `id_module` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \"'.(($dir == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto').'\" AND `id_lang` = '.prepare(Models\Locale::getDefault()->id).') AND `is_fiscale` = 1 UNION SELECT -1 AS id, \"Tutti i sezionali\" AS descrizione" ]}
';
}
echo '
diff --git a/src/Prints.php b/src/Prints.php
index 32b564bb9..889c18cb0 100755
--- a/src/Prints.php
+++ b/src/Prints.php
@@ -207,7 +207,7 @@ class Prints
*/
public static function getHref($print, $id_record, $get = '')
{
- $infos = self::get($print);
+ $infos = PrintTemplate::find((new PrintTemplate())->getByField('name', $print));
if (empty($infos)) {
return false;
diff --git a/templates/registro_iva/init.php b/templates/registro_iva/init.php
index c19dbb367..2e9cfbee5 100755
--- a/templates/registro_iva/init.php
+++ b/templates/registro_iva/init.php
@@ -23,7 +23,7 @@ use Models\Module;
$dir = $_GET['dir'];
$id_sezionale = filter('id_sezionale');
-$sezionale = $dbo->fetchOne('SELECT `zz_segmnets_lang`.`name` FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments`.`id` = `zz_segments_lang`.`id_record` AND `zz_segments_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `zz_segments`.`id` = '.$id_sezionale)['name'];
+$sezionale = $dbo->fetchOne('SELECT `zz_segments_lang`.`name` FROM `zz_segments` LEFT JOIN `zz_segments_lang` ON (`zz_segments`.`id` = `zz_segments_lang`.`id_record` AND `zz_segments_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `zz_segments`.`id` = '.$id_sezionale)['name'];
$date_start = filter('date_start');
$date_end = filter('date_end');