Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


The Ministry of Finance of Poland introduced an updated version of the JPK structure for invoices - JPK_FA (2), which will be in force from July 1, 2019. The updated schema of JPK_FA (2) is published on the website of the Ministry of Finance.


The version “2” of schema of JPK_FA introduces the following changes:

  • In the "Header" (Nagłówek) section, the value of the “kodSystemowy” attribute of the <KodFormularza> tag is changed to “JPK_FA (2)”; value of “WariantFormularza” tag is changed to “2” respectively.

  • The format applied to the value of the NIP number of seller's and buyer's (fields P_4BP_5B) has been changed: the length is extended up to 30 characters, VAT registration numbers outside of the Poland are supported. Technical validation on P_4B, P_5B values of the JPK_FA file of compliance with the Polish NIP number is omitted.

  • In the field "Type of Invoices" (RodzajFaktury) the option to enter the type "POZ" (remaining) has been removed;

  • The "Period of Corrected Period" (OkresFaKorygowanej), containing information on the period of the corrected invoice, became optional;

  • The field "P_12" (information in lines regarding the tax rate) will allow new values: "4", "oo" (reverse charge as part of domestic transactions), "np" (for transactions of delivery of goods and provision of services outside the country).


The hotfix provides support of changes in VAT invoices report (SAF invoices or JPK_FA) introduced by the version 2 which must be valid from July 1, 2019.

To prepare your AX 2012 R3 system to report “JPK_FA” report of version “2” (from the beginning of July 2019) the following steps must be done:

  1. Install the hotfix package (link to download is in the “Hotfix information” section of this article), which contains new XSLT file (AifOutboundPortReportSAFVATInvoice_PL.xslt).

  2. Open AOT > Resources, select AifOutboundPrtReportSAFVATInvoice2019_PL, right-click on it and select Open.


3. In the opened Preview form click on Export button, select folder to save the “AifOutboundPortReportSAFVATInvoice_PL” file and click Save.

4. Open the saved “AifOutboundPortReportSAFVATInvoice_PL” file in the specified folder and find the row #25 to replace temporary values with the Sales tax code(s) used in your Legal entity to post transactions on Reverse change (which must be reports as “oo”):

row #25 <xsl:variable name="ReverseChargeTaxCodes" select="'TaxCode1;TaxCode2;TaxCode3'"/>

Note! Follow the syntaxis applied in the example: replace only names of the Sales tax codes.

5. In the “AifOutboundPortReportSAFVATInvoice_PL” file find also the row #26 to replace temporary values with the Sales tax code(s) used in your Legal entity to post transactions on Reverse change (which must be reported as “np”):

row #26 <xsl:variable name="NonTaxableTaxCodes" select="'TaxCode4;TaxCode5;TaxCode6'"/>

Note! Follow the syntaxis applied in the example: replace only names of the Sales tax codes.

6. Save the changes in the AifOutboundPortReportSAFVATInvoice_PL” file.

7. Open System administration > Setup > Services and Application Integration Framework > Outbound ports for electronic audit reports, select the “SAF VAT invoices (Poland)” format (if it exists) and Delete related XSLT transformation :


8. Click folder iconof the “Import XSLT” field on the “Outbound port” fast-tab and select the exported and updated before “AifOutboundPortReportSAFVATInvoice_PL.xslt” file (p.3-6 of this guidance).


9. Click on “Create / Update ports” button on the Action pane, check the XSLT transformation was updated.

10. If “SAF VAT invoices (Poland)” format was not set up before you need to click on “Create / Update ports” button on the Action pane to populate the list of default ports, define the path the “AifOutboundPortReportSAFVATInvoice_PL.xslt” file (p.8 of this guidance), set "Default export path" to the folder you expect where the reports to be saved, click "Create / Update ports" to import the XSLT into Dynamics AX with the default ID. The "XSLT ID" field is set to reference the XSL transformation. As a result, the outbound AIF port is created and initialized with a list of needed services.

In particular, the algorithm of P_12 field’s value which besides the tax rate must represent three text values (“oo”, "np", “zw”) is based on supposition that companies in Poland define and use a specific Sales tax code(s) for reverse charge and is the following:


Description (pl)

Description (en-us)

How AX 2012 R3 will distinguish


odwrotne obciążenie

Reverse charge

In XSLT: Create a configurable list of Sales tax codes (raw #25) to define Sales tax codes specifically used for Reverse charge


Niepodlegające opodatkowaniu-transakcje dostawy towarów oraz świadczenia usług poza terytorium kraju

Non-taxable supplies of goods and services outside the country

In XSLT: Create a configurable list of Sales tax codes (raw #26) to define Sales tax codes transactions on which with _exempt_ will be reported as “np”. These Sales tax codes should not be included into the list for Reverse chanrge.


zwolnione z opodatkowania

Exempt from taxation

Other _exempt_ tax transactions will be reported as “zw” (Sales tax codes, included into the Sales tax groupe with "Exempt" but not included into the configurable list in the raw #26 and #25). 

Hotfix information

A supported hotfix is available from Microsoft. There is a "Hotfix download available" section at the top of this Knowledge Base article. If you are encountering an issue downloading, installing this hotfix, or have other technical support questions, contact your partner or, if enrolled in a support plan directly with Microsoft, you can contact technical support for Microsoft Dynamics and create a new support request. To do this, visit the following Microsoft website:

You can also contact technical support for Microsoft Dynamics by phone using these links for country specific phone numbers. To do this, visit one of the following Microsoft websites:



In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to any additional support questions and issues that do not qualify for the specific update in question.

How to obtain the Microsoft Dynamics AX updates files

This update is available for manual download and installation from the Microsoft Download Center.

Download update for Microsoft Dynamics AX 2012 R3


You must have one of the following products installed to apply this hotfix:

  • Microsoft Dynamics AX 2012 R3

Restart requirement

You must restart the Application Object Server (AOS) service after you apply the hotfix.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!