XML invoice standard - Facturae

Facturae is an XML invoice standard that is used in Spain.

If you receive XML documents from one or more companies from there, the documents may come in this format.

This topic lists the ENTRANCE field types that are normally mapped to elements in these documents and indicates where in the XML code the elements are normally found. The ENTRANCE field types that are not normally mapped to XML elements are not listed here.

For more information on how the logic in COLLECTOR's intelligent XML functionality works with this standard, please see ReadSoft COLLECTOR 6-3 Integration Specification.pdf. You can obtain this document from your ReadSoft representative.

INVOICES field

Location of element mapped in the XML code

Buyer fields

 
Name

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/Name

else

   Facturae/Parties/BuyerParty/LegalEntitty/CorporateName

BuyerVATRegno Facturae/Parties/BuyerParty/TaxIdentification/TaxIdentificationNumber
CountryCode

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/AddressInSpain/CountryCode

else

   Facturae/Parties/BuyerParty/LegalEntitty/AddressInSpain/CountryCode

PostalCode

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/AddressInSpain/PostCode

else

   Facturae/Parties/BuyerParty/LegalEntitty/AddressInSpain/PostCode

Street

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/AddressInSpain/Address

else

   Facturae/Parties/BuyerParty/LegalEntitty/AddressInSpain/Address

POBox

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/AddressInSpain/PostCode

else

   Facturae/Parties/BuyerParty/LegalEntitty/AddressInSpain/PostCode

(Same as postal code)

City

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/AddressInSpain/Town

else

   Facturae/Parties/BuyerParty/LegalEntitty/AddressInSpain/Town

TelephoneNumber

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/ContactDetails/Telephone

else

   Facturae/Parties/BuyerParty/LegalEntitty/ContactDetails/Telephone

Email

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/ContactDetails/ElectronicMail

else

   Facturae/Parties/BuyerParty/LegalEntitty/ContactDetails/ElectronicMail

FaxNumber

if (Facturae/Parties/BuyerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/BuyerParty/Individual/ContactDetails/Telefax

else

   Facturae/Parties/BuyerParty/LegalEntitty/ContactDetails/Telefax

Supplier fields  

Name

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/Name

else

   Facturae/Parties/SellerParty/LegalEntitty/CorporateName

POBox

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/AddressInSpain/PostCode

else

   Facturae/Parties/SellerParty/LegalEntitty/AddressInSpain/PostCode

(Same as postal code)

Street

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/AddressInSpain/Address

else

   Facturae/Parties/SellerParty/LegalEntitty/AddressInSpain/Address

PostalCode

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/AddressInSpain/PostCode

else

   Facturae/Parties/SellerParty/LegalEntitty/AddressInSpain/PostCode

City

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/AddressInSpain/Town

else

   Facturae/Parties/SellerParty/LegalEntitty/AddressInSpain/Town

CountryCode

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/AddressInSpain/CountryCode

else

   Facturae/Parties/SellerParty/LegalEntitty/AddressInSpain/CountryCode

TelephoneNumber
 

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/ContactDetails/Telephone

else

   Facturae/Parties/SellerParty/LegalEntitty/ContactDetails/Telephone

Fax

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/ContactDetails/Telefax

else

   Facturae/Parties/SellerParty/LegalEntitty/ContactDetails/Telefax

SupplierTaxregno

Facturae/Parties/SellerParty/TaxIdentification/TaxIdentificationNumber

Email

if (Facturae/Parties/SellerParty/TaxIdentification/PersonTypeCode == F)

   Facturae/Parties/SellerParty/Individual/ContactDetails/ElectronicMail

else

   Facturae/Parties/SellerParty/LegalEntitty/ContactDetails/ElectronicMail

SupplierNumber  
INVOICES Standard Field Types

Location of element mapped in the XML code

InvoiceCredit

Facturae/Invoices/Invoice/InvoiceHeader/InvoiceDocumentType

if (InvoiceDocumentType == OO or InvoiceDocumentType== OR)

   1 (credit)

else

   0 (debit)

Invoice number Facturae/Invoices/Invoice/InvoiceHeader/InvoiceNumber
Invoice date Facturae/invoices/invoice/InvoiceIssueData/issueDate
Invoice due date Facturae/invoices/invoice/PaymentDetails/InstallmentsDueDate
Sub Total Facturae/invoices/invoice/invoiceTotals/TotalGrossAmount
Tax rate percent Facturae/invoices/invoice/TaxesOutputs/Tax/TaxRate
Tax Facturae/invoices/invoice/invoiceTotals/TaxOut
Total Facturae/invoices/invoice/InvoiceTotals/InvoiceTotal
Invoice currency Facturae/invoices/invoice/InvoiceIssueData/InvoiceCurrencyCode
Invoice order number Facturae/invoices/invoice/items/InvoiceLine/PurchaseorderReference
Supplier IBAN1 Facturae/invoices/invoice/PaymentDetails/installment/AccountToBeCredited/IBAN
DeliveryDate Facturae/invoices/invoice/InvoiceLine/DeliverNotesReferences/deliveryNote/deliveryNoteData
DeliveryNote Facturae/invoices/invoice/invoiceLine/DeliveryNotesReferences/DeliveryNote/DeliverNoteNumber
InvoiceDiscountAmount Facturae/invoices/invoice/invoiceTotals/GeneralDiscounts/Discount/DiscountAmount
InvoiceDiscountPercent Facturae/invoices/invoice/InvoiceTotals/GeneralDiscounts/Discount/DiscountRate
Buyer Tax reg no Facturae/Parties/BuyerParty/TaxidentificationNumber
Supplier Tax reg no Facturae/Parties/SellerParty/Taxidentification/TaxidentificationNumber
Invoicing period start Facturae/Invoices/Invoice/InvoiceIssueData/invoicingPeriod/StartDate
Invoicing period end Facturae/Invoices/Invoice/InvoiceIssueData/invoicingPeriod/EndDate
Invoice note Facturae/invoices/Invoice/PaymentDetails/Installment/CollectionAdditionalInformation
Line Item Fields

Location of element mapped in the XML code

Row Id Facturae/invoices/Invoice/items/invoiceLine/RowIdentifier
Identifier Facturae/invoices/Invoice/items/invoiceLine/IssuerContractReference
Description Facturae/invoices/Invoice/items/invoiceLine/ItemDescription
Quantity Facturae/invoices/Invoice/items/invoiceLine/Quantity
Unit of Measure Facturae/invoices/Invoice/items/invoiceLine/UnitOfMeasure
Order no Facturae/invoices/Invoice/items/invoiceLine/ReceiverTransactionReference
Unit price Facturae/invoices/Invoice/items/invoiceLine/UnitPriceWithoutTax
Amount excl Tax Facturae/invoices/Invoice/items/invoiceLine/GrossAmount
Tax % Facturae/invoices/Invoice/items/invoiceLine/TaxesOutputs/Tax/TaxRate
Discount Facturae/invoices/Invoice/items/invoiceLine/DiscountsAndRabates/Discount/DiscountAmount
Discount % Facturae/invoices/Invoice/items/invoiceLine/DiscountsAndRabates/Discount/DiscountRate
Tax amount Facturae/invoices/Invoice/items/invoiceLine/TaxesOutputs/Tax/TaxAmount/TotalAmount
Amount incl Tax Facturae/invoices/Invoice/items/invoiceLine/TaxesOutputs/GrossAmount

Attachment fields

Location of element mapped in the XML code

Additional info Facturae/Invoices/Invoice/AdditionalDataRelatedDocuments/Attachmentencoding
Embedded value Facturae/Invoices/Invoice/AdditionalDataRelatedDocuments/AttachmentData
Data type Facturae/Invoices/Invoice/AdditionalDataRelatedDocuments/AttachmentFormat
File name Facturae/Invoices/Invoice/AdditionalDataRelatedDocuments/AttchmentDescription
Scheme URI Facturae/Invoices/Invoice/AdditionalDataRelatedDocuments/AttachmentCompression/Algorithm

invoice note field

Location of element mapped in the XML code

   

Supported XML invoice standard formats

Processing XML invoices using COLLECTOR: Overview

Optimizing XML invoice definitions

Creating rules to map values for fields in XML invoices