Skip to content

Commit 0eb89af

Browse files
[FIX] l10n_es_aeat_mod390: Zero out casilla 662 when last period is a refund
When the last 303 period is a refund (result types D, V or X), the taxpayer is reclaiming the full accumulated VAT balance for the year. Therefore, field [662] (compensation pending for future years) must be set to 0, as there is nothing left to carry forward.
1 parent 140cb48 commit 0eb89af

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

l10n_es_aeat_mod390/models/mod390.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,10 @@ def calculate(self):
852852
casilla_97 = abs(report_303_last_period.resultado_liquidacion)
853853
elif report_303_last_period[0].result_type in {"D", "V", "X"}:
854854
# Si salió a devolver, casilla 98 = casilla 71 del último periodo
855-
# del año si fue a devolver
855+
# del año si fue a devolver. Al solicitar la devolución, el saldo
856+
# acumulado se recibe de vuelta, por lo que no queda nada pendiente
857+
# de compensar para años siguientes (casilla 662 = 0).
858+
casilla_662 = 0.0
856859
casilla_98 = abs(report_303_last_period.resultado_liquidacion)
857860
mod390.update(
858861
{

0 commit comments

Comments
 (0)