22
EHF Norway DAX 2012 - setup Reviewed 30/4-2015 You can use electronic invoicing in Microsoft Dynamics AX for sending electronic invoices to public enterprises in the Official Information Online Universal Business Language (OIOUBL) format – in Norway Electronic HandelsFormat (EHF). The current supported version is EHF 2.0.04. http://www.anskaffelser.no/e-procurement Very useful document for file format and data on the file: https://github.com/difi/vefa-validator-conf/blob/master/STANDARD/ EHFInvoice/2.0/guide/Implementation%20Guide%20EHF%20Invoicing %20Process%20v2.0.pdf You can test whether your invoices, credit notes and reminders are in accordance with the requirements of electronic trading format (EHF) at: http://vefa.difi.no/formatvalidering/invoice-validation-en.html . Setting up EHF for Norway: http://technet.microsoft.com/EN-US/library/dn304982.aspx This document includes examples for A Basic setup EHF B AIF C Batch processing D Setup for company E Setup for public sector customer F Notes Page 1 of 22

msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

EHF Norway DAX 2012 - setup

Reviewed 30/4-2015

You can use electronic invoicing in Microsoft Dynamics AX for sending electronic invoices to public enterprises in the Official Information Online Universal Business Language (OIOUBL) format – in Norway Electronic HandelsFormat (EHF). The current supported version is EHF 2.0.04.

http://www.anskaffelser.no/e-procurement

Very useful document for file format and data on the file:

https://github.com/difi/vefa-validator-conf/blob/master/STANDARD/EHFInvoice/2.0/guide/Implementation%20Guide%20EHF%20Invoicing%20Process%20v2.0.pdf

You can test whether your invoices, credit notes and reminders are in accordance with the requirements of electronic trading format (EHF) at:

http://vefa.difi.no/formatvalidering/invoice-validation-en.html .

Setting up EHF for Norway:

http://technet.microsoft.com/EN-US/library/dn304982.aspx

This document includes examples for

A Basic setup EHF

B AIF

C Batch processing

D Setup for company

E Setup for public sector customer

F Notes

Page 1 of 18

Page 2: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

A. Basic setup

Set up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from any client computers that are used as batch servers in your system.

1. Set up the following folder structure for project invoices:

\\Server\OIOUBL\Project\Error

\\Server\OIOUBL\Project\Processed files

\\Server\OIOUBL\Project\Source

\\Server\OIOUBL\Project\Target

\\Server\OIOUBL\Project\XSLT

Set up the following folder structure for sales invoices:

\\Server\OIOUBL\Sales\Error

\\Server\OIOUBL\Sales\Processed files

\\Server\OIOUBL\Sales\Source

\\Server\OIOUBL\Sales\Target

\\Server\OIOUBL\Sales\XSLT

Page 2 of 18

Page 3: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

The folders are used as:

Error –Error messages that are generated when the .xml file is converted to the OIOUBL format.

Source –Raw xml-file generated by Microsoft Dynamics AX.

Processed files – Storage for the raw xml-file after the final EHF-file has been generated. The raw xml-file is moved from the Source folder to this folder.

Target – Used to save the final xml-file (this file is send to the access point).

XSLT – Used to save the eProjectInvoice_NO_OIOUBL or eSalesInvoice_NO_OIOUBL file (style sheet).

2. In AOT | Resources | Open and export following style sheets to the corresponding location:

File Location

eProjectInvoice_NO_OIOUBL.xsl \\Server\OIOUBL\Project\XSLT

eSalesInvoice_NO_OIOUBL.xsl \\Server\OIOUBL\Sales\XSLT

Page 3 of 18

Page 4: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

B. AIF

Use the Outbound ports form to create an outbound port, set up services and adapters for an outbound port, and specify the Application Integration Framework (AIF) settings that are required to generate Offentlig Information Online Universal Business Language (OIOUBL) electronic invoices.

1. Click System administration > Setup > Services and Application Integration Framework > Outbound ports.

2. In the Port name and Description fields, enter a name and a description for the outbound port.

NOTE: you need one port for sales invoices and one for project invoices.

3. In the Adapter field, select File system adapter. This adapter is used to create and save the OIOUBL electronic invoices.

4. In the URI field, specify the location of the Source folder where the raw xml-file is created (ref. the folders setup in point A.).

5. Click the Service contract customizations FastTab, and then click Service operations.

Select the SalesSalesEInvoiceService.read service operation for sales invoices, or the ProdProjEInvoiceService.read service operation for project invoices, and move it to the Selected service operations list. Close the form.

Page 4 of 18

Page 5: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

NOTE: If you for any reason do not see the needed service operation, you need to refresh Services:

AOT | Right click the service – Add-Ins | Register Service

6. In the Outbound ports form, select the Customize documents check box, and then click Data policies.

7. In the Document data policies form, click Enable all to select all XML schema elements, and then close the form (these fields with values are transferred to the raw xml-file; fields not used in the EHF-file can be omitted).

Page 5 of 18

Page 6: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

8. Click the Processing options FastTab, 8.1. Default encoding format field, select UTF-8. 8.2. Mark up Apply value mapping. In the value mapping form, tab page Units, choose Document

value External code and the desired Unit code:

9. Click the Troubleshooting FastTab, and then in the Logging mode field, select All document versions.

10. Select the Include exceptions in fault check box to display the X++ error messages. 11. Click the Security FastTab, and then in the Restrict to company field, select the company for

which the electronic invoices are generated. 12. Click Activate to use the port to exchange data by using AIF and close the form.13. Follow the above steps for Project invoices.

Page 6 of 18

Page 7: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

Page 7 of 18

Page 8: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

C. Batch processing

You need set up a batch job for sales outbound electronic invoices (here EHFS), and another batch job for project outbound electronic invoices (here EHFP).

1. Click System administration > Inquiries > Batch jobs > Batch jobs.

2. Press CTRL+N to create a batch job, and then in the Job description field, enter description for the batch job.

3. Save the batch job, and then click View tasks.

You need to setup three tasks, one per class. The classes used are:

AifOutboundProcessingService AifGatewaySendService EInvoiceFileTransform_OIOUBL

4. In the Batch tasks form, press CTRL+N to create a new batch task (1. Task).

4.1. Task description 1

4.2. In the Company accounts field, select the company you are creating the batch job for

4.3. Class name AifOutboundProcessingService

4.4. Choose batch group with selected batch server

Page 8 of 18

Page 9: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

5. CTRL+N to create a new batch task (2. Task).

5.1. Task description 2

5.2. In the Company accounts field, select the company you are creating the batch job for

5.3. Class name AifGatewaySendService

5.4. Choose batch group with selected batch server

5.5. On the lower pain of the Batch task form, click Ctrl+N and add condition where 1. Task has status Ended (before the selected task, here task 2, can start)

6. CTRL+N to create a new batch task (3. Task).

6.1. Task description 3

6.2. In the Company accounts field, select the company you are creating the batch job for

6.3. Class name EInvoiceFileTransform_OIOUBL

6.4. Choose batch group with selected batch server

6.5. On the lower pain of the Batch task form, click Ctrl+N and add condition where 2. Task has status Ended (before the selected task, here task 3, can start)

Page 9 of 18

Page 10: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

7. Still on the 3. Task, click Parameters

7.1. In the E-invoice OIOUBL XSL File Transformation form, specify the locations of the Source, Target, Processed, and Error file storage folders. For the XSLT file path, select the path for the eSalesInvoice_NO_OIOUBL file for sales invoices (here EHFS), or the path for the eProjectInvoice_NO_OIOUBL (EHFP) file for project invoices, and click OK.

7.2. Close the Batch task form.

8. On Batch job form, choose Recurrence and define the desired recurrence (for testing purposes 2 minutes works fine).

9. After batch job setup, choose Functions | Change status and change the status to Waiting

Page 10 of 18

Page 11: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

D. Company setup

The country code for company primary address is NOR in order to enable eInvoice field on the customer setup.

1. General ledger | Setup | Organization | Legal entities (here DEMF) – Primary address country code NOR for Norway

2. Company VAT number:

Page 11 of 18

Page 12: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

3. Company bank account (bank account connected the default method of payment on the public sector customer – the payee’s bank account number)

DEMF/Cash and bank management/Common/Bank accounts (example for testing purposes):

3.1. Method of payment DEMF/Accounts receivable/Setup/Payment/ Method of payments (example)

Page 12 of 18

Page 13: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

4. Sales tax code values

Sales tax code values used in Norway are converted to sales tax (VAT) categories. In order to get the correct categories on the file, the sales tax code values used on the invoice must have the sales tax code value used in Norway.

Rates used as of January 2015 with corresponding VAT categories:

Source:

EHF Implementation guide

Invoice and Credit note

Version: 2.0.4

Date: March 01, 2015

Example:

Page 13 of 18

Page 14: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

5. Unit codes

Unit code MUST be coded according to the UN/ECE Recommendation 20; Source:

DIFI EHF Implementation guide

Invoice and Credit note

Version: 2.0.2

Date: August 19, 2014

The code list:http://www.unece.org/tradewelcome/areas-of-work/un-centre-for-trade-facilitation-and-e-business-uncefact/outputs/cefactrecommendationsrec-index/list-of-trade-facilitation-recommendations-n-16-to-20.html

In AX (example; if the unit in AX is pcs, the value used on the file is the external code value; here C62):

DEMF/Organization administration/Setup/Units

Page 14 of 18

Page 15: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

E. Public sector agency (customer account)

Choose the desired customer: Accounts receivable > Common > Customers > All customers (here 1000 – Norwegian PS)

1. In the Customers form, click Edit, and then click the Addresses FastTab to verify that the country/region code, ZIP/postal Code, and street name are entered for the primary address.

2. Click the Invoice and delivery fastTab and mark the field for eInvoice and ensure the Tax exempt number is filled in with the organization number + MVA.

Page 15 of 18

Page 16: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

3. Click the Payment defaults FastTab, and then in the Method of payment field, select a method of payment for the customer. Company bank account number is fetched from the bank account number on the default method of payment on the customer.

4. On the Action Pane, click Contacts > Ensure the selected customer has contact setup

Page 16 of 18

Page 17: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

F. Notes1. Registering invoice, Customer requisition and Reference are recommended:

Example: Free text invoice header

2. The buyer's accounting code applied to the Invoice Line SHOULD be provided according to EHF. This choice can be done on the invoice header:

And the dimension account on invoice line level:

Page 17 of 18

Page 18: msdnshared.blob.core.windows.net · Web viewSet up the following folder structure in a shared location that can be accessed from the Application Object Server (AOS) computer and from

3. In order to sent the invoice to batch queue, the invoice must be sent to printer when posting the invoice.

If for any reason the invoice is not set to batch queue, the invoice can be re-sent electronically by choosing invoice journal and Send:

Page 18 of 18