Skip to content

Commit

Permalink
obtenir correctament el vat i el detalle_iva
Browse files Browse the repository at this point in the history
  • Loading branch information
nvillarroya committed Dec 30, 2024
1 parent 16dd7cb commit baa3054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sii/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def get_factura_recibida(invoice, rect_sust_opc1=False, rect_sust_opc2=False):
detalle_iva.append(iva_values['detalle_iva_exento'])

if iva_values['intracomunitarias']:
detalle_iva.append(iva_values['intracomunitarias'])
detalle_iva.extend(iva_values['intracomunitarias'])
for iva in detalle_iva:
cuota_deducible += iva.get('CuotaSoportada', 0)

Expand Down
2 changes: 1 addition & 1 deletion sii/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def clean_vat(vat):
if not vat:
return ''
country_code = len(vat) >= 2 and vat[:2].upper()
if country_code in COUNTRY_CODES or country_code == 'PS':
if country_code == 'ES' or country_code == 'PS':
return vat[2:]
return vat

Expand Down

0 comments on commit baa3054

Please sign in to comment.