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 <[email protected]>
  • Loading branch information
2 people authored and ljsalvatierra-factorlibre committed Oct 18, 2024
1 parent 3fdb681 commit f21c6c4
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 18 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.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)","boolean",1,0,"left",1,"N",0," ","X","${True}",,,,
"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
49 changes: 37 additions & 12 deletions l10n_es_aeat_mod303/models/mod303.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,32 @@ def _default_counterpart_303(self):
casilla_69 = fields.Float(
string="[69] Result", readonly=True, compute='_compute_casilla_69',
help="[66] Attributable to the Administration - "
"[67] Fees to compensate + "
"[68] Annual regularization", store=True)
"[67] Fees to compensate + "
"[68] Annual regularization +"
"[108] Other Adjustments",
store=True,
)
casilla_77 = fields.Float(
string="[77] VAT deferred (Settle by customs)",
help="Contributions of import tax included in the documents "
"evidencing the payment made by the Administration and received "
"in the settlement period. You can only complete this box "
"when the requirements of Article 74.1 of the Tax Regulations "
"Value Added are met.")
"evidencing the payment made by the Administration and received "
"in the settlement period. You can only complete this box "
"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 @@ -365,14 +382,22 @@ def _compute_remaining_cuota_compensar(self):
record.potential_cuota_compensar - record.cuota_compensar
)

@api.multi
@api.depends('atribuible_estado', 'cuota_compensar',
'regularizacion_anual', 'casilla_77')
@api.depends(
"atribuible_estado",
"cuota_compensar",
"regularizacion_anual",
"casilla_77",
"casilla_108",
)
def _compute_casilla_69(self):
for report in self:
report.casilla_69 = (
report.atribuible_estado + report.casilla_77 -
report.cuota_compensar + report.regularizacion_anual)
report.casilla_69 = report.currency_id.round(
report.atribuible_estado
+ report.casilla_77
- report.cuota_compensar
+ report.regularizacion_anual
+ report.casilla_108
)

@api.multi
@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 @@ -337,7 +337,8 @@ def test_model_303(self):
'29', '31', '33', '35', '37', '39', '41', '42', '43', '44')])
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
17 changes: 15 additions & 2 deletions l10n_es_aeat_mod303/views/mod303_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,21 @@
<field name="casilla_77"
widget="monetary"
options="{'currency_field': 'currency_id'}"
/>
<field name="casilla_69"
/>
<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"
options="{'currency_field': 'currency_id'}"
/>
Expand Down

0 comments on commit f21c6c4

Please sign in to comment.