Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A country-specific update for Spain: Dynamics 365 for operations integration with VAT management system based on Immediate Supply of Information (SII)


View products that this article applies to.

Introduction

According to the new legislation changes in Spain (Real Decreto 596/2016, de 2 de diciembre), a new VAT management system based on Immediate Provision of Information (SII system) allows a two-way, automated and instant relationship between the AEAT and a taxpayer. The SII system basically consists of the electronic delivery of the invoices so that, the different Registration Books will be configured, practically in real time. Almost all the companies in Spain will be obliged to send information on their invoices to AEAT since July 1st 2017A general deadline of four days for electronic remittance of information from the date of issuance of the invoice, or from its accounting registration (excluding Saturdays, Sundays and national holidays) is established. However, during the first half-year of the SII, taxpayers will have a period for sending information that will be eight days (also excluding Saturdays, Sundays and national holidays).

According to the new legislation changes it is required:

  • Maintenance of invoices register with additional statuses for export/import.
  • Required input formats generation in XML.
  • Additional setup for automatic files sending and receiving.
  • Sending generated XML file.
  • Receiving a response XML file and appropriate update of invoices that were sent.

To meet these new legislation requirements in Dynamics 365 for operation there was implemented a new functionality SII Register. This functionality is based on a new functionality Electronic messages and several GER configurations which can be achived on LCS. The Electronic messages functionality lets users to:

  • Set up specific web-service certificate that should be used to automatically transmit data directly to the Authority.
  • Set up additional parameters needed to automatically fill in the appropriate XML reports.
  • Maintain a register of invoices to support the process of transmission and re-transmission and receiving a response (GER configurations).
  • Automatically generate and send reports to the SII system in the format of the following schemas: Customer invoices, Vendor invoices, Intra-community invoices, Customer payments, Vendor payments (GER configurations).
  • Automatically receive and interpret responses from the SII system(GER configuration for the response).
  • Store and review all the transmitted and received XML reports.

 

↑ Back to the top


Overview

This document is a guidance for users of Dynamics 365 for operation.

This guidance describes how to set up and use Dynamics 365 for operation to interact with the SII system according with the new legal requirements.

The document includes two parts:

  • Settings
  • SII register overview.

The Settings part describes how Dynamics 365 for operation should be set up to let SII register work correctly.

The SII register overview part describes how to work with Dynamics 365 for operation to interact with the SII system (SII official website.).

 

↑ Back to the top


Settings

To install SII system integration for Dynamics 365 for operation it is necessary to complete the following steps:

  • Import GER configurations (model and format)
  • Import default setup (through data entities)
  • Define formats references
  • Setup executable class and batch
  • Set up internet address for SII system and certificates
  • Set up number sequence setup for Message numeration
  • Select parameter Inter-community
  • Set up user-defined parameters

 

Import GER configurations

To import GER configuration in Dynamics 365 for operation download SII configurations from Lifecycle Services (LCS). See the link below.

Download Electronic reporting configurations from Lifecycle Services

In the link Electronic reporting overview you may find description of electronic reporting.

After importing configuration check that Configuration provider is active.

1

Press Electronic parameters button and check that all fields on Attachment tab filled in with File value.

2

Import default setup (trough data entities)

You may find Data entities description under link:

https://docs.microsoft.com/en-us/dynamics365/operations/dev-itpro/data-entities/data-management-integration-data-entity

Data entities should be imported in the following sequence:

Order

Entity

Target entity

1

Electronic message item types

EMItemTypeEntity

2

Electronic message item statuses

ElectronicMessageItemStatus

3

Electronic message statuses

ElectronicMessageStatus

4

Message item additional fields

EMAdditionalFieldsEntity

5

Message item additional fields values

EMAdditionalFieldsValueEntity

6

Action class settings

EMActionClassEntity

7

Web service settings

EMWebServiceEntity

8

Electronic message action

EMActionEntity

9

Available statuses for action to change electronic messages

EMActionStatusFromEntity

10

Available statuses for action after change electronic messages

EMActionStatusToEntity

11

Electronic message processing

ElectronicMessageProcessing

12

Electronic processing actions

EMProcessingActionEntity

13

Additional fields for processing

EMProcessingAdditionalFieldsEntity

Define format and model references

Define format references in Tax > Setup > Electronic messages > Message processing actions for following actions:

3

Action

Name

Format/ Model

GenerateMessageCI

Generate message for Customer Invoices

SII Invoice Issued Format (ES)

GenerateMessageVI

Generate message for vendor Invoices

SII Invoice Received Format (ES)

GenerateMessageIC

Generate message for Intra-community

SII Intra-Community Format (ES)

GenerateMessageCP

Generate message for Customer payments

SII Customer Payment Format (ES)

GenerateMessageVP

Generate message for Vendor payments

SII Vendor Payment Format (ES)

Re-GenerateMessageCI

Generate message for Customer Invoices

SII Invoice Issued Format (ES)

Re-GenerateMessageVI

Generate message for vendor Invoices

SII Invoice Received Format (ES)

Re-GenerateMessageIC

Generate message for Intra-community

SII Intra-Community Format (ES)

ImportResponse

Import response from web service

SII Import Model (ES)

Setup executable class and batch parameters

Go to Tax > Setup> Electronic messages > Executable class setting

In the form Executable class settings select Executable class name EMCreateItemsController

4

Press Parameters button and press OK button in the form Add new electronic message items.

If it is necessary, change dates for every invoice date. Press Filter button and set up date for every document type.

This image shows you how to setup executable class and batch parameters.

Internet address for SII system and certificates set up

Go to Tax > Setup> Electronic messages > Web service settings

Insert internet address in the field Internet address for every document type:

7

To set up certificate fill in the following fields in the Certificate tab for Cust invoice, Vend invoice, Intra-community, Cust payment, Vend payment web services (the same for every Web service):

  • Key Vault URL
  • Key Vault client
  • Key Vault certificate thumbprint

Press Validate button

Number sequence setup for Message numeration

Go to Tax > Setup > Parameters > General ledger parameters, Number sequences tab

Set up Message number sequence.

8

Exclude negative Sales tax percentage from SII register

If in your AX company several types of tax are set up, you can include or exclude from SII register invoices with tax transactions Sales tax code of which is set up as “Negative tax percentage”. To do so, use General ledger > Setup > General ledger parameters > Ledger, field group Reporting, Negative sales tax percentage check box.

If Negative sales tax percentage check box not marked in General ledger parameters, then:

- invoices that have only tax transactions with Negative sales tax percentage will not be added into the SII register.

- only sales tax transactions which have Sales tax codes with unmarked Negative sales tax percentage will be include into the XML file.

9

Inter-community sales tax

Go to Accounts payable > Setup > Accounts payable parameters, Ledger and sales tax tab, Sales tax, and select field Intra-community VAT

Pre-configured setup

When importing Data entities, you receive some pre-configured settings which do not need in additional setup (you may change description only):

  • Message item types
  • Message item statuses
  • Message statuses
  • Electronic message processing

User-configured setup

User should set up additional fields, financial reasons and registration types for customers and vendors.

Message item additional fields

Go to Tax > Setup > Electronic messages > Message item additional fields

For all additional fields fill in all values which used in you company. values of additional fields should have All in Account type and Account code fields.

If you want different values are filled in automatically for specific customer/vendor or customer/vendor group or for all vendors/ customers use Account type and Account code (you may use Account type = Customer/Vendor and Account code = All/ Group/Table).

10

Registration types and registration categories

To generate correct XML reports, you need to set up correct tax identification for your Company and for all your customers and vendors. To make it possible you need to set up first additional Registration types and Registration categories. To do so, open Organization administration > Global address book> Registration types and Organization administration > Global address book> Registration categories.

The following new Registration types were added for Spain:

Name

Country

SII Code

Description

TAX ID (NIF)

ESP

02

Should be used for customers and vendors NIF

Passport (PASAPORTE)

ESP

03

Should be used for customers and vendors instead of NIF if NIF (TAX ID) is not registered for corresponding customer or vendor

Official identification document (DOCUMENTO OFICIAL DE IDENTIFICACIÓN EXPEDIDO POR EL PAIS O TERRITORIO DE RESIDENCIA)

ESP

04

Residence certificate (CERTIFICADO DE RESIDENCIA)

ESP

05

Other identification document (OTRO DOCUMENTO PROBATORIO)

ESP

06

Not registrated

ESP

07

For example, add a line like:

Customers and Vendors Registration IDs

To generate correctly all types of SII XML schemes you should set up Registrations IDs for:

  • Company NIF
  • All Customers
  • All Vendors

Company NIF

To setup your Company’s NIF open Organization administration > Organizations > Legal entity and set your Company’s NIF in Tax registration number field on Tax registration tab.

Customers registration IDs

To setup a Customer’s NIF open Accounts receivable > Customers > All customers, select a customer, open Invoice and delivery tab, click Edit, fill in the Tax exempt number field. OR press the button Customer/Registration/ Registration ID and fill in Registration ID.

When XML scheme generating NIF value (corresponded to the TAX ID) will be used first or if there is no NIF set up for a customer then the first one from the list of Registration IDs set up for the customer.

Vendors registration IDs

To setup a Vendor’s NIF open Accounts payable > Vendors > All vendors, select a vendor, open Invoice and delivery tab, click Edit, fill in the Tax exempt number field. OR press the button Customer/Registration/ Registration ID and fill in Registration ID.

When XML scheme generating NIF value (corresponded to the TAX ID) will be used first or if there is no NIF set up for a vendor then the first one from the list of Registration IDs set up for the vendor.

Financial reasons

According with the official SII documentation each (customers and vendors) invoice should be sent to the SII system with a mandatory indication of its type (TipoFactura tag). By default, for all the invoices this tag have the F1 value.

According with the official documentation SII system suppose that a (customers and vendors) invoice may be any type of corrections of a previously registered in SII invoice due to one of the following reasons (that are applicable to Dynamics 365 for operation):

TipoFactura

Description of a reason

R1

Corrected Invoice (Art 80.1 and 80.2 and error grounded in law)

R2

Corrected Invoice (Art. 80.3)

R3

Corrected Invoice (Art. 80.4)

R4

Corrected Invoice (Other)

Besides that, a Vendor invoice may have the following additional specific types that are applicable to Dynamics 365 for operation :

TipoFactura

Description of a type

F5

Imports (DUA)

F6

Other accounting support material

To meet this requirement for Spain an existing functionality of Financial reasons was extended for the following documents:

  • Sales order
  • Free text invoice
  • Purchase order
  • Projects
  • AP journal
  • GL general journal

Thus, when creating an invoice of different types of document where it is possible to create an invoice, user may set up a specific reason for an invoice. This reason will be transmitted with the invoice to the SII register. SII register functionality let user to change the reason manually if needed.

To set up Financial reasons, open:

  • Organization administration > Setup > Financial reasons

The Financial reasons was extended with two additional field:

  • Invoice type – to set up a specific code applicable for SII system
  • SII code description – to enter a description

11

If an invoice or a credit note does not correspond to a code (R1, R2, R3, R4, F5, F6) user may leave the field Reason as blank in an invoice. Then the invoice will be transmitted with TipoFactura equal to F1 or F2 (simplified invoice).

↑ Back to the top


SII register overview

Go to Tax > Inquiries and reports > Electronic messages > Electronic message items

This form contains electronic message items with different types Message item types (FacturasСliente, FacturasProveedores, OperacionesIntracomunitarias, PagosCliente, PagosProveedores) which may be in different statuses at the same time.

12

The message item status is changed when the system (Dynamics 365 for operation) is competing the one of operation:

  • GenerateRecords - generate electronic message items on posted invoices and payment settlements)
  • GenerateMessageCI, GenerateMessageVI, GenerateMessageIC, GenerateMessageCP, GenerateMessageVP – xml-file creation
  • SendMessageCI, SendMessageVI, SendMessageIC, SendMessageCP, SendMessageVP – submit of xml-file to SII system
  • Re-GenerateMessageCI, Re-GenerateMessageVI, Re-GenerateMessageIC, Re-GenerateMessageCP, Re-GenerateMessageVP – new electronic message generation after correction additional fields
  • ImportResponse – interpretation of SII system response

You may change electronic message item status manually if you want to submit it to SII system once more. It is possible to change message item status after completing ImportResponse operation (message item statuses are Correcto, AceptadoConErrores and Incorrecto.

If all operations are executed in batch and you want to submit message item once more, you should change status to Corregido (records in this status will not be submit to SII system), make changes in additional fields (for example, change value in ClaveRegimenEspecialOTrascendenciaAdiciona field) and change status to ResentirseDe, if the original status was Correcto or AceptadoConErrores) and to Creado, if the original status was Incorrecto.

Note. Pay attention, please, that the system change TipoComunicacion additional field value automatically to A1 when message item has Correcto/AceptadoConErrores value. And user can’t change this value manually. When TipoComunicacion=A1 SII system chages the existing record.

Buttons

  • Electronic message button

Press this button to overview log of all message statuses

13

Go to Log tab to overview all statuses changes

14

  • Original document button

Press this button to overview the invoice related with electronic message item.

SII register operation execution

You may execute all operations manually in the following steps:

1. GenerateRecords - generate electronic message items on posted invoices and payment settlements)

2. GenerateMessageCI/ GenerateMessageVI/ GenerateMessageIC/ GenerateMessageCP/ GenerateMessageVP

OR

Re-GenerateMessageCI/ Re-GenerateMessageVI/ Re-GenerateMessageIC/ Re-GenerateMessageCP/ Re-GenerateMessageVP – new electronic message generation after correction additional fields

3. SendMessageCI/ SendMessageVI/ SendMessageIC/ SendMessageCP/ SendMessageVP – submit of xml-file to SII system

4. ImportResponse – interpretation of SII system response

OR automatically in the batch.

To start batch, go to Tax > Setup > Electronic message processing.

  • Fill in recurrences parameters
  • and press the Create batch button

15

↑ Back to the top


Appendix

Algorithm of NIF and IDOtro block in xml files

If the Tax exempt number field is used for Customers and Vendors tax identification, you do not need to set up tax identification number in Registration IDs using Legislative tax. The algorithm of identifying tax identificatory for Customers and Vendors invoices in SII schemes is the following:

Customer/Vendor TAX ID identification algorithm

If “Tax exempt number” value from the invoice header (from invoice journal) is not empty -> IDNumber

If Customer/Vendor Country region type = “Domestic”:

Tag NIF = IDNumber

If Customer/Vendor Country region type = “EU”:

Tag NIF = blank

Tag IDOtro = { IDType= 04; ID = IDNumber }

If Customer/Vendor Country region type = “Third country/region”:

Tag NIF = blank

Tag IDOtro = { IDType= 04 for customer /vendor invoices and IDType= 02 for Intra-community documents; ID = IDNumber }

Otherwise (when “Tax exempt number” value from the invoice header is empty) -> Registration IDs algorithm (taking into account date effective of RegIDs)

Algorithm of TipoFactura filling in xml files

On Customers and Vendors invoices schemes generation the following invoice type identification algorithm is implemented:

For all invoices and credit notes if Financial Reason is empty then

If TAX IDNumber is not empty then Type = F1

Else (TAX IDNumber is empty) then Type = F2

If Financial Reason is not empty and value {R1, R2, R3, R4, R5} then

Type = corresponding value {R1, R2, R3, R4, R5},

If Type = {F2, R5} then <Contraparte> block of fields will not appear (excluded)

<TipoRectificativa>S</TipoRectificativa>

And Check if there is a reference on the initial document then

<sii:ImporteRectificacion>

<sii:BaseRectificada>From initial document.</sii:BaseRectificada>

<sii:CuotaRectificada> From initial document.</sii:CuotaRectificada>

</sii:ImporteRectificacion>

If there is no reference on initial document

<sii:ImporteRectificacion>

<sii:BaseRectificada>0</sii:BaseRectificada>

<sii:CuotaRectificada>0</sii:CuotaRectificada>

</sii:ImporteRectificacion>

If Financial Reason = {F5, F6} – then Type = {F5, F6}, but ImporteRectificacion will not be represented (as for F1)

If Financial Reason has other value not {F1, F2, R1, R2, R3, R4, R5, F5, F6} – it should be processed as F1

↑ Back to the top


Keywords: SPAIN SII

↑ Back to the top

Article Info
Article ID : 4033506
Revision : 51
Created on : 7/20/2017
Published on : 7/20/2017
Exists online : False
Views : 1540