Mapping from Business Central documents to ZUGFeRD and XRechnung

FORNAV out of the box contains mappings from Business Central documents to ZUGFeRD and XRechnung, which covers populating the mandatory fields in the standard defined by KoSIT (ForNAV Support for ZUGFeRD-installation guide-Final.pdf).

However, in some cases you might want to add information that is not mandatory.

To do this, you can modify the default mapping (eSalesInvoice.Codeunit.al or eSalesCreditNote.Codeunit.al) by overriding the event in the “ForNAV eDocument Interface”:

A screen shot of a computer code

Description automatically generated

The “OnAfterDocument2InvoiceDescriptor” event is used to change the FORNAV default mapping and the “OnDocument2InvoiceDescriptor” event is used to override the default mapping completely and to map new document types.

ZUGFeRD support for non-FORNAV reports

To add ZUGFeRD support for non-FORNAV reports, you simply subscribe to an event in the report that is called with the document header record, and then call the AddZugFeRD method in the “FORNAV eDocument Interface” codeunit with the report number and the RecordId:    

A screen shot of a computer

Description automatically generated