es-tbai-v1
Module: github.com/invopop/gobl
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-tbai-correction
Extensions
TicketBAI Region Code
Region codes are used by TicketBAI to differentiate between the different subdivisions of the Basque Country. This is used to determine the correct API endpoint to use when submitting documents.es-tbai-region
es-tbai-region
TicketBAI Product Key
Product keys are used by TicketBAI to differentiate between -exported- goods and services. It may be useful to classify all products regardless of wether they are exported or not. There is an additional exception case for goods that are resold without modification when the supplier is in the simplified tax regime. For must purposes this special case can be ignored. If no product key is provided, the default is “services”.es-tbai-product
es-tbai-product
TicketBAI Exemption code
Codes used by TicketBAI for both “exempt”, “not-subject”, and reverse charge transactions. In the TicketBAI format these are separated, but in order to simplify GOBL and be more closely aligned with other countries we’ve combined them into one. The follow mappings will be made automatically by GOBL during normalization.es-tbai-exemption
es-tbai-exemption
TicketBAI Rectification Type Code
Corrected or rectified invoices that need to be sent in the TicketBAI format require a specific type code to be defined alongside the preceding invoice data.es-tbai-correction
es-tbai-correction
TicketBAI VAT Regime Key
Identifies the VAT regime or operation classification applied to the transaction. Maps to theClaveRegimenIvaOpTrascendencia field, with
values taken from the TicketBAI XSD.
The regime code is normally assigned per tax combo. If no regime code
is provided, GOBL will try to assign a code from the following contexts:
es-tbai-regime
es-tbai-regime
Activity Code (Bizkaia)
Economic activity code (epígrafe) for individual issuers submitting through Bizkaia’s LROE Modelo 140 register. Not required for organisations, who file through Modelo 240.es-tbai-bi-activity
es-tbai-bi-activity
Pattern:
^\d{1,7}$Identity Type Code
Identity code used to identify the type of identity document used by the customer when there is no tax identifier available. Maps to theIDType value under
IDOtro in the TicketBAI XML.
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
IDOtrofield with code02. - Non-EU Tax IDs will be mapped to the
IDOtrofield with code04.
key values will be mapped automatically to an extension
by the addon:
Example identity of a UK passport:
es-tbai-identity-type
es-tbai-identity-type
TicketBAI Simplified Invoice Flag
Flag that maps to theFacturaSimplificada field in TicketBAI
documents. Set automatically to S by GOBL during normalization
when the simplified tag is present. When absent, the invoice is
treated as N (not simplified).
es-tbai-simplified
es-tbai-simplified
Validation Rules
bill.Invoice
bill.Invoice
tax.Combo
tax.Combo