es-sii-v1
Module: github.com/invopop/gobl
Sources
Correction Definitions
Auto-generation of corrective invoices or credit and debit notes is supported.Extension Keys
One or all of the following extensions may be required as part of the correction options. See the Extensions section for possible values.es-sii-doc-type
Scenarios
bill/invoice
Standard Invoice
Standard Invoice
Filters:
- Types:
standard
- Extensions:
es-sii-doc-type:F1
Simplified Invoice
Simplified Invoice
Filters:
- Types:
standard - Tags:
simplified
- Extensions:
es-sii-doc-type:F2
Replacement Invoice
Replacement Invoice
Filters:
- Types:
standard - Tags:
replacement
- Extensions:
es-sii-doc-type:F3
Simplified Corrective Invoice
Simplified Corrective Invoice
Filters:
- Types:
corrective,credit-note,debit-note - Tags:
simplified
- Extensions:
es-sii-doc-type:R5
Extensions
Invoice Type
Code used to identify the type of invoice being sent or received. This will be determined automatically by GOBL during normalization according to the scenario definitions. The following codes are not covered by GOBL’s scenarios and will need to be set manually if needed:F4, F5, F6, R2, R3, R4, AJ, LC.
Maps to the TipoFactura field. Values correspond to the L2_EMI (issued invoices) and
L2_RECI (received invoices) lists.
es-sii-doc-type
es-sii-doc-type
Corrective Invoice Type
Correction type code used to identify the type of correction being made. Code is determined automatically according to the invoice type:
Maps to the
TipoRectificativa field. Values correspond to the L5 list.
es-sii-correction-type
es-sii-correction-type
Exemption Reason
Exemption code used to explain why the operation is exempt from taxes. The follow mappings will be made automatically by GOBL during normalization:
Maps to the field
CausaExencion. Values correspond to the L9 list.
Note: This extension is mutually exclusive with es-sii-outside-scope.
es-sii-exempt
es-sii-exempt
Type of Operation Outside Scope
Type of operation not subject to VAT. This extension is used to determine which tax amount field should be reported in the SII payload:otherwill set theImportePorArticulos7_14_Otrosfield.locationwill set theImporteTAIReglasLocalizacionfield.
Doesn’t map directly to any field. Used internally to determine how to report the tax amount.
Note: This extension is mutually exclusive with
es-sii-exempt.
es-sii-outside-scope
es-sii-outside-scope
Special Regime or Relevance Key
Identify the regime applied to the operation. The regime key must be assigned for each tax combo. If no regime key is provided, GOBL will try to assign a code from the following tax combo contexts:
Maps to the field
ClaveRegimenEspecialOTrascendencia. Values correspond to the L3.1
(issued invoices) and L3.2 (received invoices) lists.
es-sii-regime
es-sii-regime
Identification Type
Identity code used to identify the type of identity document used by the customer. The regular Party Tax Identity is preferred over using a specific identity type code, and will be mapped automatically as follows:- Spanish Tax IDs will be mapped to the
NIFfield. - EU Tax IDs will be mapped to the
IDOtro\IDTypefield with code02. - Non-EU Tax IDs will be mapped to the
IDOtro\IDTypefield with code04.
key values will be mapped automatically to an extension by the
addon:
The
07 “not registered in census” code is not mapped automatically, but can be provided
directly if needed.
Example identity of a UK passport:
IDOtro\IDType. Values correspond to the L4 list.
es-sii-identity-type
es-sii-identity-type
Simplified Invoice Art. 7.2 and 7.3, RD 1619/2012
This extension covers a specific use-case when the customer specifically requests that the invoice includes their fiscal details, but they are not registered for tax. Can only be true when the invoice type (TipoFactura) is one of: F1, F3, R1, R2,
R3, or R4.
Maps to the FacturaSimplificadaArticulos7.2_7.3 field. Values correspond to the L26 list.
es-sii-simplified-art7273
es-sii-simplified-art7273
Issued by Third Party or Recipient
Indicates whether the invoice is issued by a third party or by the customer themselves. The default value isN (No).
The self-billed tag will automatically set this extension in the invoice to S (Yes).
If the issuer field is set in the invoice’s ordering section, then this extension will be
set to S (Yes) too.
Maps to the field EmitidaPorTercerosODestinatario. Values correspond to the L10 list.
es-sii-third-party-issuer
es-sii-third-party-issuer
Product Type
Product type code used to differentiate between goods and services for the purpose of reporting breakdowns in the SII format. This extension is used to determine the type of operation breakdown when generating the SII report. When provided, the value will be used to generate theDesgloseTipoOperacion field,
selecting between PrestacionServices (provision of services) or Entrega (delivery of
goods).
This extension is optional; if not provided, the breakdown will use DesgloseFactura instead
of DesgloseTipoOperacion.
Doesn’t map directly to any field. Used internally to structure the breakdown data.
es-sii-product
es-sii-product
Validation Rules
bill.Invoice
bill.Invoice
tax.Combo
tax.Combo