Skip to content

Commit c9ad03f

Browse files
committed
[FIX] l10n_es_*_sii: Do breakdown only when needed and mix services and goods properly by default
For simplified invoices, the taxes breakdown is not required, but right now if you make a PoS order mixing goods and services, the dictionary structure is a mix between breakdown and not breakdown. Let's fix it handling properly the no breakdown, and only performing it when needed. But this has led to change the base module, so not doing breakdown on other ocassions that previously were done. TT60718
1 parent 54e8d49 commit c9ad03f

27 files changed

+328
-496
lines changed

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva0_sp_i_s_iva0_g_i_dict.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,18 @@
1616
"ClaveRegimenEspecialOTrascendencia": "01",
1717
"DescripcionOperacion": "/",
1818
"TipoDesglose": {
19-
"DesgloseTipoOperacion": {
20-
"PrestacionServicios": {
21-
"NoSujeta": {
22-
"ImporteTAIReglasLocalizacion": 100.0
23-
}
19+
"DesgloseFactura": {
20+
"NoSujeta": {
21+
"ImporteTAIReglasLocalizacion": 100.0
2422
},
25-
"Entrega": {
26-
"Sujeta": {
27-
"Exenta": {
28-
"DetalleExenta": [
29-
{
30-
"BaseImponible": 200.0,
31-
"CausaExencion": "E5"
32-
}
33-
]
34-
}
23+
"Sujeta": {
24+
"Exenta": {
25+
"DetalleExenta": [
26+
{
27+
"BaseImponible": 200.0,
28+
"CausaExencion": "E5"
29+
}
30+
]
3531
}
3632
}
3733
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva0_sp_i_s_iva0_g_i_same_dict.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,18 @@
1515
"ClaveRegimenEspecialOTrascendencia": "01",
1616
"DescripcionOperacion": "/",
1717
"TipoDesglose": {
18-
"DesgloseTipoOperacion": {
19-
"PrestacionServicios": {
20-
"NoSujeta": {
21-
"ImporteTAIReglasLocalizacion": 100.0
22-
}
18+
"DesgloseFactura": {
19+
"NoSujeta": {
20+
"ImporteTAIReglasLocalizacion": 100.0
2321
},
24-
"Entrega": {
25-
"Sujeta": {
26-
"Exenta": {
27-
"DetalleExenta": [
28-
{
29-
"BaseImponible": 200.0,
30-
"CausaExencion": "E5"
31-
}
32-
]
33-
}
22+
"Sujeta": {
23+
"Exenta": {
24+
"DetalleExenta": [
25+
{
26+
"BaseImponible": 200.0,
27+
"CausaExencion": "E5"
28+
}
29+
]
3430
}
3531
}
3632
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva10b_s_iva21s_dict.json

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,23 @@
1616
"ClaveRegimenEspecialOTrascendencia": "01",
1717
"DescripcionOperacion": "/",
1818
"TipoDesglose": {
19-
"DesgloseTipoOperacion": {
20-
"PrestacionServicios": {
21-
"Sujeta": {
22-
"NoExenta": {
23-
"TipoNoExenta": "S1",
24-
"DesgloseIVA": {
25-
"DetalleIVA": [
26-
{
27-
"TipoImpositivo": "21.0",
28-
"BaseImponible": 200.0,
29-
"CuotaRepercutida": 42.0
30-
}
31-
]
32-
}
33-
}
34-
}
35-
},
36-
"Entrega": {
37-
"Sujeta": {
38-
"NoExenta": {
39-
"TipoNoExenta": "S1",
40-
"DesgloseIVA": {
41-
"DetalleIVA": [
42-
{
43-
"TipoImpositivo": "10.0",
44-
"BaseImponible": 100.0,
45-
"CuotaRepercutida": 10.0
46-
}
47-
]
48-
}
19+
"DesgloseFactura": {
20+
"Sujeta": {
21+
"NoExenta": {
22+
"TipoNoExenta": "S1",
23+
"DesgloseIVA": {
24+
"DetalleIVA": [
25+
{
26+
"TipoImpositivo": "10.0",
27+
"BaseImponible": 100.0,
28+
"CuotaRepercutida": 10.0
29+
},
30+
{
31+
"TipoImpositivo": "21.0",
32+
"BaseImponible": 200.0,
33+
"CuotaRepercutida": 42.0
34+
}
35+
]
4936
}
5037
}
5138
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva10b_s_iva21s_same_dict.json

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,23 @@
1515
"ClaveRegimenEspecialOTrascendencia": "01",
1616
"DescripcionOperacion": "/",
1717
"TipoDesglose": {
18-
"DesgloseTipoOperacion": {
19-
"PrestacionServicios": {
20-
"Sujeta": {
21-
"NoExenta": {
22-
"TipoNoExenta": "S1",
23-
"DesgloseIVA": {
24-
"DetalleIVA": [
25-
{
26-
"TipoImpositivo": "21.0",
27-
"BaseImponible": 200.0,
28-
"CuotaRepercutida": 42.0
29-
}
30-
]
31-
}
32-
}
33-
}
34-
},
35-
"Entrega": {
36-
"Sujeta": {
37-
"NoExenta": {
38-
"TipoNoExenta": "S1",
39-
"DesgloseIVA": {
40-
"DetalleIVA": [
41-
{
42-
"TipoImpositivo": "10.0",
43-
"BaseImponible": 100.0,
44-
"CuotaRepercutida": 10.0
45-
}
46-
]
47-
}
18+
"DesgloseFactura": {
19+
"Sujeta": {
20+
"NoExenta": {
21+
"TipoNoExenta": "S1",
22+
"DesgloseIVA": {
23+
"DetalleIVA": [
24+
{
25+
"TipoImpositivo": "10.0",
26+
"BaseImponible": 100.0,
27+
"CuotaRepercutida": 10.0
28+
},
29+
{
30+
"TipoImpositivo": "21.0",
31+
"BaseImponible": 200.0,
32+
"CuotaRepercutida": 42.0
33+
}
34+
]
4835
}
4936
}
5037
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva10b_s_req014_s_iva21s_s_req52_dict.json

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,27 @@
1616
"ClaveRegimenEspecialOTrascendencia": "01",
1717
"DescripcionOperacion": "/",
1818
"TipoDesglose": {
19-
"DesgloseTipoOperacion": {
20-
"PrestacionServicios": {
21-
"Sujeta": {
22-
"NoExenta": {
23-
"TipoNoExenta": "S1",
24-
"DesgloseIVA": {
25-
"DetalleIVA": [
26-
{
27-
"TipoImpositivo": "21.0",
28-
"BaseImponible": 200.0,
29-
"CuotaRepercutida": 42.0,
30-
"TipoRecargoEquivalencia": 5.2,
31-
"CuotaRecargoEquivalencia": 10.4
32-
}
33-
]
34-
}
35-
}
36-
}
37-
},
38-
"Entrega": {
39-
"Sujeta": {
40-
"NoExenta": {
41-
"TipoNoExenta": "S1",
42-
"DesgloseIVA": {
43-
"DetalleIVA": [
44-
{
45-
"TipoImpositivo": "10.0",
46-
"BaseImponible": 100.0,
47-
"CuotaRepercutida": 10.0,
48-
"TipoRecargoEquivalencia": 1.4,
49-
"CuotaRecargoEquivalencia": 1.4
50-
}
51-
]
52-
}
19+
"DesgloseFactura": {
20+
"Sujeta": {
21+
"NoExenta": {
22+
"TipoNoExenta": "S1",
23+
"DesgloseIVA": {
24+
"DetalleIVA": [
25+
{
26+
"TipoImpositivo": "10.0",
27+
"BaseImponible": 100.0,
28+
"CuotaRepercutida": 10.0,
29+
"TipoRecargoEquivalencia": 1.4,
30+
"CuotaRecargoEquivalencia": 1.4
31+
},
32+
{
33+
"TipoImpositivo": "21.0",
34+
"BaseImponible": 200.0,
35+
"CuotaRepercutida": 42.0,
36+
"TipoRecargoEquivalencia": 5.2,
37+
"CuotaRecargoEquivalencia": 10.4
38+
}
39+
]
5340
}
5441
}
5542
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva10b_s_req014_s_iva21s_s_req52_same_dict.json

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,27 @@
1515
"ClaveRegimenEspecialOTrascendencia": "01",
1616
"DescripcionOperacion": "/",
1717
"TipoDesglose": {
18-
"DesgloseTipoOperacion": {
19-
"PrestacionServicios": {
20-
"Sujeta": {
21-
"NoExenta": {
22-
"TipoNoExenta": "S1",
23-
"DesgloseIVA": {
24-
"DetalleIVA": [
25-
{
26-
"TipoImpositivo": "21.0",
27-
"BaseImponible": 200.0,
28-
"CuotaRepercutida": 42.0,
29-
"TipoRecargoEquivalencia": 5.2,
30-
"CuotaRecargoEquivalencia": 10.4
31-
}
32-
]
33-
}
34-
}
35-
}
36-
},
37-
"Entrega": {
38-
"Sujeta": {
39-
"NoExenta": {
40-
"TipoNoExenta": "S1",
41-
"DesgloseIVA": {
42-
"DetalleIVA": [
43-
{
44-
"TipoImpositivo": "10.0",
45-
"BaseImponible": 100.0,
46-
"CuotaRepercutida": 10.0,
47-
"TipoRecargoEquivalencia": 1.4,
48-
"CuotaRecargoEquivalencia": 1.4
49-
}
50-
]
51-
}
18+
"DesgloseFactura": {
19+
"Sujeta": {
20+
"NoExenta": {
21+
"TipoNoExenta": "S1",
22+
"DesgloseIVA": {
23+
"DetalleIVA": [
24+
{
25+
"TipoImpositivo": "10.0",
26+
"BaseImponible": 100.0,
27+
"CuotaRepercutida": 10.0,
28+
"TipoRecargoEquivalencia": 1.4,
29+
"CuotaRecargoEquivalencia": 1.4
30+
},
31+
{
32+
"TipoImpositivo": "21.0",
33+
"BaseImponible": 200.0,
34+
"CuotaRepercutida": 42.0,
35+
"TipoRecargoEquivalencia": 5.2,
36+
"CuotaRecargoEquivalencia": 10.4
37+
}
38+
]
5239
}
5340
}
5441
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva_e_s_iva0_g_e_dict.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,18 @@
1616
"ClaveRegimenEspecialOTrascendencia": "01",
1717
"DescripcionOperacion": "/",
1818
"TipoDesglose": {
19-
"DesgloseTipoOperacion": {
20-
"PrestacionServicios": {
21-
"NoSujeta": {
22-
"ImporteTAIReglasLocalizacion": 100.0
23-
}
19+
"DesgloseFactura": {
20+
"NoSujeta": {
21+
"ImporteTAIReglasLocalizacion": 100.0
2422
},
25-
"Entrega": {
26-
"Sujeta": {
27-
"Exenta": {
28-
"DetalleExenta": [
29-
{
30-
"BaseImponible": 200.0,
31-
"CausaExencion": "E5"
32-
}
33-
]
34-
}
23+
"Sujeta": {
24+
"Exenta": {
25+
"DetalleExenta": [
26+
{
27+
"BaseImponible": 200.0,
28+
"CausaExencion": "E5"
29+
}
30+
]
3531
}
3632
}
3733
}

l10n_es_aeat_sii_invoice_summary/tests/json/sii_out_invoice_s_iva_e_s_iva0_g_e_same_dict.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,18 @@
1515
"ClaveRegimenEspecialOTrascendencia": "01",
1616
"DescripcionOperacion": "/",
1717
"TipoDesglose": {
18-
"DesgloseTipoOperacion": {
19-
"PrestacionServicios": {
20-
"NoSujeta": {
21-
"ImporteTAIReglasLocalizacion": 100.0
22-
}
18+
"DesgloseFactura": {
19+
"NoSujeta": {
20+
"ImporteTAIReglasLocalizacion": 100.0
2321
},
24-
"Entrega": {
25-
"Sujeta": {
26-
"Exenta": {
27-
"DetalleExenta": [
28-
{
29-
"BaseImponible": 200.0,
30-
"CausaExencion": "E5"
31-
}
32-
]
33-
}
22+
"Sujeta": {
23+
"Exenta": {
24+
"DetalleExenta": [
25+
{
26+
"BaseImponible": 200.0,
27+
"CausaExencion": "E5"
28+
}
29+
]
3430
}
3531
}
3632
}

0 commit comments

Comments
 (0)