Electronic Invoicing (Serbia) - NPSBeograd/NPS-Support GitHub Wiki
🔶 Overview
NPS Electronic Invoicing Microsoft Dynamics 365 Business Central
In accordance with electronic invoicing the direct communication with the System of Electronic Invoices (Serbian: SEF) is enabled through invoice exchanges between companies (both public and private).
Sending of sales invoices and receiving of purchase invoices is both done through official Web services that are provided by the Tax Administration. The prerequisite for application of this method of communication is that the company must be registered on the SEF portal based on a certificate held by an authorized person who has the ability to apply for a tax return.
After registering on the SEF portal, it is necessary to setup system settings (Microsoft Dynamics 365 Business Central) according to the steps further explained in this manual. Also, this instruction includes the steps to be followed in operational work with documents.
Types of documents to be either received or sent are:
• Invoice or prepayment invoices
• Finance charge memo
• Credit memo or correction of prepayment invoices
• Final invoice (after prepayment invoice)
Feature | Description | Release |
---|---|---|
Settings | Settings for further use of E-invoices | 20.5 |
Work with documents | Process of creating sales invoices, prepayment invoices, purchase invoice, credit memo. | 20.5 |
Other functions | Batch invoices sending and automatic get sales invoices status. | 21.0 |
Individual and Summary VAT | Individual and Summary VAT records are an integral part of the Electronic Invoicing System and are used for recording sales invoices that were not sent as E-Invoices. | 22.0 |
Electronic records of previous VAT | This system enables the submission of data on previous VAT through the Electronic Invoicing System. | 24.0 |
🔶 Settings
1. Obtaining of API key
After registering on the E-fakture portal you need to select the "API management" section from the “Settings” menu.
Once the new page opens you need to toggle the “Active” button and copy the autogenerated password from the “Authentication key” field into the “API Key” field in the E-Fakture service settings within 365 Business Centre.
After the settings have been adjusted, the user does not have to log into the E-Fakture portal in order to send an invoice since they will be able to regularly create and post documents through Business Central as usual. Logging into the E-Fakture portal is only necessary if there arises a need for more detailed document checks or changes to the settings.
2. Service Connections
After the API key is obtained it is necessary to enter said API key into further settings in Business Central. By entering the Service Connections search you are to select EIN e-Invoice setup.
A new page for entering the API key will appear. If the API key is entered incorrectly, the system will display an error.
After selecting it a new page for setting URL addresses opens and the entry is made by clicking the Set URLs to Default, and subsequently by confirming the Enabled function via the toggle button.
In the same setting, in the Treasury section, fill in the data essential for integration with the treasury. In the Treasury section, enables us to send created invoices to the central register of invoices. The fields should be filled in as shown in the picture. The Fields are filled in by clicking on Set URLs to Default.
- KJS Usergroup : guests
- KJS Username: guests
- KJS Password: guests
- KJS Types for Sending in CIR: 0,1,2,4,5,6,9,10,11 – KJS is entered, which will be sent to the Central Register of Invoices. Every customer who has a defined KJS number on their card will be sent to the Central Register of Invoices.
3. Get Units of Measure
To ensure standardization of unit codes, the SEF portal defines the possible units of measure that will be used when creating invoices. To enable document exchange between NAV/BC and SEF, it is necessary to standardize the units of measure in the Units of Measure table. These can be got from the E-Invoice Settings page -> Actions -> SEF -> Get Units of Measure.
When you access the Units of Measure table, you will see all the get units of measure with the International Standard Code.
4. Electronic Documents Formats
To access the formats, you need to set the following: Type the keyword Company Information in the search bar and set the user experience to premium. The following image represents the tab page that will open after the search.
For the purposes of automatic sending of invoices during posting, it is necessary to set up profiles for sending on each individual customer's card, explained below. In order to create a profile for sending documents, you first must create an electronic document format. In the quick search find Electronic Documents Formats and create a sales invoice and sales approval format as follows.
Enter the format code and select the sales invoice/sales approval and the corresponding object ID, as shown on picture below (For code unit IDs - NPSEIN Generate File, and for delivery code unit IDs - NPSEIN Integration)
Note: It is mandatory that both invoice and approval have the same code in order to be linked with a sending profile.
The next step is creation of Document Sending Profiles. In the search bar type Document Sending Profiles and create a new profile by clicking the “New” button.
Assign a code to it and choose Document Exchange Service and a format that was previously created in Electronic Document formats, as shown on picture below. By default, the check mark signals that the sending profile will be incorporated for all customers, unless a different sending profile is set in the customer card itself.
Afterwards, in the general section of the customer card, in the sending documents profile field select the created E-Fakture profile.
All customers’ cards whose profile is set up in this way can send e-invoices during posting by selecting the Post and Send option. If this setting is not set, sending can be done in one of the following two ways:
- From the list of posted invoices (in the quick search, type posted sales invoices to get a list) it is necessary to mark the invoice on the list, as shown in picture.
- From the very posted document itself (the posted document is opened by clicking the invoice number from the posted invoices list), as seen in the picture below
In both of these cases, sending is always initiated from the Actions -> Electronic Invoicing -> Send Sales Invoice
5. VAT Posting Setup
On the VAT posting setup, each combination of VAT posting that is used for invoicing should be marked with a corresponding letter in the "Tax category" field. In the search, type VAT Posting Setup, select the VAT Business Post. Group and add the tax category on the VAT posting setup tab itself, as in the picture.
According to the current Tax Administration instructions, VAT categorize are defined in the following manner
Based on the previously listed categories, the settings should be set so that 20% VAT can indicate the letter "S", exemption from VAT can be indicated by the letter combination "AE", etc.
6. VAT Product Posting Groups
In the case of a sales invoice with a line of 0% VAT, it is mandatory that the code of the article of the law according to which the right to calculate VAT of 0% is acquired is entered in the description of the product posting group for VAT on the group used when posting invoices with 0% VAT. The code must be entered in the exact format mandated by the Ministry of Finance.
In the search type VAT Product Posting Groups, find your code for exempt VAT calculation on the list and change the description as shown in the picture.
After this setting, you move on to the setting of posting for VAT, where the corresponding tax category is entered (from the previous chapter). It is necessary to set a category for the VAT Posting Business group (in the example it is KDOM) and the VAT Prod. Posting Group (in the example it is OSLPDV). Shown below.
7. EU country/region code
As the working principle of E-Fakture is based on the exchange of data that is in accordance with the European exchange system, the country codes must also be defined according to precisely mandated standards. Until now, the encryption standards of the countries were not taken into account, so the existing codes cannot be changed. In the search, type the country/region because a new setting is required in the fields:
• EU country/region code - Since the exchange of invoices is done only with domestic customers, this field must be filled in only for the country of Serbia, so the abbreviation in this field should be "RS".
• VAT scheme - Also, for Serbia, fill in "9948".
If the exchange of invoices is extended to other countries, the same setting must be made for each new country.
8. Customer Card – Public companies
If we work with clients who are public companies (they have a JBKJS number - a unique number of users’ of public funds), it is necessary to fill in their cards with JBKJS number as well as the PIB number. JBKJS is transferred over from the Treasury Administration portal into the JBKJS field in the customer's card.
All customers who have a KJS Type defined on their card will be sent to the Central Register of Invoices.
🔶 Work with documents
🔹 Purchase
1. Get Purchase Invoice
In order to get electronic invoices from the portal, we enter Purchase e-Invoices in the search box, then select Electronic Invoicing -> Get purchase invoice from the Actions tab.
After confirming we want to get invoices from the portal, a new window pops up offering us the option to choose which invoice we want to download.
If we want to download an individual invoice, then we enter the ID which is found on the portal in the designated field. The ID for the individual purchase invoice can be copied from the URL, as seen in the picture.
Once the download is done, you get a confirmation that the download was successful, as shown in the picture
When we open the downloaded invoice (2x click on the invoice) in order to accept it we start the process of posting the purchase invoice. In addition to accepting, we also have the option of rejecting incoming invoices on the same page.
After accepting it, we will receive a confirmation message, as shown in the picture
2. Create incoming document
After the invoices have been downloaded from the portal, we create the incoming document from the same page where we confirmed the accepting of the invoice by clicking on the function Related -> Incoming document -> View document, as shown in the picture.
Once the window opens, we get a document for posting by clicking the record.
After entering the lines, we can post the document.
🔹 Sales
The process of creating sales invoices is done in a standardized procedure by entering sales invoices in the search bar and creating your new sales invoice for the respective customer. For the purposes of sending the data specification together with the sales invoice/order document, it is necessary to define the tax liability method field. The tax liability method field is located in the output document in the electronic invoicing section. The field gives us following options to choose from: trade date, issue date, payment date.
The standard value is set to "trade date" which means that the invoice will be submitted to the portal in the tax period with the date the document is posted in the system.
After filling in both the header and invoice lines, by clicking on “Post and Send” the invoice is posted and sent to the E-Fakture portal.
If the sending of invoice is successful, after posting, l the system will provide information about the document being successfully sent.
If the posted sales invoice we intended to send over to the E-Fakture portal is rejected during sending the system will report an error, depending on what the error is.
In the same (posted) document, located in the electronic invoicing section, there are fields showing the sending status and the code under which the invoice was registered on the E-Fakture portal.
The E-Invoice error text field - shows the description of the error if the invoice was not successfully sent
The E-Invoice status - Shows the eInvoice statuses on the E-Fakture portal (Sent, Cancelled, Rejected, Approved...)
🔹 Get invoice status
Once the invoice is sent to E-Fakture, the first status of the invoice reads "Sending". When the customer either approves or rejects the invoice, this document gets a new status on the portal, but this does not mean that the status of the invoice in Business Central will change at the same time. The status of the invoice can be updated by clicking the "Get invoice status" command in the posted document. On the action tab, select Electronic Invoicing, followed by Get Invoice Status.
If we want to get the status of several issued invoices, we can do so from the list of posted invoices by selecting several invoices from the list, also on the action card, as shown below.
After getting the status, the system will confirm that the processing is completed as shown in the picture.
If our customer is a public company, both PIB and JBKJS numbers are sent from the customer’s card, on the basis of which SEF will then make the transfer to SUF (Serbian: SUF - Invoice management system).
🔹 Credit memo
This type of document is created in the same way as a sales invoice. The only difference is that the document must be marked as a “Debit Document Type” by toggling the "Debit document type" button in the sales invoice’s electronic invoicing section as shown in the picture.
We always select the invoice related to the charge memo, the invoice whose value should be increased by the amount of the Charge memo. When we marked that it is Debit Document Type, we must select Source Invoice No. or to enter a date (period, month, day) in the Date Period field.
The further steps of filling out and posting the document are identical to regular invoices.
🔹 Prepayment invoices
When it comes to working with the prepayment invoices given to the customers, it is necessary to set the tax category in the VAT Posting Setup field, as shown in the picture. Enter the VAT posting setup in the search section and when you find a line with the customer VAT Bus Posting Group (in the example, KDOM) as well as the VAT Product Posting Group (in the example A10 and A20), in the Tax Category, it is necessary to enter category S.
The process of creating a prepayment invoice remains unchanged. The header of the document as well as the lines with the amount of VAT are filled out. The E-Fakture portal will recognize that a payment invoice is being sent as the document is marked as “prepayment” in the part where the payment is linked to the prepayment invoice. When creating a prepayment invoice and before sending the invoice itself, it is necessary to set the Tax Liability Method in the electronic invoicing section. When it comes to the prepayment invoice, the payment date is selected, as shown in the picture.
🔹 Credit memo
The creation of a credit memo also remains unchanged. If the memo is created by copying the sales invoice, in the credit memo header, the field called "Applies-to Doc. No” is filled out with the invoice number to be reversed/accepted. The same number that is filled in Applies-to Doc. No will be filled in independently in the Electronic Invoicing section in the Source Invoice No field.
Date Period - enter the date or previous (months). Date Period will be filled in if we do not have filled in Source Invoice No. When we have the Invoice Source field filled in, we don't need to fill in the Date Period field.
After filling in the header and rows, the memo can be posted further and then sent to the E-Fakture portal.
In order to successfully create a credit memo, it is necessary that the account we want to reverse is in the accepted status accepted by our customer. When the account has the status approved, then it is possible to make a correction, i.e. reduction or desk account.
🔶 Other functions
🔹 Send Sales Invoices
Sending a number of invoices simultaneously is possible from the list of Posted sales invoices. It is necessary to select the desired invoices and select the Send sales invoices option located on the Actions tab in the Electronic invoicing section.
🔹 Get Purchase Invoice on Date
Downloading a number of invoices simultaneously is possible from the E-invoices Purchase list. Select the option Get Purchase Invoices on Date, which is located on the Actions tab in the E-invoices section. Invoices are always downloaded for the past day, or you can choose from - to (from some day to yesterday). The date filter always excludes today when it is Get Purchase Invoices.
🔹 Job Queue Entries
For automatic download, you need to setup up a Create Job Queue entries that downloads the statuses from the portal at a certain time. In the search, type Service Connections -> E-invoice setup -> Actions -> Job queue -> Create Job Queue entries, as shown in the picture.
In the Job Queue Entries card, for the “Start Time” field fill in when the action will be launched for the first time during the day and the “End Time” after which the action will not be launched. In the “No. Of Minutes between runs” field, enter the idle time between the two action starts. After the “Job Queue” has been created, click the “Get Status to Ready” option which finishes the setup, as shown in the picture.
🔶 Individual and Summary VAT
In the e-invoice settings, the following URL addresses are retrieved via the API key:
• Post Single VAT Path: api/v2/publicApi/vat-recording/individual
• Post Summary VAT Path: api/v2/publicApi/vat-recording/group
• Cancel Single VAT Path: api/v2/publicApi/vat-recording/individual/cancel/%1
• Cancel Summary VAT Path: api/v2/publicApi/vat-recording/group/cancel/%1
• Summary VAT Records No. Series: Specify the No. Series to be used for Summary VAT Records
🔹 VAT Books
In addition to the obligation to issue electronic invoices, electronic invoices also require the electronic recording of VAT in the electronic invoice system. Summary and Individual VAT Records are an integral part of SEF and are used for recording outgoing invoices that were not sent as an e-invoice. To proceed, search for VAT Books, and within that page, open VAT Books for the purpose of sending individual and summary VAT records.
• Individual VAT Record – Sales
• Individual VAT Record – Purchase - Transaction
• Individual VAT Record – Purchase - Advance Payment
• Individual VAT Record – Purchase - Increase
• Individual VAT Record – Purchase - Decrease
• Summary VAT Record
For individual records and basic transactions, fill in the tag name with 1, for advances use 2, for increase documents use 3, and for decrease documents use 4. Then, in the VAT Registration Type column, select whether it is an individual or summary record.
🔹 Column Name Setup
To adjustment, in the Column Name Settings section, it is necessary to fill in the Tag Name. Below is a list of tags that should be configured for each VAT book in the case of individual and summary records.
• Individual VAT Record – Sales
• Individual VAT Record – Other Books
• Summary VAT Record
🔹 VAT Book Groups
In the VAT book group settings section, changes have been made to the configuration of the individual record – Basic Transactions. In this record, it is necessary to add the tag name in the form of a three-digit number prescribed by the technical documentation. Additionally, within the summary record, changes have been made to the book groups, so it is now necessary to create new groups according to the list provided below.
• Individual VAT Record – Sales
• Individual VAT Record – Other Books
• Summary VAT Record
🔹 VAT Book Group Identifiers
For each VAT book group, it is necessary to configure which identifiers belong to that group. For each identifier, the description field must be filled in.
🔹 Vat Book Setup
For each book, group, and identifier, it is necessary to configure which amount from the VAT items is sent to which field in the records.
🔹 Credit Memo - Individual VAT
If you want to cancel an invoice that should not appear in the individual VAT record, whether it's a sales or purchase invoice, you need to use the Cancel function on the posted invoice.
-
The Cancel function posts a credit memo that is recorded in the VAT entries. However, neither the cancelled invoice nor the credit memo used to cancel it will be included in the individual VAT record, so the transaction will not be reflected there.
-
If you want the credit memo to appear in the individual VAT record, use the Create Corrective Credit Memo function. This function cancels the document and ensures the entry is sent to the individual VAT record.
🔹 Debit memo - Individual VAT
If you have a debit memo related to your individual VAT record, you need to mark which invoice it refers to. On the purchase invoice, use the Source Invoice No. field to link the debit memo to the related invoice. Click the three dots to open a list of invoices and select the correct one.
VAT Book Overview for Individual Records.
- Invoice that was sent
- Debit memo that increases the sent invoice
🔹 Sending Individual and Summary Records
The sending is done from the VAT Review.
For each book, it is necessary to run the VAT overview for a specific period, verify the amounts, and select the action to Send VAT Records.
🔹 ID of Individual and Summary Records
After the records are submitted, each submitted record receives its unique record identifier on the portal, which is visible in the VAT entries.
Image from the E-Invoice Portal
VAT Entries – Single
VAT Entries – Summary
The ID can also be viewed from the VAT books. By clicking on the amount in the row, you will access the VAT overview.
🔹 Cancel VAT Records
If we wish to cancel a VAT item that was sent through individual or summary records, the cancellation is performed from the VAT Items list. In the VAT Items list, in the "ID" column for individual and summary VAT records, the ID generated from the e-Invoice portal is entered. This field provides information about which items were sent via individual and summary records. To perform the cancellation, it is necessary to first select one or more rows. After selection, by clicking on the Cancel VAT Record option (either individual or summary), the ID field will be cleared. The ID will no longer be present.
🔹 Assign ID to VAT Ledger Entries
When you perform a manual entry on the E Fakture porta - whether it involves individual, summary, or previous tax credit records - the ID will not be automatically transferred to the VAT entries. To address this, a dedicated feature has been developed Set Single, Summary or Previous VAT ID which enables manual entry of the ID directly onto the VAT entries.
Upon initiating the action, a page will be displayed where the required ID (individual, summary or Previous VAT ID) may be entered based on either the Entry No. or the Document No.
🔶 Electronic records of previous VAT
To the Previous VAT Record (EEPP), new VAT books are created according to the groups and columns listed below. Before sending the EEPP, it is necessary to configure the appropriate URL addresses:
• Send Previous Tax Rec. Path record DEMO: https://demoppppdv.mfin.gov.rs/
• Previous Tax Rec. Base URL PRODUCTION: https://ppppdv.mfin.gov.rs/
• Send Previous Tax Rec. Path: api/v1/public-api/vat-deduction-record
🔹 VAT Books - previous VAT
When creating new books, in addition to the Code and Description, it is necessary to enter the Tag Name and the VAT Record Type. Below is the table for the configuration.
🔹 Column Name Setup - previous VAT
The following text outlines which columns should be filled with the tag for each book.
🔹 VAT Book Group - previous VAT
It is necessary to add the tag name prescribed by the technical documentation to this record. The following text lists each VAT book group for each VAT book.
🔹 Send previous Vat records
To send this record, a command Send Previous VAT Record has been added. By clicking on this option, a new page opens where you need to enter the date range, the VAT period option, and if necessary, check the option to create only the file (JSON). If the file is not exported, by clicking OK, the record is sent directly to SEF via the API service.
The date filter is mandatory, as well as approving the period as shown in the image.
It is possible to export the file by checking the checkbox, and by clicking OK, the file will be exported.
🔹 Sent VAT Entries
After the records are submitted, each submitted record receives its unique record identifier on the portal, which is visible in the VAT entries.