Sending Invoices to the National System of e-Invoices
Polish Localization for Business Central offers a functionality for sending structured invoices directly to the National System of e-Invoices. Document sending and invoice posting are asynchronous processes. When an invoice or credit memo to be sent to the National System of e-Invoices is posted in a standard way, a document is created in the form of an .xml file. The structured invoice is a file compliant with the schema provided by the Ministry of Finance.
To open a list of all documents sent to the National System of e-Invoices:
Choose the icon, enter NSeI Outgoing Documents, and then select a related link.
The NSeI Outgoing Documents page lists all outgoing documents sorted by the Document Date field value by default. The page contains all the necessary information about the imported document:
Source Document Type - Specifies the type of a source document. The following options are available:
- Sales Invoice,
- Sales Credit Memo,
- Prepayment Sales Invoice,
- Prepayment Sales Credit Memo,
- Service Invoice,
- Service Credit Memo.
Source Document No. - Specifies the number of the document posted in the Business Central.
Document Date - Specifies the date of the document posted within the system.
Status - Specifies the processing status of the document. A document sent to the NSeI can have the following statuses:
- New - the document has been posted in the system, but not sent to the NSeI.
- Sending In Process - the document has been sent to KSeF, but the session is in progress.
- Sent - the document has been sent to the NSeI.
- NSeI Document No. Received - Specifies that the document number that has been assigned in the National System of e-Invoices has been sent as a response and received. This means that the invoice has been received and registered in the National System of e-Invoices. Presently, this status is not supported. The NSeI document number is copied from the Official Receipt Certificate.
- Official Receipt Certificate Received - Specifies that the Official Receipt Certificate has been downloaded for the document. This means that the invoice has been accepted and registered in the National System of e-Invoices and the Official Receipt Certificate has been generated.
- NSeI Info Updated - Specifies that document data has been updated in Business Central based on the Official Receipt Certificate. This means that the NSeI document number and the date when the document was issued have been updated in linked entries and on the posted document.
Reference No. - Specifies the unique reference number that was from the National System of e-Invoices that identifies the interactive session that was run to send the document. It is a technical session number of the session.
Sending Date - Specifies the date and time of sending the document to the National System of e-Invoices from Business Central.
NSeI Document No - Specifies the NSeI document number that is unique and identifies the invoice in the National System of e-Invoices. It consists of the following elements: customer VAT Reg. No.-invoice date in YYYYMMDD date format-6-character technical element-6-character technical element-2-character control sum.
NSeI Receipt Date - Specifies the date when the NSeI document was processed that is also the actual date when the invoice was issued.
Element Reference No. - Specifies the reference number that was received from the National System of e-Invoices. It is a technical number that identifies a document in an interactive session.
Sending Documents to the National System of e-Invoices
To send a structured invoice to the National System of e-Invoices and process the document:
Choose the icon, enter NSeI Outgoing Documents, and then select a related link.
On the NSeI Outgoing Documents page, select the Job Queue 1 - Send to NSeI action. As a result, an interactive session will be initiated and all documents with the New status will be sent to the National System of e-Invoices. The status of the affected documents will be updated to Sending in Progress, and Sent. If the document is sent successfully, the National System of e-Invoices sends bank a session reference number and element reference number for each outgoing document.
Select the Job Queue 2 - Process session action to end active sessions. In the National System of e-Invoices, Official Receipt Certificates can only be obtained only for completed interactive sessions.
Select the Job Queue 3 - Process NSeI ORC action. As a result, an interactive session will be initiated and Business Central will attempt the Official Receipt Certificate (ORC) for completed interactive sessions, for which an ORC has not been downloaded yet. The time for generating the ORC is not specified and the process can take a longer time. If the Official Receipt Certificate is ready for downloading from the NSeI, it is saved as an .xml file in the Business Central database. Each ORC contains information about all invoices sent within an interactive session. The document status will be updated for each document for which the ORC has already been downloaded to Official Receipt Certificate Received, and the NSeI Document No and NSeI Document Receipt Date field values will be updated.
Choose the Job Queue 4 - Update NSeI Information action to update the data stored in Business Central for invoices processed in the National System of e-Invoices. For all documents that have the Official Receipt Certificate Received status, the information downloaded from the National System of e-Invoices will be updated in related entries and posted documents, including: NSeI Document No and NSeI Document Receipt Date. If the update is successful, the NSeI Info Updated status is set for all processed documents.
Note
All actions related to the processing of documents to be sent to the National System of e-Invoices can be configured by using a standard job queue. Job Queue 1 - Send to NSeI - codeunit ITI Send Document To NSeI, Job Queue 2 - Process Session - codeunit ITI Process NSeI Sessions, Job Queue 3 - Process NSeI ORC - codeunit ITI Process NSeI ORC, Job Queue 4 - Update NSeI Information - codeunit ITI NSeI Ledgers Update.
Structured Invoice Preview
To preview the structured invoice in tabular layout:
Choose the icon, enter NSeI Outgoing Documents, and then select a related link.
On the NSeI Outgoing Documents page select the document, and then select the Show NSeI Outgoing Document Lines action .
On the NSeI Invoice page, you can view the whole document that contains elements and element values in as a simplified view of the .xml file that is sent to the National System of e-Invoices.
To open a preview of an .xml file of the structured invoice:
Choose the icon, enter NSeI Outgoing Documents, and then select a related link.
On the NSeI Outgoing Documents page select a document, and then run the Show NSeI Outgoing Document XML File action.
The .xml file representing the structured invoice will be displayed in the browser. Save the file.
NSeI Official Receipt Certificate
The NSeI Official Receipt Certificate formally confirms that the documents sent electronically to the National System of e-Invoices have been received and processed. As part of the integration with the National System of e-Invoices, Polish Localization for Business Central also enables you to download the ORC for the documents that have been sent to the National System of e-Invoices.
To view the list of downloaded ORCs:
Choose the icon, enter NSeI ORC Register, and then select a related link.
The NSeI ORC Register page contains all Official Receipt Certificates downloaded from the National System of e-Invoices.
- Reference No. - Specifies the number assigned in the National System of e-Invoices that identifies the interactive session the ORC refers to.
- Status - Specifies the status of processing the Official Receipt Certificate in Business Central. The processing status can have the following values:
- New - the Official Receipt Certificate has been downloaded from the National System of e-Invoices, but has not been processed.
- Processed - the Official Receipt Certificate has been received and its data has been updated for the documents within an interactive session. The processing of the Official Receipt Certificate results in the update of the NSeI Document No. and NSeI Document Receipt Date fields on the NSeI Outgoing Documents page for all invoices sent within the related interactive session.
- To download the .xml file for the Official Receipt Certificate, choose the Get ORC in XML action.
Interactive Sessions
Sessions and interactive interfaces provide tools for communication, quick sending and search of invoices and easy access to invoices. Interactive sessions have been implemented within Polish Localization within the integration into Business Central with the National System of e-Invoices. To view the list of interactive sessions that have been established between the National System of e-Invoices and Business Central:
Choose the icon, enter NSeI Sessions, and then select a related link.
The NSeI Sessions page lists all sessions that have been established so far from Business Central. Each column provides detailed information:
- Initialization Date - Specifies the date and time when the interactive session was established between Business Central and the National System of e-Invoices.
- Last Activity Date - Specifies the date and time of the last activity within the session.
- Session Type - Specifies whether the session was initiated for sending invoices or downloading purchase invoices. The field can contain one of the two optional values:
- Sending,
- Receiving.
- Reference No. - Specifies a unique session number assigned in the National System of e-Invoices for an interactive session. The reference number is used to verify the session status, the status of the document sent or the Official Receipt Certificate downloaded within a session.
- Status - Specifies the session status:
- Initiated - the session has been initiated.
- Active - the session is active, i.e. the NSeI receives or shares documents within a given session.
- Closed - the session is closed, which means that you can no longer send or receive purchase documents within the session. The Official Receipt Certificate can be downloaded only for closed sessions.
- Official Receipt Certificate Received - structured invoices have been sent and the Official Receipt Certificate has been received within the session.
- To end the interactive session, run the Job Queue 2 - Process Session action.
Note
There can be multiple active sessions at a given time, but perfectly all sessions should have the Closed or Official Receipt Certificate Received.
See Also
Setting up Integration with the National System of e-Invoices
Issuing and Posting a Structured Invoice
Downloading Purchase Invoices from the National System of e-Invoices