{"title":"Electronic invoicing in Spain","url":"https://jonas-paprotka.de/docs/localfunctionality/spain/spain-einvoicing/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/spain/spain-einvoicing, MicrosoftDocs/dynamics365smb-docs at 46907ac (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/spain/spain-einvoicing","source":{"name":"Business Central application docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-docs","commit":"46907ace177f8d31deba47a2fdb57c3336e66252","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to configure Factura-E 3.2.2 in the Business Central E-Documents framework for Spain and export invoices and corrective credit memos.","date":"2026-10-20","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Electronic invoicing in Spain","slug":"electronic-invoicing-in-spain","at":0,"chars":2942},{"level":2,"title":"E-documents framework setup","slug":"e-documents-framework-setup","at":154,"chars":148},{"level":2,"title":"Set up local formats","slug":"set-up-local-formats","at":302,"chars":654},{"level":2,"title":"Work with e-invoices","slug":"work-with-e-invoices","at":956,"chars":1599},{"level":3,"title":"Corrections with credit memos","slug":"corrections-with-credit-memos","at":1829,"chars":726},{"level":2,"title":"Related information","slug":"related-information","at":2555,"chars":387}],"text":"# Electronic invoicing in Spain\nThis article provides information about how to set up and work with the Spanish localization of the E-Document framework.\n## E-documents framework setup\nSee Set up e-documents</finance-how-setup-edocuments> for information about how to set up the E-Documents framework.\n## Set up local formats\nTo set up the format for the E-Document service, follow these steps:\n1. Select Search (Alt+Q) in the upper-right corner, enter E-Document Services, and then select the related link.\n1. Select New, and on the E-Document Services page, on the General FastTab, in the Document Format field, choose Factura-E 3.2.2.\n1. Configure the fields as described in Set up e-documents</finance-how-setup-edocuments>.\n1. Close the page.\nFor use in sales, set up the workflow as described in /finance-how-setup-edocuments#set-up-the-workflow. Then, on the Document Sending Profile page, add the workflow for the customers you send e-invoices to.\n## Work with e-invoices\nUse the E-Documents framework in purchases as described in Use e-documents in the purchases process</finance-how-use-edocuments-purchase>. See Use e-documents in the sales process</finance-how-use-edocuments> for information about the sales process.\n> NOTE\n> The following nodes are determined using the following methods:\n > InvoiceIssueData/ExchangeRateDetails/ExchangeRateDate is taken as the Posting Date of the document.\n > InvoiceHeader/InvoiceClass comes from the document's Invoice Type, which uses the SII sales invoice types. F1, F2, and F3 produce OO for an original invoice. F4 produces OC for a summary. Other types produce OR for a corrective invoice.\n > InvoiceLine/UnitOfMeasure is included when the unit of measure's International Standard Code matches a supported Factura-E unit. If there's no match, the optional node is omitted.\n### Corrections with credit memos\nWhen you work with credit memos, before you post, on the Credit Memo Details FastTab add a reason code in the Factura-E Reason Code field. Factura-E validation requires this code when you export a sales credit memo.\n> NOTE\n> The Corrective/TaxPeriod/StartDate-EndDate nodes are determined using the following method:\n> 1. Use the posted credit memo's Posting Date, not the original invoice's date.\n> 1. If a VAT Return Period contains that date, use its start and end dates.\n> 1. Otherwise, use the latest Accounting Period start on or before that date and the end of its fiscal year.\n> 1. If no accounting period is found, use the calendar year that contains the credit memo's posting date.\n## Related information\n Set up e-documents</finance-how-setup-edocuments>\n How to use e-documents in sales</finance-how-use-edocuments>\n How to use e-documents in purchase</finance-how-use-edocuments-purchase>\n Spanish Local Functionality<spain-local-functionality>\nFind free e-learning modules for Business Central here<https://learn.microsoft.com/training/dynamics365/business-central>"}