Fix stampe contabili

This commit is contained in:
valentina 2024-07-16 16:28:52 +02:00
parent 6fc5eb0aa6
commit d71d0b705a
3 changed files with 20 additions and 21 deletions

View File

@ -224,7 +224,7 @@ class Prints
$link .= !empty($infos['previous']) && !empty($id_record) ? '&'.$infos['previous'].'='.$id_record : '';
} else {
$link .= 'id_print='.$infos['id'];
$link .= 'id_print='.$infos;
$link .= !empty($id_record) ? '&id_record='.$id_record : '';
}

View File

@ -93,7 +93,7 @@ foreach ($liv2_patrimoniale as $liv2_p) {
echo '
<tr>
<td colspan="2"><h6><b>Totale Attività</b></h6></td>
<td class="text-right" style="font-size:8pt;"><b>'.numberFormat(abs($totale_attivita), 2).'</b></td>
<td class="text-right" style="font-size:8pt;"><b>'.($totale_attivita ? numberFormat(abs($totale_attivita), 2): '').'</b></td>
</tr>';
if ($utile_perdita > 0) {
echo '
@ -182,7 +182,7 @@ foreach ($liv2_patrimoniale as $liv2_p) {
echo '
<tr>
<td colspan="2"><h6><b>Totale Passività</b></h6></td>
<td class="text-right" style="font-size:8pt;"><b>'.numberFormat(abs($totale_passivita), 2).'</b></td>
<td class="text-right" style="font-size:8pt;"><b>'.($totale_passivita ? numberFormat(abs($totale_passivita), 2):'').'</b></td>
</tr>';
if ($utile_perdita < 0) {
echo '
@ -262,7 +262,7 @@ foreach ($liv2_economico as $liv2_e) {
echo '
<tr>
<td colspan="2"><h6><b>Totale costi</b></h6></td>
<td class="text-right" style="font-size:8pt;"><b>'.numberFormat(abs($totale_costi), 2).'</b></td>
<td class="text-right" style="font-size:8pt;"><b>'.($totale_costi ? numberFormat(abs($totale_costi), 2) : '').'</b></td>
<td></td>
</tr>';
if ($utile_perdita < 0) {
@ -274,7 +274,7 @@ if ($utile_perdita < 0) {
</tr>
<tr>
<td colspan="2"><h6><b>Totale a pareggio</b></h6></td>
<td class="text-right" style="font-size:8pt;"><b>'.numberFormat(abs($totale_costi) + abs($utile_perdita), 2).'</b></td>
<td class="text-right" style="font-size:8pt;"><b>'.($totale_costi ? numberFormat(abs($totale_costi)) : 0) + ($utile_perdita ? numberFormat(abs($utile_perdita), 2) : 0).'</b></td>
<td></td>
</tr>';
}
@ -335,7 +335,7 @@ foreach ($liv2_economico as $liv2_e) {
echo '
<tr>
<td colspan="2"><h6><b>Totale ricavi</b></h6></td>
<td style="font-size:8pt;" class="text-right"><b>'.numberFormat(abs($totale_ricavi), 2).'</b></td>
<td style="font-size:8pt;" class="text-right"><b>'.($totale_ricavi ? numberFormat(abs($totale_ricavi), 2) : '').'</b></td>
<td></td>
</tr>';
if ($utile_perdita > 0) {

View File

@ -48,8 +48,9 @@ if (get('lev') == '2' || get('lev') == '3') {
$totale_passivo += $patrimoniale[$i]['totale'];
}
}
echo '</table>
<table class="table table-striped table-bordered">
echo '
</table>
<table class="table table-striped table-bordered">
<tr>
<th width="25%">TOTALE ATTIVITÀ</th>
<th width="25%" class="text-right">'.moneyFormat(abs($totale_attivo), 2).'</th>
@ -63,7 +64,7 @@ if (get('lev') == '2' || get('lev') == '3') {
<th></th>
<th></th>
<th>UTILE</th>
<th class="text-right">'.moneyFormat(abs($utile_perdita['totale']), 2).'</th>
<th class="text-right">'.($utile_perdita['totale'] ? moneyFormat(abs($utile_perdita['totale']), 2) : 0).'</th>
</tr>';
$totale_passivo = abs($totale_passivo + $utile_perdita['totale']);
} else {
@ -83,7 +84,5 @@ if (get('lev') == '2' || get('lev') == '3') {
<th>TOTALE A PAREGGIO</th>
<th class="text-right">'.moneyFormat(abs($totale_passivo), 2).'</th>
</tr>
</table>';
</table>';
}
echo '</tbody></table>';