Documentation
¶
Overview ¶
Package es provides tax regime support for Spain.
Index ¶
Constants ¶
const ( TaxCategoryIRPF cbc.Code = "IRPF" TaxCategoryIGIC cbc.Code = "IGIC" TaxCategoryIPSI cbc.Code = "IPSI" )
Local tax category definitions which are not considered standard.
const ( // IRPF non-standard Rates (usually for self-employed) TaxRatePro cbc.Key = "pro" // Professional Services TaxRateProStart cbc.Key = "pro-start" // Professionals, first 2 years TaxRateModules cbc.Key = "modules" // Module system TaxRateAgriculture cbc.Key = "agriculture" // Agricultural TaxRateAgricultureSpecial cbc.Key = "agriculture-special" // Agricultural special TaxRateCapital cbc.Key = "capital" // Rental or Interest // Special tax rate surcharge extension TaxRateEquivalence cbc.Key = "eqs" )
Specific tax rate codes.
const ( InboxKeyFACE cbc.Key = "face" // Main roles defined in FACE InboxRoleFiscal cbc.Key = "fiscal" // Fiscal / 01 InboxRoleRecipient cbc.Key = "recipient" // Receptor / 02 InboxRolePayer cbc.Key = "payer" // Pagador / 03 InboxRoleCustomer cbc.Key = "customer" // Comprador / 04 )
Inbox key and role definitions. TODO: move to their own addon.
const ( TagCopy cbc.Key = "copy" TagSummary cbc.Key = "summary" TagSimplifiedScheme cbc.Key = "simplified-scheme" TagCustomerIssued cbc.Key = "customer-issued" TagTravelAgency cbc.Key = "travel-agency" TagSecondHandGoods cbc.Key = "second-hand-goods" TagArt cbc.Key = "art" TagAntiques cbc.Key = "antiques" TagCashBasis cbc.Key = "cash-basis" )
Tax tags that can be applied in Spain.
const ( TaxIdentityNational cbc.Key = "national" TaxIdentityForeigner cbc.Key = "foreigner" TaxIdentityOrg cbc.Key = "org" TaxIdentityOther cbc.Key = "other" )
Tax Identity keys that may be determined from the code.
Variables ¶
var InvoiceCorrectionTypes = []cbc.Key{ bill.InvoiceTypeCreditNote, bill.InvoiceTypeCorrective, bill.InvoiceTypeDebitNote, }
InvoiceCorrectionTypes defines the types of corrections recognized in Spanish law
var InvoiceLegalNoteExamples = map[string]*org.Note{ "exempt": { Key: org.NoteKeyLegal, Text: "Operación exenta por aplicación del artículo [indicar el articulo] de la Ley 37/1992, del 28 de diciembre, del Impuesto sobre el Valor Añadido.", }, "transport": { Key: org.NoteKeyLegal, Text: "Medio de transporte [describir el medio, por ejemplo automóvil turismo Seat Ibiza TDI 2.0] fecha 1ª puesta en servicio [indicar la fecha] distancias/horas recorridas [indicar la distancia o las horas, por ejemplo, 5.900 km o 48 horas].", }, }
InvoiceLegalNoteExamples defines a list of notes which may be required by Spanish law. These are expected to be used in user interfaces as examples that can be modified according to the details of the invoice. Most of this data has now been moved to scheme definitions, but some examples require a bit more effort from the user side.
Functions ¶
func Normalize ¶ added in v0.200.0
func Normalize(doc any)
Normalize will perform any regime specific normalizations on the data.
func TaxIdentityKey ¶ added in v0.220.4
TaxIdentityKey determines the type of tax code and returns the appropriate key. An empty key will be returned if the code is not recognized. This will only work correctly if the tax identity has been normalized.
Types ¶
type BillInvoiceLineMeta ¶
type BillInvoiceLineMeta struct {
// When true, this line should be considered as being sourced from a provider
// under a "Equivalence Surcharge VAT" regime.
Supplied bool `json:"supplied,omitempty" jsonschema:"title=Supplied"`
// Message that explains why this line is exempt of taxes.
Exempt string `json:"exempt,omitempty" jsonschema:"title=Exempt"`
}
BillInvoiceLineMeta defines additional fields that may be added and used in an invoice line.