Skip to main content
Key: es-facturae-v3

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-facturae-correction

Scenarios

Scenarios attach notes and extensions to a document when its filters match. Read more about scenarios.
TagsTypeOutput
-standard
corrective
credit-note
debit-note
{
  “ext”: {
    “es-facturae-doc-type”: “FC”
  }
}
simplified-{
  “ext”: {
    “es-facturae-doc-type”: “FA”
  }
}
self-billed-{
  “ext”: {
    “es-facturae-doc-type”: “AF”
  }
}
-standard{
  “ext”: {
    “es-facturae-invoice-class”: “OO”
  }
}
-corrective
credit-note
debit-note
{
  “ext”: {
    “es-facturae-invoice-class”: “OR”
  }
}
summary-{
  “ext”: {
    “es-facturae-invoice-class”: “OC”
  }
}
copystandard{
  “ext”: {
    “es-facturae-invoice-class”: “CO”
  }
}
copycorrective{
  “ext”: {
    “es-facturae-invoice-class”: “CR”
  }
}
copy
summary
standard{
  “ext”: {
    “es-facturae-invoice-class”: “CC”
  }
}

Extensions

FacturaE: Document Type

CodeName
FCCommercial Invoice
FASimplified Invoice
AFSelf-billed Invoice

FacturaE: Invoice Class

CodeName
OOOriginal
ORCorrective Original
OCSummary Original
COCopy of the Original
CRCopy of the Corrective
CCCopy of the Summary

FacturaE Change

FacturaE requires a specific and single code that explains why the previous invoice is being corrected.
CodeName
01Invoice code
02Invoice series
03Issue date
04Name and surnames/Corporate name - Issuer (Sender)
05Name and surnames/Corporate name - Receiver
06Issuer’s Tax Identification Number
07Receiver’s Tax Identification Number
08Supplier’s address
09Customer’s address
10Item line
11Applicable Tax Rate
12Applicable Tax Amount
13Applicable Date/Period
14Invoice Class
15Legal literals
16Taxable Base
80Calculation of tax outputs
81Calculation of tax inputs
82Taxable Base modified due to return of packages and packaging materials
83Taxable Base modified due to discounts and rebates
84Taxable Base modified due to firm court ruling or administrative decision
85Taxable Base modified due to unpaid outputs where there is a judgement opening insolvency proceedings

Validation Rules

Validation rules check each struct against a set of assertions and report any failures with a unique code and message. Read more about validation.
FieldTestValidation Code / Message
customer.tax_id.code
  • Code in [ES]
  • Present
GOBL-ES-FACTURAE-V3-BILL-INVOICE-01
Customer tax ID code is required for Spanish customers
tax
  • Present
GOBL-ES-FACTURAE-V3-BILL-INVOICE-02
Tax object is required with ext document type and invoice classes
tax.ext
  • Ext require [es-facturae-doc-type, es-facturae-invoice-class]
GOBL-ES-FACTURAE-V3-BILL-INVOICE-03
Tax ext require ‘es-facturae-doc-type’ and ‘es-facturae-invoice-class’ extensions
preceding
  • Invoice type in [credit-note, corrective, debit-note]
  • Present
GOBL-ES-FACTURAE-V3-BILL-INVOICE-04
Preceding document reference is required for credit-note, corrective, debit-note invoices
preceding[*].issue_date
  • Invoice type in [credit-note, corrective, debit-note]
  • Present
GOBL-ES-FACTURAE-V3-BILL-INVOICE-05
Preceding document issue date is required
preceding[*].ext
  • Invoice type in [credit-note, corrective, debit-note]
  • Ext require [es-facturae-correction]
GOBL-ES-FACTURAE-V3-BILL-INVOICE-06
Preceding document ext require ‘es-facturae-correction’ extension