Austrian Peppol-UBL e-invoice
…in its version 304.13.25 does not work out of the box in Dynamics 365 for Finance, unfortunately. First and foremost, the public entity’s order number (the Customer requisition at the sales header order or in the project contract funding source details) is a must! As you specify the Customer requisition, a reference to the PO line number reference becomes mandatory, too. Yet this invoice line-level field is either malformed or missing. Moreover, Austria always requires an email address of the supplier (us) which is disabled or not working in all 4 standard ER formats. This can be the default e-mail address of the company in the legal entity settings.
As a good start, I recommend the excellent blog series E-Invoice in D365FO for Norway – Part 1 (Intro) – DynFOTech
The core configuration includes specifying the Endpoint ID of the supplier (ours) under Bank account / Routing number in the legal entity parameters, and providing the conversion of the units of measure into the UN standard, see the blog above. For every unit of measure there must be an own Code ‘axis’ to compensate for the well known design flaw in the external code values cardinality in Dynamics 365 for SCM:
Then, to finally make it work, you have to extend all 4 standard electronic formats from Microsoft and make at least the following changes:
Format changes
Issue/Deficiency | Path | Peppol Sales invoice | Peppol Project Invoice | Peppol Sales Credit Note | Peppol Project Credit Note |
---|---|---|---|---|---|
Mandatory Seller/ElectronicMail | cac:AccountingSupplierParty/cac:Party/cbc:ElectronicMail must be enabled all the way down, and mapped like this: | IF(Invoice.InvoiceBase.CompanyContact.ElectronicMail<>"", Invoice.InvoiceBase.CompanyContact.ElectronicMail, Invoice.InvoiceBase.CompanyInfo.Email) | IF(ProjectInvoice.InvoiceBase.Contact.ElectronicMail<>"", ProjectInvoice.InvoiceBase.Contact.ElectronicMail, ProjectInvoice.InvoiceBase.CompanyInfo.Email) | IF(Invoice.InvoiceBase.CompanyContact.ElectronicMail<>"", Invoice.InvoiceBase.CompanyContact.ElectronicMail, Invoice.InvoiceBase .CompanyInfo.Email) | IF(ProjectInvoice.InvoiceBase.Contact.ElectronicMail<>"", ProjectInvoice.InvoiceBase.Contact.ElectronicMail, ProjectInvoice.InvoiceBase.CompanyInfo.EMail) |
Wrong OrderLineRef.ID, namely taken from ProjTransId = alphanumeric instead of numeric | Every of the five cac:InvoiceLine/cac:OrderLineReference/cbc:LineID must be unique and therefore enumerated. In the the Project Credit note the tags are missing completely and need to be added from scratch (5x) | ('$ATLineNumberCollection'.Collect(1) + '$ATLineNumberCollection'.Sum(false))-1 | ('$ATLineNumberCollection'.Collect(1) + '$ATLineNumberCollection'.Sum(false))-1 | ||
Missing PaymentMeans, i.e. our (beneficiary) bank account | cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID, schemeID and .../cac:FinancialInstitutionBranch/cbc:ID must be enabled all the way down and mapped | ProjectInvoice.InvoiceBase.CompanyInfo.BankAccount.IBAN ProjectInvoice.InvoiceBase.CompanyInfo.BankAccount.SWIFT | |||
Missing OrderReference (their PO number) | cac:OrderReference/cbc:ID must be enabled | Invoice.PurchaseOrder | |||
Missing or wrongly formatted line quantity; the sign is properly displayed in Denmark only 🙂 | cac:CreditNoteLine/cbc:CreditedQuantity must be enabled | IF(OR(Invoice.InvoiceBase.CompanyInfo.PostalAddress.Country="DK", Invoice.InvoiceBase.CompanyInfo.PostalAddress.Country="AT"), -(@.LineBase.Quantity), @.LineBase.Quantity) | -(@.LineBase.Quantity) | ||
The ActualDeliveryDate ("Leistungsdatum") refers to the date or the corrected invoice. The data is not really known and not properly mapped, here is a stub: | cac:Delivery/cbc:ActualDeliveryDate is completely missing and needs to be added first | Invoice.InvoiceBase. ShipmentDate | ProjectInvoice. InvoiceBase.VATRegisterDate | ||
The root node bears no name, hence the format cannot be assigned a destination | Call the root node "XMLHeader", for example | X | X |
With regards to the collection $ATLineNumberCollection for the enumeration of invoice lines, refer to respective blog below.
Useful links
E-invoice and configurable business documents blog series
Further reading:
ZUGFeRD 2.2 import for Dynamics 365 for Finance
Aktueller Stand der eRechnung in D365 for Finance (Deutschland)
Austrian Peppol-UBL e-invoice
ZUGFeRD 2.2/ Factur-X 1.0 for Dynamics 365 FO
How NOT to send an order confirmation per e-mail
Enumerate lines in Configurable Business Documents
Canvas sections in D365 Configurable Business Documents
Italian eInvoicing FatturaPA, CIG and CUP numbers, RIBA
Italian eInvoicing FatturaPA: Part 2