. */ include_once __DIR__.'/../../core.php'; // Creazione righe fantasma $autofill = new \Util\Autofill($options['pricing'] ? 6 : 3); $rows_per_page = 16; if (!empty($options['last-page-footer'])) { $rows_per_page += 10; } $autofill->setRows($rows_per_page); // Intestazione tabella per righe echo " '; if ($options['pricing']) { echo " '; } echo ' '; // Righe documento $righe = $documento->getRighe(); $num = 0; foreach ($righe as $riga) { ++$num; $r = $riga->toArray(); $autofill->count($r['descrizione']); echo ' '; echo' '; if (!$riga->isDescrizione()) { echo ' '; if ($options['pricing']) { // Prezzo unitario echo ' '; // Imponibile echo ' '; // Iva echo ' '; } } else { echo ' '; if ($options['pricing']) { echo ' '; } } echo ' '; $autofill->next(); } echo ' |autofill|
".tr('#', [], ['upper' => true])." ".tr('Descrizione', [], ['upper' => true])." ".tr('Q.tà', [], ['upper' => true]).'".tr('Prezzo unitario', [], ['upper' => true])." ".tr('Importo', [], ['upper' => true])." ".tr('IVA', [], ['upper' => true]).' (%)
'.$num.' '.nl2br($r['descrizione']); if ($riga->isArticolo()) { // Codice articolo $text = tr('COD. _COD_', [ '_COD_' => $riga->codice, ]); echo '
'.$text.''; $autofill->count($text, true); // Seriali $seriali = $riga->serials; if (!empty($seriali)) { $text = tr('SN').': '.implode(', ', $seriali); echo '
'.$text.''; $autofill->count($text, true); } } // Aggiunta dei riferimenti ai documenti if (setting('Riferimento dei documenti nelle stampe') && $riga->hasOriginalComponent()) { $ref = $riga->getOriginalComponent()->getDocument()->getReference(); if (!empty($ref)) { echo '
'.$ref.''; $autofill->count($ref, true); } } echo '
'.Translator::numberToLocale(abs($riga->qta), 'qta').' '.$r['um'].' '.moneyFormat($riga->prezzo_unitario); if ($riga->sconto > 0) { $text = discountInfo($riga, false); echo '
'.$text.''; $autofill->count($text, true); } echo '
'.moneyFormat($riga->totale_imponibile).' '.Translator::numberToLocale($riga->aliquota->percentuale, 0).'
';