XML invoice standard - Svefaktura

Svefaktura is an XML invoice standard that is used in Sweden.

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

This topic lists the INVOICES field types that are normally mapped to elements in these documents and indicates where in the XML code the elements are normally found. The INVOICES 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

BuyerAddressPostalCode

/Invoice/cac:BuyerParty/cac:Party/cac:Address/cbc:PostalZone

BuyerContactPersonName

/Invoice/cac:BuyerParty/cac:Party/cac:Contact/cbc:Name

BuyerTaxNumber1

/Invoice/cac:BuyerParty/cac:PartyTaxScheme/cac:CompanyID

Takes the value from the section in which the value of

/Invoice/cac:BuyerParty/cac:PartyTaxScheme/cac:TaxScheme/cac:ID is equal to ‘VAT’.

BuyerTaxNumber2

/Invoice/cac:BuyerParty/cac:PartyTaxScheme/cac:CompanyID

Takes the value from the section in which the value of

/Invoice/cac:BuyerParty/cac:PartyTaxScheme/cac:TaxScheme/cac:ID is equal to ‘SWT’.

BuyerVATRegistrationNumber

/Invoice/cac:BuyerParty/cac:PartyTaxScheme/cac:CompanyID

Takes the value from the section in which the value of

/Invoice/cac:BuyerParty/cac:PartyTaxScheme/cac:TaxScheme/cac:ID is equal to ‘VAT’.

DeliveryDate

/Invoice/cac:Delivery/cbc:ActualDeliveryDateTime

DeliveryNote

/Invoice/cac:InvoiceLine/cac:DespatchLineReference/cac:DocumentReference/cac:ID

DeliveryTerms

/Invoice/cac:DeliveryTerms/cbc:SpecialTerms

InvoiceBaselineDate

/Invoice/cbc:IssueDate

InvoiceCredit

/Invoice/InvoiceTypeCode

Extracted value ‘380’ is translated into 0 (Debit)

Any other extracted value is translated into 1 (Credit)

InvoiceCurrency

/Invoice/InvoiceCurrencyCode

InvoiceDate

/Invoice/cbc:IssueDate

InvoiceDueDate

/Invoice/cac:PaymentMeans/cbc:DuePaymentDate

InvoiceNote

/Invoice/cbc:Note

This field is not an INVOICES field by definition, but it is included so that a note or additional information can be displayed in the image of the invoice.

InvoiceNumber

/Invoice/ID

InvoiceOrderNumber

/Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference/cac:BuyersID

InvoiceTaxAmount1

/Invoice/cac:TaxTotal/cac:TaxSubTotal/cbc:TaxAmount

Only takes the value from the section in which the value of

/Invoice/cac:TaxTotal/cac:TaxSubTotal/cac:TaxCategory/cac:ID is not equal to ‘E’

InvoiceTotalVATAmount

/Invoice/cac:TaxTotal/cbc:TotalTaxAmount

If this element does not exist, use alternative location:

/Invoice/cac:LegalTotal/cbc:TaxExclusiveTotalAmount

InvoiceTotalVATExcludedAmount

/Invoice/cac:LegalTotal/cbc:LineExtensionTotalAmount

InvoiceTotalVATIncludedAmount

/Invoice/cac:LegalTotal/cbc:TaxInclusiveTotalAmount

InvoiceTotalVATRatePercent

/Invoice/cac:TaxTotal/cac:TaxSubTotal/cac:TaxCategory/cbc:Percent

Only takes the value from the section in which the value of

/Invoice/cac:TaxTotal/cac:TaxSubTotal/cac:TaxCategory/cac:ID is not equal to ‘E’

InvoicingPeriodEnd

/Invoice/InvoicingPeriod/cbc:EndDateTime

InvoicingPeriodStart

/Invoice/InvoicingPeriod/cbc:StartDateTime

Payment ReferenceNumber

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:PaymentInstructionID

PaymentTerms

/Invoice/cac:PaymentTerms/cbc:Note

PaymentTermsInterest

/Invoice/cac:PaymentTerms/cbc:PenaltySurchargePercent

PaymentType

/Invoice/cac:PaymentMeans/cac:PaymentMeansTypeCode

SupplierAccountNumber1

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:ID

Only takes the value from the section in which the value of

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:FinancialInstitution/cac:ID is equal to ‘PGSISESS’ (PlusGiro)

SupplierAccountNumber2

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:ID

Only takes the value from the section in which the value of

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:FinancialInstitution/cac:ID is equal to ‘BGABSESS’ (BankGiro).

SupplierAccountNumber3

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:ID

Only takes the value from the section in which the value of

/Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:FinancialInstitution/cac:ID is not equal to  ‘PGSISESS’ (PlusGiro) or ‘BGABSESS’ (BankGiro).

SupplierAddressPostalCode

/Invoice/cac:SellerParty/cac:Party/cac:Address/cbc:PostalZone

SupplierTaxNumber1

/Invoice/cac:SellerParty/cac:PartyTaxScheme/cac:CompanyID

Takes the value from the section in which the value of

/Invoice/cac:SellerParty/cac:PartyTaxScheme/cac:TaxScheme/cac:ID is equal to ‘VAT’.

SupplierTaxNumber2

/Invoice/cac:SellerParty/cac:PartyTaxScheme/cac:CompanyID

Takes the value from the section in which the value of

/Invoice/cac:SellerParty/cac:PartyTaxScheme/cac:TaxScheme/cac:ID is equal to ‘SWT’.

SupplierVATRegistrationNumber

/Invoice/cac:SellerParty/cac:PartyTaxScheme/cac:CompanyID

Takes the value from the section in which the value of

/Invoice/cac:SellerParty/cac:PartyTaxScheme/cac:TaxScheme/cac:ID is equal to 'VAT'.

Line Item Fields

Location of element mapped in the XML code

LIT_ArticleIdentifier

/Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification/cac:ID

LIT_ArticleName

/Invoice/cac:InvoiceLine/cac:Item/cbc:Description

LIT_DeliveredQuantity

/Invoice/cac:InvoiceLine/cbc:InvoicedQuantity

LIT_DeliveredQuantityUnitCode

/Invoice/cac:InvoiceLine/cbc:InvoicedQuantity/@quantityUnitCode

LIT_OrderNumber

/Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference/cac:BuyersID

LIT_RowIdentifier

/Invoice/cac:InvoiceLine/cac:ID

LIT_UnitPriceAmount

/Invoice/cac:InvoiceLine/cac:Item/cac:BasePrice/cbc:PriceAmount

LIT_VatExcludedAmount

/Invoice/cac:InvoiceLine/cbc:LineExtensionAmount

LIT_VatRate

/Invoice/cac:InvoiceLine/cac:Item/cac:TaxCategory/cbc:Percent

Attachment fields

Location of element mapped in the XML code

ID

/Invoice/cac:AdditionalDocumentReference/cac:ID

DataURI

/Invoice/cac:AdditionalDocumentReference/ cac:ID/@identificationSchemeDataURI

SchemeURI

/Invoice/cac:AdditionalDocumentReference/cac:ID/@identificationSchemeURI

DataType

/Invoice/cac:AdditionalDocumentReference/cac:ID/@identificationSchemeName

AdditionalInfo

/Invoice/cac:AdditionalDocumentReference/cac:ID/@identificationSchemeID

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