mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-03 09:17:37 +01:00
Miglioria stampa liquidazione iva #1281
This commit is contained in:
parent
0631684dbd
commit
0f1cf8bc2a
@ -45,6 +45,9 @@ $totale_iva_periodo_precedente = $totale_iva_vendite_periodo_precedente - $total
|
||||
$totale_iva = $totale_iva_esigibile - $totale_iva_detraibile;
|
||||
|
||||
if ($periodo['valore'] == 'Trimestrale' && $totale_iva > 0) {
|
||||
if ($totale_iva_periodo_precedente < 25.82 && $totale_iva_periodo_precedente > 0) {
|
||||
$totale_iva += $totale_iva_periodo_precedente;
|
||||
}
|
||||
$maggiorazione = $totale_iva * 0.01;
|
||||
$totale_iva_maggiorata = $totale_iva + $maggiorazione;
|
||||
}
|
||||
@ -258,7 +261,7 @@ echo '
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TOTALE IVA DETRAIBILI</td>
|
||||
<td class=text-right>'.moneyFormat($totale_iva_detraibile, 2).'</td>
|
||||
<td class=text-right>'.(empty($totale_iva_nondetraibile) ? '' : moneyformat($totale_iva_detraibile - $totale_iva_nondetraibile, 2)).'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>VARIAZIONE DI IMPOSTA RELATIVE A PERIODI PRECEDENTI</td>';
|
||||
@ -313,8 +316,13 @@ echo '
|
||||
<tr>
|
||||
<td>IMPORTO DA VERSARE</td>';
|
||||
if ($totale_iva > 25.82) {
|
||||
if ($periodo['valore'] == 'Mensile' || ($totale_iva_periodo_precedente < 25.82 && $totale_iva_periodo_precedente > 0)) {
|
||||
echo'
|
||||
<td class=text-right>'.($periodo['valore'] == 'Mensile' ? moneyFormat($totale_iva, 2) : moneyFormat($totale_iva_maggiorata, 2)).'</td>';
|
||||
<td class=text-right>'.moneyFormat($totale_iva, 2).'</td>';
|
||||
} else {
|
||||
echo'
|
||||
<td class=text-right>'.moneyFormat($totale_iva_maggiorata, 2).'</td>';
|
||||
}
|
||||
} else {
|
||||
echo'
|
||||
<td class=text-right></td>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user