Downloading Purchase Invoices from the National System of e-Invoices
Polish Localization for Business Central provides a set of features for downloading structured purchase invoices from the National System of e-Invoice. The downloading process consists of two steps. In the first step, a list of purchase invoices available in the National System of e-Invoices for a business unit is downloaded. In the second step, using the NSeI document number, you can search for and download an .xml file that contains a specific structured invoice to the database.
Viewing the List of Downloaded Invoices and Invoices to be Downloaded
To see the list of invoices that have been downloaded from the National System of e-Invoices, choose the icon, enter NSeI Incoming Documents, and then select a related link.
The NSeI Incoming Documents page contains all documents downloaded from the National System of e-Invoices, sorted based on the NSeI Receipt Date field by default. The page contains all the necessary information about the imported document:
- NSeI Receipt Date - Specifies the date when the document was processed in the NSeI. The value represents the date of issuing the invoice in the National System of e-Invoices.
- NSEI Document No. - Specifies the number of the NSeI document. This is a unique number that identifies the invoice in the National System of e-Invoices.
- Subject by - Specifies the VAT registration number of the company that issued the purchase invoice.
- Status - Specifies the status of document processing:
- To Download - the invoice file has not been downloaded from the NSeI;
- Downloaded - the XML file has been downloaded from the NSeI and saved in the Business Central database.
- File Size - Specifies the size of the .xml invoice file downloaded from the NSeI. The value in this field is displayed only after downloading the file from the National System of e-Invoices.
- To check in the National System of e-Invoices, whether any new purchase invoices are available for downloading, select the Send Incoming Document Request for Dates action. The query to the National System of e-Invoices is always sent for a date range. As a response, Business Central receives a list of purchase invoices available in the National System of e-Invoices for the company with the specified VAT Registration No. The received data is saved on the NSeI Incoming Documents page.
Note
If the incoming document list is empty, a request is created for the default date range that is: 01.01.2022 up to the today’s date. If there are already incoming documents in the list, a request for new invoices is created for the date range, based on the latest invoice date specified in the NSeI Receipt Date field minus 1 day to the current day field.
Downloading Documents from the NSeI
To download the .xml file that has not been downloaded (Status - To Download) for the specified incoming document, select the Download NSeI Incoming Document action. As a result, the .xml document will be downloaded from the National System of e-Invoices and saved into the database. The Status field is also updated and set to Downloaded.
To export the .xml file (and save it to a disk drive) for the incoming document, select the Export NSeI Incoming Document to XML File action. You can run an action only for documents that have the Downloaded status.
By running the Job Queue - Get Incoming Document, action, you can download all incoming documents from the National System of e-Invoices in one step. The function first downloads a list of all available invoices (as in the case of the Send Incoming Document Request for Dates action), and then automatically downloads an .xml file for each invoice in the list.
Note
The Job Queue - Get Incoming Document action can be set up on the basis of a standard job queue (Job Queue - Get Incoming Document - codeunit ITIGetIncomingDocFromNSeI).
NSeI Document Number on Purchase Documents
The NSeI Document No. field has been added to purchase documents. During the posting process, it is copied to the posted document and to VAT entries. The setup in the Disable NSeI for Purchase on purchase documents and Enable NSeF for Purchase Documents fields on the Gov. Reporting Setup page determines whether you should fill in the NSeI Document No. filed or not. If the Enable NSeI for Purchase Documents field is not selected, do not fill in the NSeI Document No. field on purchase documents. The situation is similar if the Disable KSeF for Purchase has been selected on the purchase document. The application also validates the NSeI Document No. field. The system checks whether theNSeI Document No. field is filled in on the purchase document, the document with this number has been downloaded from the NSeI, i.e. whether it is listed on the NSeI Incoming Documents page. In addition, the validation feature prevents posting more than one purchase document with a given NSeI document number.
See Also
Setting up Integration with the National System of e-Invoices