Setting up Integration with the National System of e-Invoices
Polish Localization enables handling of the structured invoices according to the valid NSeI schema. For proper communication with the National System of e-Invoices, it is required to define the required settings and initiate the correct dictionaries and schemas.
Generating Settings Automatically
To run automatic generation of the basic settings:
Choose the icon, enter Assisted Setup, and then select a related link.
On the Assisted Setup page, select an appropriate line that contains the Set up NSeI.
Run the Start Setup action.
On the NSeI Assisted Setup page, you will see the instructions. Follow the instructions and fill in the required fields.
- VAT Registration No. - The field is filled in automatically on the Company Information page (the field cannot be edited).
- Authorization Token - Specifies the authorization token for the National System of e-Invoices. The authorization token can be generated in the NSeI Taxpayer Application (Aplikacja Podatnika KSeF) on the following page: podatki.gov.pl/ksef. For detailed information, see Instrukcja uwierzytelnienia w Aplikacji Podatnika KSeF.
- Environment Type - Specifies the NSeI environment type to or from which documents will be sent/downloaded by selecting one of the currently available options:
- Test - the test version of the environment,
- Demo - the pre-production version of the environment (demo).
- Validation Type - Specifies how structured invoices generated during invoice posting will be validated against the schema.
Government Reporting Setup
To define data on communication with the National System of e-Invoices for government reporting:
Choose the icon, enter Gov. Reporting Setup, and then select a related link.
On the Gov. Reporting Setup page fill in the fields:
Check Sales Documents Against NSeI Schema- Specifies whether sales documents will be verified against the NSeI schema.
Authorization Token - Specifies the authorization token for the National System of e-Invoices. The authorization token can be generated in the NSeI Taxpayer Application on the following page: podatki.gov.pl/ksef.
Environment Type - Specifies the NSeI environment type to or from which documents will be sent/downloaded by selecting one of the currently available options:
- Test - the test version of the environment,
- Demo - the pre-production version of the environment (demo).
NSeI Environment URL - Specifies the URL of the NSeI environment. The field is not editable.
Validation Type - Specifies how structured invoices generated during invoice posting will be validated against the schema.
- Local - The schema stored in the database will be used to verify the generated .xml files (the option available since Business Central 22).
- Online - The schema made available online by the Ministry of Finance will be used to verify the generated .xml files. if this option is selected, Internet access is necessary, because each time invoices are posted, the template structure of the document is downloaded from the website.
Settings of the e-Invoice Schema
Taking into account that it is possible that the Ministry of Finance will change the schema for structured invoices, Polish Localization provides a functionality for defining multiple versions and related dictionaries.
Thanks to this, subsequent schema versions can be delivered as predefined codeunits in subsequent versions of the application. Initialization of a new version of the schema is run automatically during the installation of the application update or by selecting the Set up NSeI action on the Assisted Setup page.
To validate and confirm the setup that has been defined for the valid e-invoice schema:
Choose the icon, enter NSeI Schema Versions, and then select a related link.
The NSeI Version Schema page lists all schema versions a within the system:
System Code - Specifies the system code of the schema version (non-editable field).
Schema Version - Specifies the version number of the schema (non-editable field).
Form Variant- Specifies a form variant (non-editable field).
Starting Date - Specifies the date from which the version of the schema effective (non-editable field).
Status - Specifies the setup status for the schema version. The options are:
- New,
- Under Development,
- Validated,
- Closed.
The setup verification process and setting of the appropriate status have been described in Setup Validation for e-Invoice Schema.
Viewing the e-Invoice Schema
To display the e-Invoice schema, choose the Open NSeI Schema action.
The NSeI Schema Dictionary page lists all elements of the schema version that has been made available by the Ministry of Finance. Different attributes are used to describe the schema:
Name - Specifies the element name used in the schema (non-editable field).
Description - Specifies the element description used in the schema (non-editable field).
Data Type - Specifies the element data type used in the schema (non-editable field). Data types are represented by dictionaries set in the schema.
Element Type - Specifies the element type specified in the schema setup (non-editable field). The following types of elements are possible:
Mandatory - Specifies the field that is mandatory due to technical requirements. These fields must be filled in and validated against the schema of the invoice when it is posted. If this fields are not filled in, the structured invoice will not be issued. These fields include e.g.: Buy-from Country Code or Total Receivables Invoice Amount. These fields can be filled in automatically by the system or manually - by a user when filing in the standard fields on a sales invoice, sales order, sales return order or sales credit memo.
Optional - Specifies the fields that are mandatory, because of the requirements of the VAT Act. These fields do not impact the semantic correctness of the xml file. For example, it can be a field with the amount of 23% tax rate or delivery date. These fields can be filled in automatically by the system or manually- by the user by filling in standard fields on sales documents or by using a dedicated action.
Facultative - Specifies fields which are not required by the NSeI or under the VAT Act, but due to a business practice or other regulations; e.g. this can apply to bank account number or excise refund fields. These fields can be filled in automatically by the system or manually the user.
Value Source - Specifies where the value will be retrieved for the element (non-editable field). The following options are available:
System - Specifies that the value of the element will be copied from the standard Business Central field or calculated based on the existing data in the document.
User-Defined Element - Specifies that the value of the element will be set manually by the user.
User-Defined Multiple Element - Specifies that the element can occur multiple times in the document structure as required. The user manually enters the number of occurrences of the element and the value of the element (there are multiple sections in the structure).
Skip on Sending to NSeI - This is a logical field where the user can decide that the element in not to be included when creating a structured invoice sent to the National System of e-Invoices. This setting applies only to elements of the Optional type.
Additional Setup for e-Invoice Schema
Each schema version requires setting up VAT rates and payment methods.
Mapping VAT Rates for the National System of e-Invoices
To map VAT rates for the National System of e-Invoices:
- On the NSeI Schema Versions page, select the Dictionaries action, and then select NSeI VAT Rate Setup.
- On the NSeI VAT Rate Setup page, use the dictionary of the valid schema elements to set up the NSeI VAT Rate value for different VAT business posting group combinations.
Note
By default, when you open the NSeI VAT Rate Setup page, the synchronization with the combinations of VAT business posting groups defined on the VAT Posting Setup page is run.
Note
You can also define the NSeI VAT rate setup on the VAT Posting Setup page by selecting the NSeI VAT Rate field.
NSeI Payment Method Mapping
Note
The standard payment mehod dictionary (incl. 1 -7 codes) has been extened with the OTHER payment code to enble you to define a different payment method.
To map NSeI payment methods:
- On the NSeI Schema Versions page, select the Dictionaries action, and then select Payment Method Setup.
- On the NSeI Payment Method Setup page, define the appropriate value in the NSeI Payment Method field for all payment methods that exist in the system by selecting a value from the dictionary of available elements based on the schema.
- When a payment method is mapped into the OTHER code, the FormaPlatnosci field will not be completed on the structured inovoice. The PlatoscInna field will contain 1, and the OpisPlatnosci field will be populated with a description of the payment method you have selected.
Note
You can also set up NSeI payment methods from the Payment Methods page by selecting the NSeI Payment Method field.
Setup for Tax-exempt Sales
To map the basis for the NSeI tax exemption:
- On the NSeI Schema Versions page, select the Dictionaries action, and then select NSeI Tax Exemption Setup.
- On the NSeI Tax Exemption Setup page for VAT clauses for sales exempt from VAT that have been set up in the system, define the appropriate value of NSeI VAT Exemption Basis by selecting a value from the dictionary of available elements from the logical structure (P_19A. P_19B lub P_19C).
- Verify that the Description field in the entries related sales VAT clauses specifies the provision of an act or directive that is a basis for tax exemption.
- Make sure that corresponding VAT clause codes have been assigned to all VAT posting group combinations that relate to exempt sales.
Validating the Setup for the e-Invoice Schema
Each schema requires a set of dictionaries and additional settings. Initialization of a new version of the schema is run automatically during the installation of the application update or by selecting the Set up NSeI action on the Assisted Setup page. Before the NSeI schema (with additional settings) is used in the system when posting documents, it should be verified and approved by the user. To approve the NSeI schema setup:
Choose the icon, enter NSeI Schema Versions, and then select a related link.
The NSeI Version Schema page lists all schema versions within the system.
To approve all settings associated with a given version of the NSeI schema, set the Status field to Approved. The status can be changed only, if the setup for a specific NSeI schema version is complete. Otherwise, a relevant error message is displayed.
Note
If all settings you define with the Set up NSeI action are correct, the current NSeI schema is set to Approved by default.
- To make changes to the NSeI schema version, in the Status field select the New or Under Development option.
See Also
Issuing and Posting a Structured Invoice
Sending Invoices to the National System of e-Invoices
Downloading Purchase Invoices from the National System of e-Invoices