From afa646c36a7e3eaadacdac7a079c1a4ffc1a3e29 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Mon, 11 Mar 2024 13:36:59 +0100 Subject: [PATCH] Fix add serial --- modules/fatture/add_serial.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/fatture/add_serial.php b/modules/fatture/add_serial.php index 3b49a429d..469641f81 100755 --- a/modules/fatture/add_serial.php +++ b/modules/fatture/add_serial.php @@ -23,7 +23,7 @@ use Modules\DDT\DDT; use Models\Module; use Models\Plugin; -$module = Module::find((new Module())->getByName($id_module)->id_record); +$module = Module::find($id_module); $id_module_articoli = (new Module())->getByName('Articoli')->id_record; // Controllo sulla direzione monetaria @@ -89,7 +89,7 @@ $riga = str_replace('id', 'id_riga_', $id); $idriga = get('idriga') ?: get('riga_id'); -$rs = $dbo->fetchArray('SELECT `mg_articoli`.`id` AS idarticolo, `mg_articoli`.`codice`, `mg_articoli_lang`.`name`, '.$table.'.`qta` FROM '.$table.' INNER JOIN `mg_articoli` ON '.$table.'.`idarticolo`=`mg_articoli`.`id` LEFT JOIN `mg_articoli_lang ON (`mg_articoli`.`id`=`mg_articoli_lang`.`id_record` AND `mg_articoli_lang`.`id_lang`='.prepare(setting('Lingua')).') WHERE '.$table.'.'.$id.'='.prepare($id_record).' AND '.$table.'.`id`='.prepare($idriga)); +$rs = $dbo->fetchArray('SELECT `mg_articoli`.`id` AS idarticolo, `mg_articoli`.`codice`, `mg_articoli_lang`.`name`, '.$table.'.`qta` FROM '.$table.' INNER JOIN `mg_articoli` ON '.$table.'.`idarticolo`=`mg_articoli`.`id` LEFT JOIN `mg_articoli_lang` ON (`mg_articoli`.`id`=`mg_articoli_lang`.`id_record` AND `mg_articoli_lang`.`id_lang`='.prepare(setting('Lingua')).') WHERE '.$table.'.'.$id.'='.prepare($id_record).' AND '.$table.'.`id`='.prepare($idriga)); echo '

'.tr('Articolo').': '.$rs[0]['codice'].' - '.$rs[0]['descrizione'].'