Migliorie grafiche template di stampa

This commit is contained in:
pek5892 2024-05-22 13:15:34 +02:00
parent 420bbba8f1
commit def00d1e50
10 changed files with 70 additions and 62 deletions

View File

@ -423,7 +423,9 @@ abstract class Accounting extends Component
{
$this->attributes['iva'] = $this->iva;
$descrizione = $this->aliquota->descrizione;
$iva = Aliquota::Find($this->idiva);
$descrizione = $iva->getTranslation('title');
if (!empty($descrizione)) {
$this->attributes['desc_iva'] = $descrizione;
}

View File

@ -27,7 +27,7 @@
*/
return '
<table style="color:#aaa; font-size:10px;">
<table style="color:#aaa; font-size:8px;">
<tr>
<td align="left" style="width:97mm;">
'.tr('Stampato con OpenSTAManager').'

View File

@ -31,15 +31,15 @@ $autofill->setRows($rows_per_page);
// Intestazione tabella per righe
echo "
<table class='table table-striped table-bordered' id='contents'>
<table class='table table-striped' id='contents'>
<thead>
<tr>
<th class='text-center' style='width:5%'>".tr('#', [], ['upper' => true])."</th>
<th class='text-center' style='width:50%'>".tr('Descrizione', [], ['upper' => true])."</th>
<th class='text-center' style='width:14%'>".tr('Q.tà', [], ['upper' => true])."</th>
<th class='text-center' style='width:16%'>".tr('Prezzo unitario', [], ['upper' => true])."</th>
<th class='text-center' style='width:20%'>".tr('Importo', [], ['upper' => true])."</th>
<th class='text-center' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>
<th class='text-center border-bottom' style='width:5%'>".tr('#', [], ['upper' => true])."</th>
<th class='text-center border-bottom' style='width:50%'>".tr('Descrizione', [], ['upper' => true])."</th>
<th class='text-center border-bottom' style='width:14%'>".tr('Q.tà', [], ['upper' => true])."</th>
<th class='text-center border-bottom' style='width:16%'>".tr('Prezzo unitario', [], ['upper' => true])."</th>
<th class='text-center border-bottom' style='width:20%'>".tr('Importo', [], ['upper' => true])."</th>
<th class='text-center border-bottom' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>
</tr>
</thead>
@ -257,7 +257,7 @@ echo '
if (!empty($record['note'])) {
echo '
<p class="small-bold">'.tr('Note', [], ['upper' => true]).':</p>
<p class="small-bold text-muted">'.tr('Note', [], ['upper' => true]).':</p>
<p>'.nl2br($record['note']).'</p>';
}

View File

@ -82,7 +82,7 @@ echo "
<table class='border-bottom'>
<tr>
<td colspan='4'>
<p class='small-bold'>".tr('Scadenze pagamenti', [], ['upper' => true]).'</p>
<p class='small-bold text-muted'>".tr('Scadenze pagamenti', [], ['upper' => true]).'</p>
</td>
</tr>';
@ -109,7 +109,8 @@ if (!empty($rs2)) {
}
}
echo '
echo '
</table>
</td>';
// Fine elenco scadenze
@ -126,15 +127,15 @@ if (!empty($v_iva)) {
<table class='border-bottom'>
<tr>
<td style='width:40mm;'>
<p class='small-bold'>".tr('Aliquota IVA', [], ['upper' => true])."</p>
<p class='small-bold text-muted'>".tr('Aliquota IVA', [], ['upper' => true])."</p>
</td>
<td style='width:20mm;' class='text-center'>
<p class='small-bold'>".tr('Importo', [], ['upper' => true])."</p>
<p class='small-bold text-muted'>".tr('Importo', [], ['upper' => true])."</p>
</td>
<td style='width:20mm;' class='text-center'>
<p class='small-bold'>".tr('Importo IVA', [], ['upper' => true]).'</p>
<p class='small-bold text-muted'>".tr('Importo IVA', [], ['upper' => true]).'</p>
</td>
</tr>';
@ -158,6 +159,33 @@ if (!empty($v_iva)) {
}
echo '
</table>
<br>
<table class="border-bottom">
<tr>
<td>
<p class="small-bold text-muted">'.tr('Banca di appoggio', [], ['upper' => true]).'</p>
</td>
<td>
<p><small>$appoggiobancario$</small></p>
</td>
</tr>
<tr>
<td>
<p class="small-bold text-muted">'.tr('IBAN').'</p>
</td>
<td>
<p><small>$codiceiban$</small></p>
</td>
</tr>
<tr>
<td>
<p class="small-bold text-muted">'.tr('BIC').'</p>
</td>
<td>
<p><small>$bic$</small></p>
</td>
</tr>
</table>';
}
@ -171,7 +199,8 @@ echo '
</table>';
// Fine tabella (scadenze + iva)
echo '
</td>';
</td>
';
/*
* Riga di riepilogo dei totali.

View File

@ -40,58 +40,35 @@ echo '
<div class="text-center" style="height:5mm;">
<b>$tipo_doc$</b>
</div>
<br>
<table class="table">
<tr>
<td valign="top" class="border-full text-center">
<p class="small-bold">'.tr('Nr. documento', [], ['upper' => true]).'</p>
<td valign="top" class="border-bottom border-top text-center">
<p class="small-bold text-muted">'.tr('Nr. documento', [], ['upper' => true]).'</p>
<p>$numero$</p>
</td>
<td class="border-right border-bottom border-top text-center">
<p class="small-bold">'.tr('Data documento', [], ['upper' => true]).'</p>
<td class="border-bottom border-top text-center">
<p class="small-bold text-muted">'.tr('Data documento', [], ['upper' => true]).'</p>
<p>$data$</p>
</td>
<td class="border-right border-bottom border-top text-center">
<p class="small-bold">'.tr('Cliente', [], ['upper' => true]).'</p>
<p>$c_codice$</p>
</td>
<td class="border-right border-bottom border-top center text-center">
<p class="small-bold">'.tr('Foglio', [], ['upper' => true]).'</p>
<td class="border-bottom border-top center text-center">
<p class="small-bold text-muted">'.tr('Foglio', [], ['upper' => true]).'</p>
<p>{PAGENO}/{nb}</p>
</td>
</tr>
<tr>
<td colspan="2" style="height:10mm;padding-top:2mm;">
<p class="small-bold">'.tr('Pagamento', [], ['upper' => true]).'</p>
<p>'.$record['pagamento'].'</p>
</td>
<td colspan="2" style="height:10mm;padding-top:2mm;">
<p class="small-bold">'.tr('Banca di appoggio', [], ['upper' => true]).'</p>
<p><small>$appoggiobancario$</small></p>
</td>
</tr>
<tr>
<td colspan="2" style="height:10mm;padding-top:2mm;white-space: nowrap;">
<p class="small-bold">'.tr('IBAN').'</p>
<p>$codiceiban$</p>
</td>
<td colspan="2" style="height:10mm;padding-top:2mm;">
<p class="small-bold">'.tr('BIC').'</p>
<p>$bic$</p>
</td>
</tr>
</table>
</div>
<div class="col-xs-6" style="margin-left: 10px">
<table class="table" style="width:100%;margin-top:5mm;">
<table class="table border-bottom" >
<tr>
<td colspan=2 class="border-full"'.(!$fattura_accompagnatoria ? ' style="height:20mm;"' : '').'>
<p class="small-bold">'.tr('Spett.le', [], ['upper' => true]).'</p>
<td colspan=2 '.(!$fattura_accompagnatoria ? ' style="height:20mm;"' : '').'>
<p class="small-bold text-muted">'.tr('Spett.le', [], ['upper' => true]).'</p>
<p>$c_ragionesociale$</p>
<p>'.(!empty($c_indirizzo) ? $c_indirizzo : '').(!empty($c_citta_full) ? '<br>'.$c_citta_full : '').'</p>';
if (empty($destinazione)) {
@ -103,19 +80,19 @@ echo '
</tr>
<tr>
<td class="border-bottom border-left">
<p class="small-bold">'.tr('Partita IVA', [], ['upper' => true]).'</p>
<td>
<p class="small-bold text-muted">'.tr('Partita IVA', [], ['upper' => true]).'</p>
</td>
<td class="border-right border-bottom text-right">
<td class="text-right">
<small>$c_piva$</small>
</td>
</tr>
<tr>
<td class="border-bottom border-left">
<p class="small-bold">'.tr('Codice fiscale', [], ['upper' => true]).'</p>
<td >
<p class="small-bold text-muted">'.tr('Codice fiscale', [], ['upper' => true]).'</p>
</td>
<td class="border-right border-bottom text-right">
<td class="text-right">
<small>$c_codicefiscale$</small>
</td>
</tr>';
@ -124,7 +101,7 @@ if (!empty($destinazione)) {
echo '
<tr>
<td colspan=2 class="border-full" style="height:16mm;">
<p class="small-bold">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
<p class="small-bold text-muted">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
<p><small>$c_destinazione$</small></p>
<p><small>'.(!empty($c_codice_destinatario) ? tr('Cod.Fatturazione').': '.$c_codice_destinatario : '').'</small></p>
</td>

View File

@ -18,7 +18,7 @@
*/
echo '
<table style="color:#aaa; font-size:10px;">
<table style="color:#aaa; font-size:8px;">
<tr>
<td align="left" style="width:97mm;">
'.tr('Stampato con OpenSTAManager il _DATE_', ['_DATE_' => date('d/m/Y')]).'

View File

@ -18,7 +18,7 @@
*/
echo '
<table style="color:#aaa; font-size:10px;">
<table style="color:#aaa; font-size:8px;">
<tr>
<td align="left" style="width:97mm;">
'.tr('Stampato con OpenSTAManager il _DATE_', ['_DATE_' => date('d/m/Y')]).'

View File

@ -18,7 +18,7 @@
*/
echo '
<table style="color:#aaa; font-size:10px;">
<table style="color:#aaa; font-size:8px;">
<tr>
<td align="left" style="width:97mm;">
'.tr('Stampato con OpenSTAManager il _DATE_', ['_DATE_' => date('d/m/Y')]).'

View File

@ -18,7 +18,7 @@
*/
echo '
<table style="color:#aaa; font-size:10px;">
<table style="color:#aaa; font-size:8px;">
<tr>
<td align="left" style="width:97mm;">
'.tr('Stampato con OpenSTAManager il _DATE_', ['_DATE_' => date('d/m/Y')]).'

View File

@ -18,7 +18,7 @@
*/
echo '
<table style="color:#aaa; font-size:10px;">
<table style="color:#aaa; font-size:8px;">
<tr>
<td align="left" style="width:97mm;">
'.tr('Stampato con OpenSTAManager il _DATE_', ['_DATE_' => date('d/m/Y')]).'