Skip to content

Commit

Permalink
[FIX] l10n_es_aeat_mod303: Permitir rellenar las casillas 108 y 111
Browse files Browse the repository at this point in the history
Co-authored-by: Emilio Pascual <53056345+EmilioPascual@users.noreply.github.com>
  • Loading branch information
Shide and EmilioPascual committed Oct 15, 2024
1 parent 9081036 commit c4c395a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@
"aeat_mod303_2024_10_sub03_export_line_21","aeat_mod303_2024_10_sub03_export_config",21,"Resultado - Cuotas a compensar de periodos anteriores aplicadas en este periodo [78]","float",17,2,"right",0,"N",0," ","X","${object.cuota_compensar}",,,,
"aeat_mod303_2024_10_sub03_export_line_22","aeat_mod303_2024_10_sub03_export_config",22,"Resultado - Cuotas a compensar de periodos previos pendientes para periodos posteriores ([110] - [78]) [87]","float",17,2,"right",0,"N",0," ","X","${object.remaining_cuota_compensar}",,,,
"aeat_mod303_2024_10_sub03_export_line_23","aeat_mod303_2024_10_sub03_export_config",23,"Resultado - Exclusivamente para sujetos pasivos que tributan conjuntamente a la Administración del Estado y a las Diputaciones Forales Resultado de la regularización anual [68]","float",17,2,"right",1,"N",0," ","X","${object.regularizacion_anual}",,,,
"aeat_mod303_2024_10_sub03_export_line_24","aeat_mod303_2024_10_sub03_export_config",24,"Resultado - Resultado de la autoliquidación ([66] + [77] - [78] + [68]) [69]","float",17,2,"right",1,"N",0," ","X","${object.casilla_69}",,,,
"aeat_mod303_2024_10_sub03_export_line_24","aeat_mod303_2024_10_sub03_export_config",24,"Resultado - Resultado de la autoliquidación ([66] + [77] - [78] + [68] + [108]) [69]","float",17,2,"right",1,"N",0," ","X","${object.casilla_69}",,,,
"aeat_mod303_2024_10_sub03_export_line_25","aeat_mod303_2024_10_sub03_export_config",25,"Resultado - Resultados a ingresar de anteriores autoliquidaciones o liquidaciones administrativas correspondientes al ejercicio y período objeto de la autoliquidación [70]","float",17,2,"right",1,"N",0," ","X","${object.previous_result}",,,,
"aeat_mod303_2024_10_sub03_export_line_26","aeat_mod303_2024_10_sub03_export_config",26,"Resultado - Devoluciones acordadas por la Agencia Tributaria como consecuencia de la tramitación de anteriores autoliquidaciones correspondientes al ejercicio y período objeto de la autoliquidación [109] (fijado a 0)","float",17,2,"right",1,"N",0," ","X",,0,,,
"aeat_mod303_2024_10_sub03_export_line_27","aeat_mod303_2024_10_sub03_export_config",27,"Resultado - Resultado de la liquidación ( [69] - [70] + [109] ) [71]","float",17,2,"right",1,"N",0," ","X","${object.resultado_liquidacion}",,,,
"aeat_mod303_2024_10_sub03_export_line_28","aeat_mod303_2024_10_sub03_export_config",28,"Declaración sin actividad","boolean",1,0,"left",1,"N",0," ","X","${object.result_type == 'N'}",,,,
"aeat_mod303_2024_10_sub03_export_line_29","aeat_mod303_2024_10_sub03_export_config",29,"Rectificativa - Autoliquidación rectificativa","boolean",1,0,"left",1,"N",0," ","X","${object.statement_type == 'C'}",,,,
"aeat_mod303_2024_10_sub03_export_line_30","aeat_mod303_2024_10_sub03_export_config",30,"Rectificativa - Número justificante identificativo de la autoliquidación anterior","string",13,0,"left",1,"N",0," ","X","${object.previous_number}",,,,
"aeat_mod303_2024_10_sub03_export_line_31","aeat_mod303_2024_10_sub03_export_config",31,"Rectificativa - Como consecuencia de la presentación de la autoliquidación rectificativa solicito dar de baja/modificar la domiciliación efectuada (TODO)","boolean",1,0,"left",1,"N",0," ","X","${False}",,,,
"aeat_mod303_2024_10_sub03_export_line_32","aeat_mod303_2024_10_sub03_export_config",32,"Rectificativa - Exclusivamente para determinados supuestos de autoliquidación rectificativa por discrepancia de criterio administrativo que no deban incluirse en otras casillas. Otros ajustes [108] (TODO: Forzado a 0)","float",17,2,"right",1,"N",0," ","X",,0,,,
"aeat_mod303_2024_10_sub03_export_line_33","aeat_mod303_2024_10_sub03_export_config",33,"Rectificativa - Rectificación - Importe [111] (TODO: Forzado a 0)","float",17,2,"right",1,"N",0," ","X",,0,,,
"aeat_mod303_2024_10_sub03_export_line_32","aeat_mod303_2024_10_sub03_export_config",32,"Rectificativa - Exclusivamente para determinados supuestos de autoliquidación rectificativa por discrepancia de criterio administrativo que no deban incluirse en otras casillas. Otros ajustes [108]","float",17,2,"right",1,"N",0," ","X","${object.casilla_108}",,,,
"aeat_mod303_2024_10_sub03_export_line_33","aeat_mod303_2024_10_sub03_export_config",33,"Rectificativa - Rectificación - Importe [111]","float",17,2,"right",1,"N",0," ","X","${object.casilla_111}",,,,
"aeat_mod303_2024_10_sub03_export_line_34","aeat_mod303_2024_10_sub03_export_config",34,"Reservado para la AEAT","string",120,0,"left",1,"N",0," ","X",,,,,
"aeat_mod303_2024_10_sub03_export_line_35","aeat_mod303_2024_10_sub03_export_config",35,"Rectificativa - Motivo de la rectificación: Rectificaciones (excepto incluidas en el motivo siguiente) (TODO: Forzado a True si es Complementaria)","boolean",1,0,"left",1,"N",0," ","X","${object.statement_type == 'C'}",,,,
"aeat_mod303_2024_10_sub03_export_line_36","aeat_mod303_2024_10_sub03_export_config",36,"Rectificativa - Motivo de la rectificación: Discrepancia criterio administrativo (TODO)","boolean",1,0,"left",1,"N",0," ","X","${False}",,,,
Expand Down
23 changes: 21 additions & 2 deletions l10n_es_aeat_mod303/models/mod303.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ class L10nEsAeatMod303Report(models.Model):
compute="_compute_casilla_69",
help="[66] Attributable to the Administration - "
"[67] Fees to compensate + "
"[68] Annual regularization",
"[68] Annual regularization +"
"[108] Other Adjustments",
store=True,
)
casilla_77 = fields.Float(
Expand All @@ -139,6 +140,19 @@ class L10nEsAeatMod303Report(models.Model):
"when the requirements of Article 74.1 of the Tax Regulations "
"Value Added are met.",
)
casilla_108 = fields.Float(
string="[108] Other Adjustments",
help="Exclusively for certain cases of rectifying self-assessment due "
"to discrepancy of administrative criteria that should not be "
"included in other boxes. Other adjustments",
)
casilla_111 = fields.Float(
string="[111] Refund of improperly collected funds",
help="I request that the amount that, if applicable, may be refunded "
"as a consequence of the rectification, be paid to me by bank "
"transfer to the indicated account of which I am the account holder"
" to the indicated bank account of which I am the account holder",
)
previous_result = fields.Float(
string="[70] To be deducted",
help="Result of the previous or prior statements of the same concept, "
Expand Down Expand Up @@ -423,7 +437,11 @@ def _compute_remaining_cuota_compensar(self):
)

@api.depends(
"atribuible_estado", "cuota_compensar", "regularizacion_anual", "casilla_77"
"atribuible_estado",
"cuota_compensar",
"regularizacion_anual",
"casilla_77",
"casilla_108",
)
def _compute_casilla_69(self):
for report in self:
Expand All @@ -432,6 +450,7 @@ def _compute_casilla_69(self):
+ report.casilla_77
- report.cuota_compensar
+ report.regularizacion_anual
+ report.casilla_108
)

@api.depends("casilla_69", "previous_result")
Expand Down
3 changes: 2 additions & 1 deletion l10n_es_aeat_mod303/tests/test_l10n_es_aeat_mod303.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ def test_model_303(self):
)
subtotal = round(devengado - deducir, 3)
estado = round(subtotal * 0.95, 3)
result = round(estado + 455 - 250, 3)
self.model303.casilla_108 = 200
result = round(estado + 455 - 250 + 200, 3)
self.assertAlmostEqual(self.model303.total_devengado, devengado, 2)
self.assertAlmostEqual(self.model303.total_deducir, deducir, 2)
self.assertAlmostEqual(self.model303.casilla_46, subtotal, 2)
Expand Down
12 changes: 12 additions & 0 deletions l10n_es_aeat_mod303/views/mod303_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@
widget="monetary"
options="{'currency_field': 'currency_id'}"
/>
<field
name="casilla_108"
widget="monetary"
options="{'currency_field': 'currency_id'}"
attrs="{'invisible': [('statement_type', '!=', 'S')]}"
/>
<field
name="casilla_111"
widget="monetary"
options="{'currency_field': 'currency_id'}"
attrs="{'invisible': [('statement_type', '!=', 'S')]}"
/>
<field
name="casilla_69"
widget="monetary"
Expand Down

0 comments on commit c4c395a

Please sign in to comment.