Codis de tipus de document Peppol i CII
Visió general
Section titled “Visió general”Quan envieu factures a través de xarxes PEPPOL o genereu documents en format CII o Factur-X, podeu especificar el tipus de document amb el camp type_document. Aquest camp es correspon amb l’Invoice Type Code definit a la llista de codis UN/CEFACT 1001 (UNCL1001).
Els codis s’utilitzen a:
- PEPPOL BIS Billing 3.0 / Chorus en format UBL: element
InvoiceTypeCode - Cross Industry Invoice (CII), Factur-X, ZUGFeRD i EN16931: element
TypeCode
El camp type_document és opcional i actua com una pista per al codi de tipus de document. B2Brouter utilitzarà aquest valor quan sigui vàlid per al format d’exportació; en cas contrari, aplicarà una assignació automàtica basada en la lògica de negoci:
- 380: factura comercial estàndard, per defecte
- 381: nota de crèdit
- 389: autofactura
- 480: factura no subjecta o amb reverse charge
Important: en exportar documents:
- Si
type_documentés vàlid per al format de destí, PEPPOL, CII o FatturaPA, s’utilitzarà a l’XML exportat - Si
type_documentno és vàlid per al format de destí, el sistema utilitza automàticament un codi per defecte adequat segons el tipus de factura - Això us permet importar documents en un format, per exemple FatturaPA, i exportar-los en un altre, com PEPPOL, de manera transparent
Definir type_document via API
Section titled “Definir type_document via API”{ "invoice": { "type_document": "380", "number": "INV-2025-001", "date": "2025-01-26", "contact_id": 12345, "invoice_lines_attributes": [...] }}Codis vàlids de tipus de document PEPPOL / UBL
Section titled “Codis vàlids de tipus de document PEPPOL / UBL”Els codis UN/CEFACT següents s’utilitzen en exportar factures en format PEPPOL i UBL:
Codis de factura estàndard
Section titled “Codis de factura estàndard”| Code | Description |
|---|---|
| 71 | Request for payment |
| 80 | Debit note related to goods or services |
| 82 | Metered services invoice |
| 84 | Debit note related to financial adjustments |
| 102 | Tax notification |
| 218 | Final payment request based on completion of work |
| 219 | Payment request for completed units |
| 326 | Partial invoice |
| 331 | Commercial invoice which includes a packing list |
| 380 | Commercial invoice |
| 382 | Commission note |
| 383 | Debit note |
| 384 | Corrected invoice |
| 386 | Prepayment invoice |
| 388 | Tax invoice |
| 393 | Factored invoice |
| 395 | Consignment invoice |
| 553 | Forwarder’s invoice discrepancy report |
| 575 | Insurer’s invoice |
| 623 | Forwarder’s invoice |
| 780 | Freight invoice |
| 817 | Claim notification |
| 870 | Consular invoice |
| 875 | Partial construction invoice |
| 876 | Partial final construction invoice |
| 877 | Final construction invoice |
Nota: els codis 326 i 384 només es poden fer servir quan ambdues parts, proveïdor i client, tenen el país DE.
Codis de nota de crèdit per a PEPPOL
Section titled “Codis de nota de crèdit per a PEPPOL”Aquests codis només són vàlids quan la factura és una nota de crèdit, is_credit_note: true:
| Code | Description |
|---|---|
| 81 | Credit note related to goods or services |
| 83 | Credit note related to financial adjustments |
| 381 | Credit note |
| 396 | Factored credit note |
| 532 | Forwarder’s credit note |
Codis d’autofactura per a PEPPOL
Section titled “Codis d’autofactura per a PEPPOL”| Code | Description |
|---|---|
| 389 | Self-billed invoice |
| 527 | Self-billed debit note |
Codi d’autofactura rectificativa per a PEPPOL
Section titled “Codi d’autofactura rectificativa per a PEPPOL”| Code | Description |
|---|---|
| 261 | Self-billed credit note |
Nota: aquest codi només es pot utilitzar quan type: IssuedSelfInvoice i is_credit_note: true
Codis vàlids de tipus de document CII / Factur-X
Section titled “Codis vàlids de tipus de document CII / Factur-X”Els codis següents s’utilitzen en exportar documents en format Cross Industry Invoice, CII:
Codis de factura estàndard
Section titled “Codis de factura estàndard”| Code | Description |
|---|---|
| 326 | Partial invoice |
| 380 | Commercial invoice |
| 384 | Corrected invoice |
| 875 | Partial construction invoice |
| 876 | Partial final construction invoice |
| 877 | Final construction invoice |
Codi de nota de crèdit per a CII
Section titled “Codi de nota de crèdit per a CII”| Code | Description |
|---|---|
| 381 | Credit note |
Codi d’autofactura per a CII
Section titled “Codi d’autofactura per a CII”| Code | Description |
|---|---|
| 389 | Self-billed invoice |
Nota: els codis 326 i 384 només es poden fer servir quan ambdues parts, proveïdor i client, tenen el país DE.
Exemples
Section titled “Exemples”Exemple 1: factura PEPPOL estàndard
Section titled “Exemple 1: factura PEPPOL estàndard”{ "send_after_import": true, "invoice": { "type": "IssuedInvoice", "type_document": "380", "number": "INV-2025-001", "date": "2025-01-26", "due_date": "2025-02-26", "contact_id": 12345, "invoice_lines_attributes": [ { "quantity": 10, "price": 50.0, "description": "Professional services", "taxes_attributes": [ { "name": "VAT", "percent": 21 } ] } ] }}Exemple 2: nota de crèdit PEPPOL
Section titled “Exemple 2: nota de crèdit PEPPOL”{ "send_after_import": true, "invoice": { "type": "IssuedInvoice", "type_document": "381", "is_credit_note": true, "number": "CN-2025-001", "date": "2025-01-26", "amended_number": "INV-2025-001", "contact_id": 12345, "invoice_lines_attributes": [...] }}Exemple 3: factura de prepagament
Section titled “Exemple 3: factura de prepagament”{ "send_after_import": true, "invoice": { "type": "IssuedInvoice", "type_document": "386", "number": "PREP-2025-001", "date": "2025-01-26", "contact_id": 12345, "invoice_lines_attributes": [...] }}Exemple 4: autofactura
Section titled “Exemple 4: autofactura”{ "send_after_import": true, "invoice": { "type": "ReceivedInvoice", "type_document": "389", "number": "SELF-2025-001", "date": "2025-01-26", "contact_id": 12345, "invoice_lines_attributes": [...] }}Sortida XML
Section titled “Sortida XML”PEPPOL BIS 3.0 (UBL)
Section titled “PEPPOL BIS 3.0 (UBL)”<Invoice> <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode> ...</Invoice>CII (Factur-X / EN16931)
Section titled “CII (Factur-X / EN16931)”<rsm:CrossIndustryInvoice> <rsm:ExchangedDocument> <ram:TypeCode>380</ram:TypeCode> </rsm:ExchangedDocument> ...</rsm:CrossIndustryInvoice>Referències dels estàndards
Section titled “Referències dels estàndards”- PEPPOL BIS Billing 3.0 - Invoice Type Code
- EN 16931 - European e-invoicing standard