
Hello
I am trying to validate an XML file for use in Peppol Billing 3.0. It is for a Swedich company.
The error message is this
UBL 2.1 Invoice
The content "unitCodeListID" of element <InvoicedQuantity> does not match the required simple type.
Cannot convert string to decimal: unitCodeListID; Line#: -1; Column#: -1
I have this as content
<cbc:InvoicedQuantity unitCode="13" unitCodeListID="UNECERec20">unitCodeListID</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SEK">150.00</cbc:LineExtensionAmount>
<cac:OrderLineReference>
<cbc:LineID>1859331526.0000000000</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Youth Accessory Combo Set</cbc:Description>
<cbc:Name>Youth Accessory Combo Set</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>0001</cbc:ID>
</cac:SellersItemIdentification>
<cac:ClassifiedTaxCategory>
<cbc:ID schemeAgencyID="6">S</cbc:ID>
<cbc:Percent>25.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5135" schemeAgencyID="6">VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SEK">150</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="13" unitCodeListID="UNECERec20">1</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
I am thinking that I am using the wrong unit code here. 13 might be something else.
Hi Kristina,
You need to use standard unit codes that can be validated via PEPPOL.
Link for UNECERec20 units: docs.peppol.eu/.../
In order to fulfil this, you need to add "External codes" for the units: