1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 21:28:08 +01:00

Aggiornamento delle stampe

Miglioramento dello stile delle stampe convertite.
This commit is contained in:
Thomas Zilio 2017-09-13 11:15:31 +02:00
parent 5818082c08
commit a9b71e9c4b
12 changed files with 269 additions and 238 deletions

View File

@ -797,7 +797,7 @@ function sum($first, $second = null, $decimals = null)
}
}
return $result;
return floatval($result);
}
function redirectOperation($id_module, $id_record)

View File

@ -8,6 +8,7 @@ p {
margin: 0px;
}
.text-bold,
.small-bold {
font-weight: bold;
}
@ -42,10 +43,24 @@ table.table-bordered thead tr:nth-child(2) th {
small,
.small,
.small-bold,
table.table-bordered>th {
table.table-bordered thead th,
table#contents thead th {
font-size: 70%;
}
table.table-normal,
table.table-normal td,
table.table-normal th {
border: 0;
}
table.border-bottom,
table.border-bottom td,
table.border-bottom th {
border: 0;
border-bottom: 1px solid #aaa;
}
table.table-bordered,
table.table-bordered td,
table.table-bordered th {
@ -63,10 +78,6 @@ table#contents tbody td {
border-bottom: 0;
}
table#contents thead th {
font-size: 80%;
}
.row,
.col-xs-1,
.col-xs-2,

View File

@ -208,7 +208,7 @@ $pagamento = $rs[0]['descrizione'];
echo '
<table class="table table-bordered">
<tr>
<th colspan="2" class="text-center">
<th colspan="2" class="text-center" style="font-size:13pt;">
'.tr('Condizioni generali di fornitura', [], ['upper' => true]).'
</th>
</tr>

View File

@ -9,17 +9,12 @@ $autofill = [
'words' => 70,
'rows' => 16,
'additional' => 15,
'columns' => $mostra_prezzi ? 6 : 2,
'columns' => $mostra_prezzi ? 5 : 2,
];
$v_iva = [];
$v_totale = [];
$totale_ddt = 0.00;
$totale_imponibile = 0.00;
$totale_iva = 0.00;
$sconto = 0.00;
$sconto_generico = 0.00;
$imponibile = [];
$iva = [];
$sconto = [];
// Intestazione tabella per righe
echo "
@ -27,14 +22,13 @@ echo "
<thead>
<tr>
<th class='text-center'>".tr('Descrizione', [], ['upper' => true])."</th>
<th class='text-center' style='width:7%'>".tr('Q.tà', [], ['upper' => true]).'</th>';
<th class='text-center' style='width:10%'>".tr('Q.tà', [], ['upper' => true]).'</th>';
if ($mostra_prezzi) {
echo "
<th class='text-center' style='width:15%'>".tr('Prezzo unitario', [], ['upper' => true])."</th>
<th class='text-center' style='width:15%'>".tr('Importo', [], ['upper' => true])."</th>
<th class='text-center' style='width:10%'>".tr('Sconto', [], ['upper' => true])."</th>
<th class='text-center' style='width:7%'>".tr('IVA', [], ['upper' => true]).' (%)</th>';
<th class='text-center' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>';
}
echo '
@ -44,81 +38,77 @@ if ($mostra_prezzi) {
<tbody>';
// Righe
$rs_gen = $dbo->fetchArray("SELECT *, (SELECT percentuale FROM co_iva WHERE id=idiva) AS perc_iva FROM `dt_righe_ddt` WHERE idddt='$idddt'");
$imponibile_gen = 0.0;
$iva_gen = 0.0;
$rs_gen = $dbo->fetchArray('SELECT *, (SELECT percentuale FROM co_iva WHERE id=idiva) AS perc_iva, IFNULL((SELECT peso_lordo FROM mg_articoli WHERE id=idarticolo),0) AS peso_lordo, IFNULL((SELECT volume FROM mg_articoli WHERE id=idarticolo),0) AS volume FROM `dt_righe_ddt` WHERE idddt='.prepare($idddt));
foreach ($rs_gen as $r) {
$autofill['count'] += ceil(strlen($r['descrizione']) / $autofill['words']);
$autofill['count'] += substr_count($r['descrizione'], PHP_EOL);
$count = 0;
$count += ceil(strlen($r['descrizione']) / $autofill['words']);
$count += substr_count($r['descrizione'], PHP_EOL);
$descrizione = $r['descrizione'];
$qta = $r['qta'];
$subtot = $r['subtotale'] / $r['qta'];
$subtotale = $r['subtotale'];
$sconto = $r['sconto'];
$iva = $r['iva'];
echo '
<tr>
<td>
'.nl2br($r['descrizione']);
// Aggiunta riferimento a ordine
if (!empty($r['idordine'])) {
$rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id='.prepare($r['idordine']));
$numero = !empty($rso[0]['numero_esterno']) ? $rso[0]['numero_esterno'] : $rso[0]['numero'];
if (empty($r['sconto_globale'])) {
$sconto_generico = $r['subtotale'];
$iva_gen += $r['iva'];
} else {
echo '
<tr>
<td>
'.nl2br($descrizione);
<br/><small>'.tr('Rif. ordine n<sup>o</sup>_NUM_ del _DATE_', [
'_NUM_' => $numero,
'_DATE_' => Translator::dateToLocale($rso[0]['data']),
]).'</small>';
// Aggiunta riferimento a ordine
if (!empty($r['idordine'])) {
$rso = $dbo->fetchArray('SELECT numero, numero_esterno, data FROM or_ordini WHERE id='.prepare($r['idordine']));
$numero = !empty($rso[0]['numero_esterno']) ? $rso[0]['numero_esterno'] : $rso[0]['numero'];
echo '
<br/><small>'.tr('Rif. ordine n<sup>o</sup>_NUM_ del _DATE_', [
'_NUM_' => $numero,
'_DATE_' => Translator::dateToLocale($rso[0]['data']),
]).'</small>';
$autofill['count'] += 0.4;
if ($count <= 1) {
$count += 0.4;
}
echo '
</td>';
echo "
<td class='center' valign='top'>
".Translator::numberToLocale($qta, 2).'
</td>';
if ($mostra_prezzi) {
echo "
<td align='right' class='' valign='top'>
".Translator::numberToLocale($subtot, 2).' &euro;
</td>';
// Imponibile
echo "
<td align='right' class='' valign='top'>
".Translator::numberToLocale($subtotale, 2).' &euro;
</td>';
// Sconto
echo "
<td align='right' class='' valign='top'>
".Translator::numberToLocale($r['sconto_unitario'], 2).($r['tipo_sconto'] == 'PRC' ? '%' : ' &euro;').'
</td>';
// Iva
echo "
<td align='center' valign='top'>
".Translator::numberToLocale($r['perc_iva'], 2).'
</td>';
}
echo '
</tr>';
$imponibile_gen += $subtotale;
$iva_gen += $iva;
$sconto += $sconto;
}
echo '
</td>';
echo "
<td class='text-center'>
".Translator::numberToLocale($r['qta'], 2).' '.$r['um'].'
</td>';
if ($mostra_prezzi) {
echo "
<td class='text-right'>
".Translator::numberToLocale($r['subtotale'] / $r['qta'], 2).' &euro;
</td>';
// Imponibile
echo "
<td class='text-right'>
".Translator::numberToLocale($r['subtotale'], 2).' &euro;';
if ($r['sconto'] > 0) {
if ($count <= 1) {
$count += 0.4;
}
echo "
<br><small class='help-block'>- sconto ".Translator::numberToLocale($r['sconto_unitario']).($r['tipo_sconto'] == 'PRC' ? '%' : ' &euro;').'</small>';
}
echo '
</td>';
// Iva
echo "
<td class='text-center'>
".Translator::numberToLocale($r['perc_iva'], 2).'
</td>';
}
echo '
</tr>';
$autofill['count'] += $count;
$imponibile[] = $r['subtotale'];
$iva[] = $r['iva'];
$sconto[] = $r['sconto'];
}
echo '
@ -127,6 +117,10 @@ echo '
</table>';
// Info per il footer
$imponibile_ddt = $imponibile_gen;
$totale_iva = $iva_gen;
$totale_ddt = $imponibile_gen;
$imponibile = sum($imponibile) - sum($sconto);
$iva = sum($iva);
$totale = $imponibile + $iva;
$volume = sum(array_column($rs_gen, 'volume'));
$peso_lordo = sum(array_column($rs_gen, 'peso_lordo'));

View File

@ -21,7 +21,7 @@ if ($mostra_prezzi) {
echo "
<tr>
<td class='cell-padded text-right'>
".Translator::numberToLocale($imponibile_ddt, 2).' &euro;
".Translator::numberToLocale($imponibile, 2).' &euro;
</td>
</tr>';
@ -35,7 +35,7 @@ if ($mostra_prezzi) {
<tr>
<td class='cell-padded text-right'>
".Translator::numberToLocale($totale_iva, 2).' &euro;
".Translator::numberToLocale($iva, 2).' &euro;
</td>
</tr>';
@ -49,7 +49,7 @@ if ($mostra_prezzi) {
<tr>
<td class='cell-padded text-right'>
".Translator::numberToLocale($totale_ddt, 2).' &euro;
".Translator::numberToLocale($totale, 2).' &euro;
</td>
</tr>';
} else {
@ -66,84 +66,103 @@ if ($mostra_prezzi) {
echo '
</table>';
// Informazioni aggiuntive
echo '
<table class="table-bordered">
<tr>
<th class="border-bottom border-right" style="width:33%">
<th class="small" class style="width:25%">
'.tr('Aspetto beni', [], ['upper' => true]).'
</th>
<th class="border-bottom border-right" style="width:33%">
<th class="small" class style="width:20%">
'.tr('N<sup>o</sup> colli', [], ['upper' => true]).'
</th>
<th class="small" style="width:30%">
'.tr('Causale trasporto', [], ['upper' => true]).'
</th>
<th class="border-bottom" style="width:33%">
<th class="small" style="width:25%">
'.tr('Porto', [], ['upper' => true]).'
</th>
</tr>
<tr>
<td class="cell-padded border-right">
<td class="cell-padded">
$aspettobeni$ &nbsp;
</td>
<td class="cell-padded border-right">
<td class="cell-padded">
$n_colli$ &nbsp;
</td>
<td class="cell-padded">
$causalet$ &nbsp;
</td>
<td class="cell-padded">
$porto$ &nbsp;
</td>
</tr>
<tr>
<th class="border-bottom border-right">
'.tr('N<sup>o</sup> colli', [], ['upper' => true]).'
<th class="small">
'.tr('Peso lordo', [], ['upper' => true]).'
</th>
<th class="border-bottom border-right">
'.tr('Tipo di spedizione', [], ['upper' => true]).'
<th class="small">
'.tr('Volume', [], ['upper' => true]).'
</th>
<th class="border-bottom">
<th class="small">
'.tr('Vettore', [], ['upper' => true]).'
</th>
<th class="small">
'.tr('Tipo di spedizione', [], ['upper' => true]).'
</th>
</tr>
<tr>
<td class="cell-padded border-right">
$n_colli$ &nbsp;
<td class="cell-padded">
'.(!empty($peso_lordo) ? Translator::numberToLocale($peso_lordo) : '').' &nbsp;
</td>
<td class="cell-padded border-right">
$spedizione$ &nbsp;
<td class="cell-padded">
'.(!empty($volume) ? Translator::numberToLocale($volume) : '').' &nbsp;
</td>
<td class="cell-padded">
$vettore$ &nbsp;
</td>
</tr>
<td class="cell-padded">
$spedizione$ &nbsp;
</td>
</tr>
</table>';
// Firme
echo '
<table class="table-bordered">
<tr>
<th class="border-bottom border-right">
<th class="small" style="width:33%">
'.tr('Firma conducente', [], ['upper' => true]).'
</th>
<th class="border-bottom border-right">
<th class="small" style="width:33%">
'.tr('Firma vettore', [], ['upper' => true]).'
</th>
<th class="border-bottom">
<th class="small" style="width:33%">
'.tr('Firma destinatario', [], ['upper' => true]).'
</th>
</tr>
<tr>
<td class="cell-padded border-right">
&nbsp;<br>&nbsp;
</td>
<td class="cell-padded border-right">
&nbsp;<br>&nbsp;
</td>
<td class="cell-padded">
&nbsp;<br>&nbsp;
</td>
<td style="height: 10mm"></td>
<td style="height: 10mm"></td>
<td style="height: 10mm"></td>
</tr>
</table>';

View File

@ -71,7 +71,7 @@ echo '
<div class="col-xs-5 col-xs-offset-1">
<table class="table" style="width:100%;margin-top:5mm;">
<tr>
<td class="border-full" style="height:16mm;">
<td class="border-full" style="height:20mm;">
<p class="small-bold">'.tr('Spett.le', [], ['upper' => true]).'</p>
<p>$c_ragionesociale$</p>
<p>$c_indirizzo$ $c_citta_full$</p>

View File

@ -9,15 +9,15 @@ $autofill = [
'words' => 70, // Numero di parolo dopo cui contare una riga nuova
'rows' => 20, // Numero di righe massimo presente nella pagina
'additional' => 15, // Numero di righe massimo da aggiungere
'columns' => 6, // Numero di colonne della tabella
'columns' => 5, // Numero di colonne della tabella
];
$v_iva = [];
$v_totale = [];
$sconto = 0;
$imponibile = 0;
$iva = 0;
$sconto = [];
$imponibile = [];
$iva = [];
// Intestazione tabella per righe
echo "
@ -25,11 +25,10 @@ echo "
<thead>
<tr>
<th class='text-center' style='width:50%'>".tr('Descrizione', [], ['upper' => true])."</th>
<th class='text-center' style='width:10%'>".tr('Q.tà', [], ['upper' => true])."</th>
<th class='text-center' style='width:7%'>".tr('Um', [], ['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:7%'>".tr('IVA', [], ['upper' => true]).' (%)</th>
<th class='text-center' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>
</tr>
</thead>
@ -38,8 +37,9 @@ echo "
// RIGHE FATTURA CON ORDINAMENTO UNICO
$righe = $dbo->fetchArray("SELECT *, IFNULL((SELECT codice FROM mg_articoli WHERE id=idarticolo),'') AS codice_articolo, (SELECT percentuale FROM co_iva WHERE id=idiva) AS perc_iva FROM `co_righe_documenti` WHERE iddocumento=".prepare($iddocumento).' ORDER BY `order`');
foreach ($righe as $r) {
$autofill['count'] += ceil(strlen($r['descrizione']) / $autofill['words']);
$autofill['count'] += substr_count($r['descrizione'], PHP_EOL);
$count = 0;
$count += ceil(strlen($r['descrizione']) / $autofill['words']);
$count += substr_count($r['descrizione'], PHP_EOL);
echo '
<tr>
@ -51,7 +51,6 @@ foreach ($righe as $r) {
<br><small>'.tr('COD. _COD_', [
'_COD_' => $r['codice_articolo'],
]).'</small>';
$autofill['count'] += 0.4;
}
// Aggiunta riferimento a ordine
@ -64,7 +63,6 @@ foreach ($righe as $r) {
'_NUM_' => $numero,
'_DATE_' => Translator::dateToLocale($rso[0]['data']),
]).'</small>';
$autofill['count'] += 0.4;
}
// Aggiunta riferimento a ddt
@ -77,20 +75,19 @@ foreach ($righe as $r) {
'_NUM_' => $numero,
'_DATE_' => Translator::dateToLocale($rso[0]['data']),
]).'</small>';
$autofill['count'] += 0.4;
}
// Aumento del conteggio
if ((!empty($r['codice_articolo']) || !empty($r['idordine']) || !empty($r['idddt'])) && $count <= 1) {
$count += 0.4;
}
echo '
</td>';
echo "
<td class='text-center'>
".(empty($r['qta']) ? '' : Translator::numberToLocale($r['qta'], 2)).'
</td>';
// Unità di miusura
echo "
<td class='text-center'>
".nl2br(strtoupper($r['um'])).'
".Translator::numberToLocale($r['qta'], 2).' '.$r['um'].'
</td>';
// Prezzo unitario
@ -105,7 +102,9 @@ foreach ($righe as $r) {
".(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'], 2)).' &euro;';
if ($r['sconto'] > 0) {
$autofill['count'] += 0.4;
if ($count <= 1) {
$count += 0.4;
}
echo "
<br><small class='help-block'>- sconto ".Translator::numberToLocale($r['sconto_unitario']).($r['tipo_sconto'] == 'PRC' ? '%' : ' &euro;').'</small>';
}
@ -120,9 +119,11 @@ foreach ($righe as $r) {
</td>
</tr>';
$imponibile += $r['subtotale'];
$iva += $r['iva'];
$sconto += $r['sconto'];
$autofill['count'] += $count;
$imponibile[] = $r['subtotale'];
$iva[] = $r['iva'];
$sconto[] = $r['sconto'];
$v_iva[$r['desc_iva']] += $r['iva'];
$v_totale[$r['desc_iva']] += $r['subtotale'] - $r['sconto'];
@ -133,7 +134,6 @@ echo '
</tbody>
</table>';
// Aggiungo diciture per condizioni iva particolari
foreach ($v_iva as $key => $value) {
$dicitura = $dbo->fetchArray('SELECT dicitura FROM co_iva WHERE descrizione = '.prepare($key));
@ -143,8 +143,8 @@ foreach ($v_iva as $key => $value) {
echo "
<p class='text-center'>
<b>".nl2br($testo)."</b>
</p>";
<b>".nl2br($testo).'</b>
</p>';
}
}
@ -156,6 +156,8 @@ if (!empty($records[0]['note'])) {
}
// Info per il footer
$totale_iva = $iva;
$imponibile_documento = $imponibile - $sconto;
$totale_documento = $imponibile - $sconto + $totale_iva;
$imponibile = sum($imponibile);
$iva = sum($iva);
$sconto = sum($sconto);
$totale = $imponibile + $iva - $sconto;

View File

@ -3,24 +3,20 @@
// SCADENZE | TOTALI
// TABELLA PRINCIPALE
echo "
<table>
<table class='table-bordered'>
<tr>
<td style='width:158.6mm;' class='border-top border-left'></td>
<td style='width:33mm;' class='border-full'>
<p class='small-bold'>".tr('Totale imponibile', [], ['upper' => true])."</p>
</td>
</tr>
<tr>
<td rowspan=10 class='border-right border-bottom border-left cell-padded'>";
<td colspan=".(!empty($sconto) ? 5 : 3)." class='cell-padded' style='height:".(!empty($records[0]['ritenutaacconto']) ? 20 : 30)."mm'>";
// Tabella (scadenze + iva)
echo "
<table>
<table class='table-normal'>
<tr>
<td style='width:10mm;'>&nbsp;</td>
<td style='width:45mm;'>
<table>
<table class='border-bottom'>
<tr>
<td colspan='2' class='border-bottom'>
<td colspan='2'>
<p class='small-bold'>".tr('Scadenze pagamenti', [], ['upper' => true]).'</p>
</td>
</tr>';
@ -31,25 +27,16 @@ if (!empty($rs2)) {
for ($i = 0; $i < sizeof($rs2); ++$i) {
echo "
<tr>
<td style='width:50%;' class='border-bottom'>
<td style='width:50%;'>
<small>".Translator::dateToLocale($rs2[$i]['scadenza'])."</small>
</td>
<td style='width:50%;' align='right' class='border-bottom'>
<td style='width:50%;' class='text-right'>
<small>".Translator::numberToLocale($rs2[$i]['da_pagare'], 2).' &euro;</small>
</td>
</tr>';
}
} else {
echo "
<tr>
<td style='width:50%;'>
&nbsp;
</td>
<td style='width:50%;' align='right'>
&nbsp;
</td>
</tr>";
}
echo '
</table>
</td>';
@ -64,34 +51,34 @@ echo "
<td style='width:75mm;'>";
if (!empty($v_iva)) {
echo "
<table>
<table class='border-bottom'>
<tr>
<td style='width:40mm;' class='border-bottom'>
<td style='width:40mm;'>
<p class='small-bold'>".tr('Aliquota IVA', [], ['upper' => true])."</p>
</td>
<td style='width:20mm;' class='border-bottom text-center'>
<td style='width:20mm;' class='text-center'>
<p class='small-bold'>".tr('Importo', [], ['upper' => true])."</p>
</td>
<td style='width:20mm;' class='border-bottom text-center'>
<td style='width:20mm;' class='text-center'>
<p class='small-bold'>".tr('Importo IVA', [], ['upper' => true]).'</p>
</td>
</tr>';
foreach ($v_iva as $desc_iva => $tot_iva) {
if (!empty($desc_iva)) {
echo "
echo '
<tr>
<td style='' class='border-bottom'>
<small>".$desc_iva."</small>
<td>
<small>'.$desc_iva."</small>
</td>
<td style='' align='right' class='border-bottom'>
<td class='text-right'>
<small>".Translator::numberToLocale($v_totale[$desc_iva], 2)." &euro;</small>
</td>
<td style='' align='right' class='border-bottom'>
<td class='text-right'>
<small>".Translator::numberToLocale($v_iva[$desc_iva], 2).' &euro;</small>
</td>
</tr>';
@ -114,67 +101,86 @@ echo '
echo '
</td>';
// TOTALE IMPONIBILE
// TOTALI
$width = round(100/(!empty($sconto) ? 5 : 3), 2);
echo "
<td style='text-align:right;' class='border-bottom border-right cell-padded'>
".Translator::numberToLocale($imponibile_documento, 2).' &euro;
<tr>
<th class='text-center small' style='width:".$width."'>
".tr('Imponibile', [], ['upper' => true])."
</th>";
if (!empty($sconto)) {
echo "
<th class='text-center small' style='width:".$width."'>
".tr('Sconto', [], ['upper' => true])."
</th>
<th class='text-center small' style='width:".$width."'>
".tr('Imponibile scontato', [], ['upper' => true])."
</th>";
}
echo "
<th class='text-center small' style='width:".$width."'>
".tr('Totale IVA', [], ['upper' => true])."
</th>
<th class='text-center small' style='width:".$width."'>
".tr('Totale documento', [], ['upper' => true])."
</th>
</tr>
<tr>
<td class='cell-padded text-center'>
".Translator::numberToLocale($imponibile, 2)." &euro;
</td>";
if (!empty($sconto)) {
echo "
<td class='cell-padded text-center'>
".Translator::numberToLocale($sconto, 2)." &euro;
</td>
<td class='cell-padded text-center'>
".Translator::numberToLocale($imponibile - $sconto, 2)." &euro;
</td>";
}
echo "
<td class='cell-padded text-center'>
".Translator::numberToLocale($iva, 2)." &euro;
</td>
<td class='cell-padded text-center'>
".Translator::numberToLocale($totale, 2).' &euro;
</td>
</tr>';
// Riga 2
echo "
<tr>
<td style='width:33mm;' class='border-bottom border-right'>
<p class='small-bold'>".tr('Totale IVA', [], ['upper' => true])."</p>
</td>
</tr>
<tr>
<td style='text-align:right;' class='border-bottom border-right cell-padded'>
".Translator::numberToLocale($totale_iva, 2)." &euro;
</td>
</tr>
<tr>
<td class='border-bottom border-right'>
<p class='small-bold'>".tr('Totale documento', [], ['upper' => true])."</p>
</td>
</tr>
<tr>
<td style='text-align:right;' class='border-bottom border-right cell-padded'>
".Translator::numberToLocale($totale_documento, 2).' &euro;
</td>
</tr>';
// Riga 4 (opzionale, solo se c'è la ritenuta d'acconto)
// Ritenuta d'acconto
if ($records[0]['ritenutaacconto'] != 0) {
$rs2 = $dbo->fetchArray('SELECT percentuale FROM co_ritenutaacconto WHERE id=(SELECT idritenutaacconto FROM co_righe_documenti WHERE iddocumento='.prepare($iddocumento).' AND idritenutaacconto!=0 LIMIT 0,1)');
echo "
<tr>
<td class='border-bottom border-right'>
<p class='small-bold'>".tr("Ritenuta d'acconto _PRC_%", [
'_PRC_' => $rs2[0]['percentuale'],
], ['upper' => true])."</p>
</td>
<th class='text-center small' colspan=".(!empty($sconto) ? 3 : 2).">
".tr("Ritenuta d'acconto _PRC_%", [
'_PRC_' => Translator::numberToLocale($rs2[0]['percentuale'], 0),
], ['upper' => true])."
</th>
<th class='text-center small' colspan=".(!empty($sconto) ? 2 : 1).">
".tr('Netto a pagare', [], ['upper' => true])."
</th>
</tr>
<tr>
<td style='text-align:right;' class='border-bottom border-right cell-padded'>
<td class='cell-padded text-center' colspan=".(!empty($sconto) ? 3 : 2).">
".Translator::numberToLocale($records[0]['ritenutaacconto'], 2)." &euro;
</td>
</tr>
<tr>
<td class='border-bottom border-right'>
<p class='small-bold'>".tr('Netto a pagare', [], ['upper' => true])."</p>
</td>
</tr>
<tr>
<td style='text-align:right;' class='border-bottom border-right cell-padded'>
".Translator::numberToLocale($totale_documento - $records[0]['ritenutaacconto'], 2).' &euro;
<td class='cell-padded text-center' colspan=".(!empty($sconto) ? 2 : 1).">
".Translator::numberToLocale($totale - $records[0]['ritenutaacconto'], 2).' &euro;
</td>
</tr>';
}
@ -183,13 +189,12 @@ echo '
</table>';
echo '
<br>
<table style="font-size:7pt; color:#999;">
<tr><td style="text-align:center;">
$dicitura_fissa_fattura$
</td></tr>
<tr>
<td style="text-align:center;">
$dicitura_fissa_fattura$
</td>
</tr>
</table>
<br>
$pagination$';

View File

@ -75,7 +75,7 @@ echo '
<div class="col-xs-5 col-xs-offset-1">
<table class="table" style="width:100%;margin-top:5mm;">
<tr>
<td colspan=2 class="border-full" style="height:16mm;">
<td colspan=2 class="border-full" style="height:20mm;">
<p class="small-bold">'.tr('Spett.le', [], ['upper' => true]).'</p>
<p>$c_ragionesociale$</p>
<p>$c_indirizzo$ $c_citta_full$</p>

View File

@ -1,6 +1,6 @@
<?php
return [
'header-height' => 80,
'header-height' => 75,
'footer-height' => 60,
];

View File

@ -12,7 +12,7 @@ $report_name = 'intervento_'.$idintervento.'.pdf';
echo '
<table class="table table-bordered">
<tr>
<th colspan="4" style="font-size:14pt;" class="text-center">'.tr('Rapporto operazioni e interventi', [], ['upper' => true]).'</th>
<th colspan="4" style="font-size:13pt;" class="text-center">'.tr('Rapporto operazioni e interventi', [], ['upper' => true]).'</th>
</tr>
<tr>

View File

@ -246,7 +246,7 @@ $resa_materiale = $rs[0]['descrizione'];
echo '
<table class="table table-bordered">
<tr>
<th colspan="2" class="text-center">
<th colspan="2" class="text-center" style="font-size:13pt;">
'.tr('Condizioni generali di fornitura', [], ['upper' => true]).'
</th>
</tr>