diff --git a/modules/fatture/bulk.php b/modules/fatture/bulk.php index 6a0b91909..aaaa137c8 100644 --- a/modules/fatture/bulk.php +++ b/modules/fatture/bulk.php @@ -25,11 +25,13 @@ switch (post('op')) { $rapportino_nome = sanitizeFilename($numero.' '.$r['data'].' '.$r['ragione_sociale'].'.pdf'); $filename = slashes($dir.'tmp/'.$rapportino_nome); - $_GET['iddocumento'] = $r['id']; // Fix temporaneo per la stampa - $iddocumento = $r['id']; // Fix temporaneo per la stampa + $iddocumento = $r['id']; $ptype = 'fatture'; + + $print = $dbo->fetchArray('SELECT id, previous FROM zz_prints WHERE directory = '.prepare($ptype).' ORDER BY main DESC LIMIT 1'); + $id_print = $print[0]['id']; - require DOCROOT.'/pdfgen.php'; + Prints::render($id_print, $iddocumento, $filename); } $dir = slashes($dir);