CorrectionReason enum represents all correction reasons supported by the FacturaE 3.2.2 XSD specification. These codes are used when issuing corrective or credit invoices to specify why the original invoice is being corrected.
Enum Cases
The following table lists all 22 correction reasons available:| Case | Code | Description |
|---|---|---|
InvoiceNumber | 01 | Invoice number correction |
InvoiceSeries | 02 | Invoice series correction |
IssueDate | 03 | Issue date correction |
IssuerName | 04 | Issuer name/business name correction |
RecipientName | 05 | Recipient name/business name correction |
IssuerTaxId | 06 | Issuer tax identification correction |
RecipientTaxId | 07 | Recipient tax identification correction |
IssuerAddress | 08 | Issuer address correction |
RecipientAddress | 09 | Recipient address correction |
TransactionDetail | 10 | Transaction detail/description correction |
TaxRate | 11 | Tax rate correction |
TaxAmount | 12 | Tax amount correction |
TaxPeriod | 13 | Tax period correction |
InvoiceClass | 14 | Invoice class/type correction |
LegalLiterals | 15 | Legal text/literals correction |
TaxableBase | 16 | Taxable base correction |
OutputTaxCalculation | 80 | Output tax calculation error |
WithheldTaxCalculation | 81 | Withheld tax calculation error |
BaseModifiedReturns | 82 | Base modified due to returns/refunds |
BaseModifiedDiscounts | 83 | Base modified due to discounts |
BaseModifiedCourtOrder | 84 | Base modified by court/administrative order |
BaseModifiedInsolvency | 85 | Base modified due to insolvency proceedings |
Methods
description()
Returns the official Spanish description for each correction reason:Usage Examples
Correcting Invoice Amount
Correcting Tax Rate Error
Correcting Customer Information
Product Return/Refund
Volume Discount Applied
When to Use Each Reason
Administrative Corrections (01-16)
Use these codes when correcting clerical or administrative errors:- InvoiceNumber/InvoiceSeries - Wrong invoice numbering
- IssueDate - Incorrect date
- IssuerName/RecipientName - Misspelled names
- IssuerTaxId/RecipientTaxId - Wrong tax IDs (NIF/CIF)
- IssuerAddress/RecipientAddress - Wrong addresses
- TransactionDetail - Incorrect descriptions
- InvoiceClass - Wrong invoice type
- LegalLiterals - Missing or incorrect legal text
Tax Corrections (11-12, 16, 80-81)
Use these codes for tax-related errors:- TaxRate - Applied wrong tax percentage
- TaxAmount - Tax calculation error
- TaxableBase - Incorrect base amount
- OutputTaxCalculation - Error in VAT calculation
- WithheldTaxCalculation - Error in withholding calculation
Base Modifications (82-85)
Use these codes when the invoice amount changes due to external circumstances:- BaseModifiedReturns - Customer returned goods
- BaseModifiedDiscounts - Volume or prompt payment discount
- BaseModifiedCourtOrder - Court or tax authority decision
- BaseModifiedInsolvency - Customer insolvency proceedings
Notes
- All corrective invoices must specify a correction reason
- The reason code appears in the XML output’s
ReasonCodefield - Multiple corrected invoices can reference the same reason
- The
description()method returns official Spanish text for compliance - Correction reasons 80-85 typically require supporting documentation
See Also
- CorrectionMethod - How to apply the correction
- Invoice::setIsCorrective() - Mark invoice as corrective
- Invoice::setCorrectionReason() - Set correction reason
- Invoice::addCorrectedInvoice() - Reference original invoice