Miglioria grafica stampa intervento

This commit is contained in:
valentina 2024-07-30 16:32:44 +02:00
parent 7d507f2b3d
commit cff58f2ebc
1 changed files with 49 additions and 48 deletions

View File

@ -31,52 +31,53 @@ $d_totali = (int) setting('Cifre decimali per totali in stampa');
Dati intervento Dati intervento
*/ */
echo ' echo '
<br>
<table class="table border-bottom"> <table class="table border-bottom">
<tr> <tr>
<th colspan="4" class="text-center" style="font-size:11pt;">'.tr('Rapporto attività', [], ['upper' => true]).'</th> <th colspan="4" class="text-center">'.tr('Rapporto attività', [], ['upper' => true]).'</th>
</tr> </tr>
<tr> <tr>
<td> <td>
<p class="small-bold text-muted">'.tr('Cliente', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Cliente', [], ['upper' => true]).':</p>
</td> </td>
<td class="text-right"> <td>
'.$c_ragionesociale.' <b>'.$c_ragionesociale.'</b>
</td>'; </td>';
// Indirizzo // Indirizzo
if (!empty($s_indirizzo) or !empty($s_cap) or !empty($s_citta) or !empty($s_provincia)) { if (!empty($s_indirizzo) or !empty($s_cap) or !empty($s_citta) or !empty($s_provincia)) {
echo ' echo '
<td> <td>
<p class="small-bold text-muted">'.tr('Indirizzo', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Indirizzo', [], ['upper' => true]).':</p>
</td> </td>
<td class="text-right"> <td>
'.$s_indirizzo.' '.$s_cap.' - '.$s_citta.' ('.strtoupper((string) $s_provincia).') <b>'.$s_indirizzo.' '.$s_cap.' - '.$s_citta.' ('.strtoupper((string) $s_provincia).'</b>)
</td>'; </td>';
} elseif (!empty($c_indirizzo) or !empty($c_cap) or !empty($c_citta) or !empty($c_provincia)) { } elseif (!empty($c_indirizzo) or !empty($c_cap) or !empty($c_citta) or !empty($c_provincia)) {
echo ' echo '
<td> <td>
<p class="small-bold text-muted">'.tr('Indirizzo', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Indirizzo', [], ['upper' => true]).':</p>
</td> </td>
<td class="text-right"> <td>
'.$c_indirizzo.' '.$c_cap.' - '.$c_citta.' ('.strtoupper((string) $c_provincia).') <b>'.$c_indirizzo.' '.$c_cap.' - '.$c_citta.' ('.strtoupper((string) $c_provincia).')</b>
</td>'; </td>';
} }
echo ' echo '
</tr> </tr>
<tr> <tr>
<td> <td>
<p class="small-bold text-muted">'.tr('Attività n.', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Attività n.', [], ['upper' => true]).':</p>
</td>
<td class="text-right">
'.$documento['codice'].'
</td> </td>
<td> <td>
<p class="small-bold text-muted">'.tr('Data richiesta', [], ['upper' => true]).'</p> <b>'.$documento['codice'].'</b>
</td> </td>
<td class="text-right"> <td>
'.Translator::dateToLocale($documento['data_richiesta']).' <p class="small-bold text-muted">'.tr('Data richiesta', [], ['upper' => true]).':</p>
</td>
<td>
<b>'.Translator::dateToLocale($documento['data_richiesta']).'</b>
</td> </td>
</tr>'; </tr>';
@ -86,16 +87,16 @@ if (!empty($preventivo) or !empty($contratto)) {
echo ' echo '
<tr> <tr>
<td> <td>
<p class="small-bold text-muted">'.tr('Preventivo n.', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Preventivo n.', [], ['upper' => true]).':</p>
</td>
<td class="text-right">
'.(!empty($preventivo) ? $preventivo['numero'].' del '.Translator::dateToLocale($preventivo['data_bozza']) : 'Nessuno').'
</td> </td>
<td> <td>
<p class="small-bold text-muted">'.tr('Contratto n.', [], ['upper' => true]).'</p> <b>'.(!empty($preventivo) ? $preventivo['numero'].' del '.Translator::dateToLocale($preventivo['data_bozza']) : 'Nessuno').'</b>
</td> </td>
<td class="text-right"> <td>
'.(!empty($contratto) ? $contratto['numero'].' del '.Translator::dateToLocale($contratto['data_bozza']) : 'Nessuno').' <p class="small-bold text-muted">'.tr('Contratto n.', [], ['upper' => true]).':</p>
</td>
<td>
<b>'.(!empty($contratto) ? $contratto['numero'].' del '.Translator::dateToLocale($contratto['data_bozza']) : 'Nessuno').'</b>
</td> </td>
</tr>'; </tr>';
} }
@ -103,31 +104,31 @@ if (!empty($preventivo) or !empty($contratto)) {
echo ' echo '
<tr> <tr>
<td> <td>
<p class="small-bold text-muted">'.tr('P.Iva', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('P.Iva', [], ['upper' => true]).':</p>
</td> </td>
<td class="text-right"> <td >
'.strtoupper((string) $c_piva).' <b>'.strtoupper((string) $c_piva).'</b>
</td> </td>
<td> <td>
<p class="small-bold text-muted">'.tr('C.F.', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('C.F.', [], ['upper' => true]).':</p>
</td> </td>
<td class="text-right"> <td >
'.strtoupper((string) $c_codicefiscale).' <b>'.strtoupper((string) $c_codicefiscale).'</b>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<p class="small-bold text-muted">'.tr('Telefono', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Telefono', [], ['upper' => true]).':</p>
</td>
<td class="text-right">
'.$c_telefono.'
</td> </td>
<td> <td>
<p class="small-bold text-muted">'.tr('Cellulare', [], ['upper' => true]).'</p> <b>'.$c_telefono.'</b>
</td> </td>
<td class="text-right"> <td>
'.$c_cellulare.' <p class="small-bold text-muted">'.tr('Cellulare', [], ['upper' => true]).':</p>
</td>
<td>
<b>'.$c_cellulare.'</b>
</td> </td>
</tr>'; </tr>';
@ -141,16 +142,16 @@ for ($j = 0; $j < count($rs2); ++$j) {
echo ' echo '
<tr> <tr>
<td> <td>
<p class="small-bold text-muted">'.tr('Impianti', [], ['upper' => true]).'</p> <p class="small-bold text-muted">'.tr('Impianti', [], ['upper' => true]).':</p>
</td>
<td class="text-right">
'.implode(', ', $impianti).'
</td> </td>
<td> <td>
<p class="small-bold text-muted">'.tr('Tipo intervento', [], ['upper' => true]).'</p> <b>'.implode(', ', $impianti).'</b>
</td> </td>
<td class="text-right"> <td>
'.$documento->tipo->getTranslation('title').' <p class="small-bold text-muted">'.tr('Tipo intervento', [], ['upper' => true]).':</p>
</td>
<td>
<b>'.$documento->tipo->getTranslation('title').'</b>
</td> </td>
</tr>'; </tr>';
@ -159,9 +160,9 @@ echo '
echo ' echo '
<tr> <tr>
<td colspan="2"> <td colspan="2">
<p class="small-bold text-muted">'.tr('Richiesta', [], ['upper' => true]).'</p> <p class="small-bold">'.tr('Richiesta', [], ['upper' => true]).':</p>
</td> </td>
<td style="width:350px" colspan="2" class="text-right"> <td style="width:350px" colspan="2">
<p>'.$documento['richiesta'].'</p> <p>'.$documento['richiesta'].'</p>
</td> </td>
</tr>'; </tr>';
@ -171,9 +172,9 @@ echo '
echo ' echo '
<tr> <tr>
<td colspan="2"> <td colspan="2">
<p class="small-bold text-muted">'.tr('Descrizione', [], ['upper' => true]).'</p> <p class="small-bold">'.tr('Descrizione', [], ['upper' => true]).':</p>
</td> </td>
<td style="width:350px" colspan="2" class="text-right"> <td style="width:350px" colspan="2">
<p>'.$documento['descrizione'].'</p> <p>'.$documento['descrizione'].'</p>
</td> </td>
</tr> </tr>