To get Dynamics AX ready to work with SII you need to do the following setup:
- Install your Company’s SII certificate (non-AX side)
- Certificate purposes
- Certificate for SII in AX
- SII register services
- Legislative types (This setup is applicable for AX 2012 R2 and AX 2012 R3 only.)
- Customers and Vendors Registration IDs
- Customer special scheme codes
- Vendor special scheme codes
- Property locations
- Financial reasons
- Intra-Community transactions setup
- Exclude negative Sales tax percentage from SII register
Install your Company’s SII certificate (non-AX side)
To let Microsoft Dynamics AX automatically transmit files to SII system you should first install the SII certificate of your Company in the operation system of the machine (computer) from which you are going to transfer files.
To do so you may use the following instruction as an example:
Installing for the feature (e.g. example.p12 or .pfx)
1. Win+R, mmc, Enter
2. Ctrl+M, Certificates, Computer account, Local computer, Finish, OK
3. Personal, Certificates, right-click, Action >> All tasks >> Import
- Certificate Import Wizard opens
- Select the certificate file type and path (e.g. …\Kit Certificados 8.7.4\FNMT\ejemploPJ_ACTIVO.p12)
- Enter the password (see passwords.txt). Note: do NOT select "Mark this key as exportable…" unless you really mean to export it later.
- Place all certificates in the following store - Personal (default)
- Next, Finish
4 . Select newly added certificate ('000..0T PRUEBAS…'), Action >> All tasks >> Manage private keys
- Add 'NETWORK SERVICE' alias, grant it Full control
- OK
Installing for the manual collaboration with SII (or, for example, to manually test the certificate is OK) - same as above with small differences:
1. In 1.2 should be User account
2. 1.3.4 not needed
3. Test link: https://www7.aeat.es/PRE-Exteriores/Inicio/_menu_/SII___Suministro_Inmediato_de_Informacion/SII___Suministro_Inmediato_de_Informacion.html
4. Select the correct certificate
Certificate purposes
When you have managed to install the SII certificate of your Company on the machine, enter Microsoft Dynamics AX and set it up to work with SII register.
First, open Certificate purpose (General ledger > Setup > Certificate purpose) and add 2 records:
- "ES SII send", "SII reporing - sending"
- "ES eInvoice sign", "ES eInvoice signature creation"
Then, open Parameters (Accounts receivable > Setup > eInvoices > Electronic invoice parameters) and set up Certificate > Purpose to "ES eInvoice sign". This step doesn’t relate to SII register directly, but it is needed to let eInvoice functionally work correctly after the update.
SII certificate of your Company need to be set up in General ledger parameters of your AX company. To do so, open General ledger > Setup > General ledger parameters, find Reporting group on Ledger tab and set up SII certificate purpose to "ES SII send".
Certificate for SII in AX
To set up certificates that you previously installed in the operation system of the machine in AX, open General ledger > Setup > Certificates form. Certificates can be differentiated by their purpose (for eInvoice signature creation or for SII reporting authentication). Certificates without Purpose selected are assumed to be universal. Certificates can be assigned to a particular user or to the whole company. a. Certificates can be temporarily disactivated.
Example:
Purpose
|
Type
|
User
|
Operator name
|
Active
|
Certificate
|
ES eInvoice sign
|
Company
|
|
|
Yes
|
C1
|
ES SII send
|
Company
|
|
|
No
|
C2
|
ES SII send
|
Company
|
|
|
Yes
|
C3
|
ES SII send
|
User
|
JDoe
|
John Doe
|
Yes
|
C4
|
According to this example, all electronic invoicing for Spain will be signed with certificate C1, certificate C2 is not used (temporarily disactivated), SII reporting performed by John Doe will be performed using certificate C4 and the rest SII reporting will be performed using certificate C3.
SII register services
To let Microsoft Dynamics AX automatically send reports generated according to different XML schema types you need to set up SII register services. To do so, open General ledger > Setup > Sales tax > Spain > SII register services form and add lines:
Consult the official SII web site to get actual Internet address for sending appropriate types of schemes.
Legislative types
This setup is applicable for AX 2012 R2 and AX 2012 R3 only.
To generate correct XML reports you need to set up correct tax identification for your Company and all your customers and vendors. To make it possible you need to set up first additional Legislative types in AX. To do so, open General ledger > Setup > Sales tax > Legislative tax.
The following new Legislative 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
|
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
This setup is applicable for AX 2012 R2 and AX 2012 R3 only.
To setup your Company’s NIF open Organization administration > Setup > Organization > Legal entity and set your Company’s NIF in Tax registration number field on Tax registration tab.
Customers registration IDs
This setup is applicable for AX 2012 R2 and AX 2012 R3 only.
To setup a Customer’s NIF open Accounts receivable > Common > All customers, select a customer, open Address tab, select a primary address, click Edit, open Tax registration tab, add a line setting up Registration type equal to NIF (previously setup see Legislative types paragraph of this document) and set up Customer’s NIF in the Registration number field. You may setup another applicable to SII Registration type for a customer. On XML scheme generation AX will use NIF value (corresponded to the TAX ID) 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
This setup is applicable for AX 2012 R2 and AX 2012 R3 only.
To setup a Vendor’s NIF open Accounts payable > Common > All vendors, select a vendor, open Address tab, select a primary address, click Edit, open Tax registration tab, add a line setting up Registration type equal to NIF (previously setup see Legislative types paragraph of this document) and set up Vendor’s NIF in the Registration number field. You may setup another applicable to SII Registration type for a vendor. On XML scheme generation AX will use NIF value (corresponded to the TAX ID) 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.
Tax exempt number
If for Customers and Vendors tax identification in your AX company, the Tax exempt number field is used you do not need to set up tax identification number in Registration IDs using Legislative types. The algorithm of identifying tax identificatory for Customers and Vendors invoices in SII schemes is the following:
For AX 2009 SP1 and AX 2012 RTM the Customer/Vendor TAX identification algorithm works basing on Tax exempt number field only as Registration IDs functionality is not available.
Customer special scheme codes
To correctly generate XML schemas for customers invoices you should set up Customer special scheme codes. To do so, open General Ledger > Setup > Sales tax > Spain > SII Customer special scheme code. Add special scheme codes that are applicable for your company’s customers. According to this setup the values will be used as default values for customers invoices in SII register. The corresponding value will be taken on automatically creating of new invoice in the SII register. After a new invoice was added into the SII register, a user will be allowed to change the value manually for each invoice. You may set up a special scheme code for all customers, for group of customers or for a particular customer. The following values of Special scheme code or effect on invoices issued are applicable for SII system:
Value
|
Description
|
01
|
Operación de régimen general
|
02
|
Exportación.
|
03
|
Operaciones a las que se aplique el régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección.
|
04
|
Régimen especial del oro de inversión.
|
05
|
Régimen especial de las agencias de viajes.
|
06
|
Régimen especial grupo de entidades en IVA (Nivel Avanzado)
|
07
|
Régimen especial del criterio de caja.
|
08
|
Operaciones sujetas al IPSI / IGIC (Impuesto sobre la Producción, los Servicios y la Importación / Impuesto General Indirecto Canario).
|
09
|
Facturación de las prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena (D.A.4ª RD1619/2012)
|
10
|
Cobros por cuenta de terceros de honorarios profesionales o de derechos derivados de la propiedad industrial, de autor u otros por cuenta de sus socios, asociados o colegiados efectuados por sociedades, asociaciones, colegios profesionales u otras entidades que realicen estas funciones de cobro.
|
11
|
Operaciones de arrendamiento de local de negocio sujetas a retención
|
12
|
Operaciones de arrendamiento de local de negocio no sujetos a retención.
|
13
|
Operaciones de arrendamiento de local de negocio sujetas y no sujetas a retención.
|
14
|
Factura con IVA pendiente de devengo en certificaciones de obra cuyo destinatario sea una Administración Pública.
|
15
|
Factura con IVA pendiente de devengo en operaciones de tracto sucesivo.
|
16
|
Primer semestre 2017.
|
Vendor special scheme codes
To correctly generate XML schemas for vendor invoices you should set up Vendor special scheme codes. To do so, open General Ledger > Setup > Sales tax > Spain > SII Vendor special scheme code. Add special scheme codes that are applicable for your company’s vendors. According to this setup the values will be used as default values for vendor invoices in SII register. The corresponding value will be taken on automatically creating of new invoice in the SII register. After a new invoice was added into the SII register, a user will be allowed to change the value manually for each invoice. You may set up a special scheme code for all vendors, for group of vendors or for a particular vendor. The following values of Special scheme code or effect on invoices received are applicable for SII system:
Value
|
Description
|
01
|
Operación de régimen general.
|
02
|
Operaciones por las que los empresarios satisfacen compensaciones en las adquisiciones a personas acogidas al Régimen especial de la agricultura, ganaderia y pesca.
|
03
|
Operaciones a las que se aplique el régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección.
|
04
|
Régimen especial del oro de inversión.
|
05
|
Régimen especial de las agencias de viajes.
|
06
|
Régimen especial grupo de entidades en IVA (Nivel Avanzado).
|
07
|
Régimen especial del criterio de caja.
|
08
|
Operaciones sujetas al IPSI / IGIC (Impuesto sobre la Producción, los Servicios y la Importación / Impuesto General Indirecto Canario).
|
09
|
Adquisiciones intracomunitarias de bienes y prestaciones de servicios.
|
12
|
Operaciones de arrendamiento de local de negocio.
|
13
|
Factura correspondiente a una importación (informada sin asociar a un DUA).
|
14
|
Primer semestre 2017.
|
Property locations
For Customer invoices with Special scheme code (ClaveRegimenEspecialOTranscedencia) value equal to 13 or 14 or 15 the Property location should be setup. According to the official documentation the following Property location values are applicable:
Property location
|
Description
|
1
|
Property with a land register reference located in any part of Spain, with the exception of the Basque Country and Navarre
|
2
|
Property located in the Autonomous Community of the Basque Country or the Chartered Community of Navarre
|
3
|
Property in any of the foregoing locations with no land register reference
|
4
|
Property located abroad
|
To set up Property location, open General Ledger > Setup > Sales tax > Spain > SII Property location. Then the corresponding values will be available to set them up to the invoices in the SII register.
If no Property location value was set up to a customer invoice with Special scheme code equal to 13 or 14 or 15, then SituacionInmueble tag will be filled in with value “1” by default.
Financial reasons
According to 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 will have a value “F1”.
According to the official documentation SII system suppose that a (customers and vendors) invoice may be a kind of correction of a previously registered in SII invoice due to one of the following reasons (that are applicable to Microsoft Dynamics AX):
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 Microsoft Dynamics AX:
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, on invoice creation from all types of AX 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
- Accounts receivable > Setup > Customers > Customer reasons
- Accounts payable > Setup > Vendors > Vendor 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
If an invoice or a credit note does not correspond to a particular code (R1, R2, R3, R4, F5, F6) user may leave the field Reason on invoice black. Then the invoice will be transmitted with TipoFactura equal to F1 or F2 (simplified invoice). If a user fill in a Reason field on invoice or a credit note creation with another value (not equal R1, R2, R3, R4, F5, F6) invoice will be transmitted with TipoFactura equal to F1 or F2 (simplified invoice).
On Customers and Vendors invoices schemes generation the following invoice type identification algorithm is implemented:
Intra-Community transactions setup
To generate correctly XML report on Intra-community scheme, Intra-Community transactions setup should be done. According to the official SII documentation the following values are applicable:
Intra-Community transaction ID
|
Description
|
A
|
The transmission or receipt of goods to undertake partial reports or works stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992).
|
B
|
Transfers of goods or intra-Community acquisitions of goods listed in Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992).
|
To do Intra-Community transactions setup, open General Ledger > Setup > Sales tax > Spain > SII Intra-Community transactions setup form and add lines according to your company’s customers and vendors peculiarity. The values you set up will be used by AX on Intra-community scheme generation to fill in TipoOperacion tag. You may set up corresponding values for all, groups or particular Customers and Vendors.
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 > Reporting Negative sales tax percentage check box.
If Negative sales tax percentage check box not marked in General ledger parameters then :
- on Add records function invoices that have only tax transactions with Negative sales tax percentage will not be added into the SII register.
- on Send and Re-send function tax transactions by a Sales tax codes with unmarked Negative sales tax percentage will only be include into the XML report.