Introduction
According to Legislative Decree no. 127/2015, art. 1 and Decree Law 78/2010, art. 21, all companies in Italy must transmit electronically in XML format, the Purchases and Sales Invoices Communication (DATIFATTURA) on a quarterly basis.
According to the new legislation changes, it is required:
-
Maintenance of invoices register with additional statuses for export.
-
Generation of required formats in XML.
To meet these new legislation changes requirements in Microsoft Dynamics AX, there was implemented an Invoices communication register functionality. This functionality lets users to:
-
Set up specific queries to determine which tax transactions should be included into report.
-
Set up additional Number sequence needed to automatically fill in the appropriate XML reports.
-
Maintain a register of invoices to support the process of exporting, re-exporting and cancelation of the Customers and Vendors invoices.
-
Automatically generate XML reports of the following schemes: sending Customer invoices, sending Vendor invoices, cancelation of the previously registered invoices and re-sending in case of correction, if it’s worth mentioning.
-
Store and review all the generated XML reports.
Additionally, to meet the reports requirements, AX functionality for Italy was extended with the following functions:
-
Domestic and EU Reverse charge operations.
-
Credit invoice functionality.
-
New Address Purposes to report different address for a head company and stable organization of a counterparty.
-
Exempt reasons differentiation to support “ExemptArt.15” and “Other exempt” transactions.
-
Tax representative type of a relationship in a Global address book to report different address for a tax representative of a not Italian counterparty.
Overview
This document is a guidance for users of Microsoft Dynamics AX 2012 R3.
This guidance describes how to set up and use Microsoft Dynamics AX Invoices communication register functionality.
The document includes two parts:
-
Setup
-
Invoices communication register functionality.
The Setup part describes how Microsoft Dynamics AX should be set up to let Invoices communication register functionality work correctly and generate correct XML reports.
The Invoices communication register functionality part describes how to work with it.
Setup
To get Dynamics AX ready to work with Invoices communication register functionality, you need to do the following setup:
-
Number sequence in General ledger parameters
-
Invoices communication setup
-
Company address purposes
-
Counterparties’ address purposes and Tax representative
-
Domestic and EU Reverse charge
-
Sales tax Exempt reason
Number sequence in General ledger parameters
To automatically generate the correct number of the report, that should be used in the file name and as the report identifier in the report <ProgressivoInvio> tag, open General ledger > Setup > General ledger parameters, select Number sequences tab, find line for Invoice communication XML ID and set up a number sequence for it.
The same number will be used in the names of generated XML files. Thus, the setup of the number sequence should meet the requirements to the names of the files.
Examples:
ITAAABBB99T99X999W_DF_00001.xml
IT99999999999_DF_00002.xml
If length of a number generated from the number, sequence will be more than 5 symbols, only 5 right symbols will be used.
Invoices communication
To setup Invoices communication, use the form General ledger > Setup > Sales tax > External > Periodic VAT communication. Select Invoices communication in Communication type field.
Add at least four lines in Field setup table to set up queries for:
-
Customers invoices tax base
-
Customers invoices tax amount
-
Vendors invoices tax base
-
Vendors invoices tax amount
You may need to set up more than four lines in case you should calculate some specific values separately and then summarize them.
Field setup table description:
Field name |
Description |
Field ID |
Enter Field ID to determine query that should be used for:
|
Description |
Add a text description of the tag. |
Format |
Only Numeric value is applicable for this type of report. |
Calculation |
Select one of the following values:
|
Tax |
If Calculation is set to Tax transaction, select one of the following values: Tax base – for tags that should represent a tax base amount. Tax amount – for tags that should represent a tax amount. |
Sign |
Set “1” if the value should be represented as is. Set “-1” if the value should be inversed. |
Sales tax charge |
Select this checkbox when Calculation = Tax transaction and Tax = Tax amount, if you suppose that, the calculated tax amount should be reduced on the calculated nondeductible tax amount. |
Company address purposes
Generally, when the Company is an Italian company, no additional setup is need. According to the official requirements to the Purchase and sales invoices communication, there are three different cases which should be reflected in the report:
-
Italian Company
-
Foreign company with Stable organization in Italy
-
Foreign company with Tax representative in Italy
According to these requirements, the following tags in the report should be filled in:
Tags \ Company type |
Italian Company |
Foreign company with Stable organization in Italy |
Foreign company with Tax representative in Italy |
2.1.2.4 <Sede> 3.1.2.4 <Sede> |
From Legal Entity primary address |
From Legal Entity address with Purpose = “Head company” |
N/A |
2.1.2.5 <StabileOrganizzazione> 3.1.2.5 <StabileOrganizzazione> |
blank |
From Legal Entity primary address with Purpose = “Stable organization” (this is an information about location of the Stable organization in Italy of the Original Company which is foreign) |
N/A |
2.1.2.6 <RappresentanteFiscale> 3.1.2.6 <RappresentanteFiscale> |
blank |
blank |
N/A |
! NOTE: To make new Address Purposes and Relationship types available, the following job must be run:
static void initNewLocationRolesAndRelationshipTypes(Args _args)
{
DirDataPopulation::insertLogisticsLocationRoles();
DirDataPopulation::insertDirRelationshipTypes();
}
Counterparties’ address purposes and Tax representative
Generally, when a Counterparty (Customer or Vendor) of the Company is an Italian company, no additional setup is needed. According to the official requirements to the Purchase and sales invoices communication, there are three different cases which should be reflected in the report:
-
Italian Company
-
Foreign company with Stable organization in Italy
-
Foreign company with Tax representative in Italy
According to this requirement the following tags in the report should be filled in:
Tags \ Counterparty type |
Italian Counterparty |
Foreign Counterparty with Stable organization in Italy |
Foreign Counterparty with Tax representative in Italy |
2.1.2.4 <Sede> 3.1.2.4 <Sede> |
From Customer \ Vendor primary address |
From Customer \ Vendor address with Purpose = “Head company” |
From Customer \ Vendor primary address |
2.1.2.5 <StabileOrganizzazione> 3.1.2.5 <StabileOrganizzazione> |
blank |
From Customer \ Vendor address with Purpose = “Stable organization” |
blank |
2.1.2.6 <RappresentanteFiscale> 3.1.2.6 <RappresentanteFiscale> |
blank |
blank |
A Party with relation type = “Tax representative” from Global address book |
If a Counterparty (Vendor or Customer) is a Foreign Counterparty with Tax representative in Italy, and a Tax representative should be set up, the following setup should be done:
1. Open Home > Common > Global address book
2. Create new Party (it can be an organization or a person)
3. Fill in Name with company or a person name, Organization number – will be used for <IdCodice> tag, and add an address – ISO code will be used as ISO code of a Tax representative of a Counterparty.
4. On Relationships tab add a line fill in fields:
Field name |
Field description |
ID |
Tax representative (select from the list) |
Party A |
Created (on the top of the form) Party |
Relationship A to B |
Tax representative of (filled in automatically) |
Party B |
Customer or Vendor for which you are setting up the Tax representative |
! NOTE: To make new Address Purposes and Relationship types available, the following job must be run:
static void initNewLocationRolesAndRelationshipTypes(Args _args)
{
DirDataPopulation::insertLogisticsLocationRoles();
DirDataPopulation::insertDirRelationshipTypes();
}
Domestic and EU Reverse charge
To identify tax transactions which should be reported as Reverse charge with a value “N6” in the <Natura> tag, Sales tax group table was extended with the Reverse charge field. To use this extension, open General ledger > Sales tax > Setup > Sales tax groups, select a sales tax group which will be used for sales tax codes for Reverse charge transactions and mark Reverse charge check box for the Sales tax code.
On posting Sales tax transactions, Reverse charge value should be transmitted to Sales Tax transaction table from Sales tax group.
! NOTE: For the previously created data (first half year 2017), Sales tax transactions which should be reported as Reverse charge, the related field should be updated in the data base before report generation. To do so, a job, according to the following template, must be run (you may need to add some additional criteria like dates or particular Sales tax codes):
static void setReverseChargeInOldTaxTransactions(Args _args)
{
TaxGroupData taxGroupData;
TaxTrans taxTrans;
while select taxGroupData
where taxGroupData.ReverseCharge == NoYes::Yes
{
update_recordSet taxTrans
setting ReverseCharge = NoYes::Yes
where taxTrans.TaxGroup == taxGroupData.TaxGroup
&& taxTrans.TaxCode == taxGroupData.TaxCode
&& taxTrans.ReverseCharge == NoYes::No;
}
info('Update finished');
}
Sales tax Exempt reasons
To identify tax transactions which should be reported with different exemption reason (ExemptArt.15, Other exempt) and reflected correspondingly as different values (“N1”, “N4”) of the <Natura> tag, Exempt reason table was extended with a new Exempt reason field.
To generate correctly Purchase and Sales invoices communication XML report, update Sales tax exempt codes table with values in Exempt reason field. You don’t need to update other tables.
Algorithm of <NATURA> tag identification
Review the algorithm to of <NATURA> tag identification to check the setup:
***
For all the Customers and Vendors invoices:
If SalesTaxTransaction.ReverseCharge = 'Yes' --> N6
Else if TaxType = 'Standard' --> no tag
Else if TaxCountryRegionType = 'EU' --> N7
Else if TaxType = 'NotSubjectToVAT' --> N2
Else if TaxType = 'Zero' --> N3
Else if TaxType = 'Exempt'
If SalesTaxTransaction.ExemptReason = 'ExemptArt.15' --> N1
Else --> N4
Otherwise --> N3
***
Where “TaxType” is VAT type field on Sales tax codes > Calculation:
“TaxCountryRegionType” is Country/region type field on Sales tax codes > Report setup:
Invoices communication register functionality
To work with Invoices communication register functionality in Microsoft Dynamics AX, use General Ledger > Reports > External > Invoices communication register.
The following functions can be done in the SII register:
-
Add records
-
Export (Preview, Export)
-
Re-export
-
Cancel
-
Review communications
-
Invoice journal
Fields description:
Field name |
Field description |
Type |
Identifies type of scheme, the related invoice should be included. This field can be filled in automatically only on adding an invoice to the register, and can have the following values:
|
Status |
The field reflects the actual status of the invoice in correspondence with the Type of scheme. This field have the following values:
|
Account number |
Account number of a Customer or Vendor corresponding to the Type of scheme. This field can be filled in automatically only on adding an invoice to the register. |
Invoice number |
Invoice number of a Customer or Vendor invoice corresponding to the Type of scheme. This field can be filled in automatically only on adding an invoice to the register. |
Invoice date |
Invoice date. This field can be filled in automatically only on adding an invoice to the register. |
Initial report number |
It is unique identifier of a report in which an invoice was included and exported initially. Initial report number identified according to the Number sequence set up for Invoice communication XML ID in General ledger > Setup > General ledger parameters. |
Reporting position |
This is the sequential number of the invoices in the initial report. This number should be used in case of re-export or cancelation of the invoices in the Authority data base. |
Document type |
This field indicates the invoice type. The following values are applicable for Purchase and sales invoice communication according to the official documentation:
The value of the Document type field related to the invoice is identified automatically on adding invoices to the register according to the algorithm in the Pic.1. TD07 and TD08 values cannot be automatically identified by the system, but user can manually set up these values in the register. |
Last communication date |
The date and time when the last communication to the invoice was created. |
Special reporting regime |
Use this check box to mark a vendor invoice as customs declaration. When an invoice is marked, it will be reported in a specific way: <IdPaese>OO</IdPaese> <IdCodice>99999999999</IdCodice> |
Pic.1 “TipoDocumento” identification algorithm.
To let AX differs TD01 (Ordinary invoice) and TD05 document types, the invoice should be created using Credit invoicing functionality. This functionality let user to set up a reference to an initial invoice establishing the relationship between an initial invoice and created or debit note. See the screenshots below to find this functionality:
1. From General ledger > Journals > General journal:
2. From Accounts receivable > Free text invoices > AllFree text invoices:
3. From Accounts receivable > Sales orders > All Sales orders:
4. From Accounts payable > Journals > Invoices > Invoice journal:
5. From Accounts payable > Purchase orders > All Purchase orders:
Add records
Use this function to automatically update Invoices communication register by adding in it new invoices. To do so, click Add records button on the Menu of the Invoices communication register form and select date in From date field from which the invoices should be added to the register. If there are some invoices date of which are in the future, these invoices will be added to the Invoices communication register as well.
Use Ctrl+F3 to set up filters on Invoices communication register form.
Use Ctrl+G to set up filters on columns of register.
Add records function works for all types of invoices at the same time:
-
Customer invoices
-
Vendor invoices
Export
Use Export function when you want to create an XML report.
To do so, click Export > Export button on the form’s Menu. Select predefined in the Periodic VAT communication setup for Invoices communication report type queries. Use Select button to set up query according to which the XML report will be generated. For example, if you want to send a particular invoice, you can add a line to the Rang grid, select in Field column Invoice and in the Criteria column particular invoice number.
Fields description:
Field name |
Field description |
Customer invoices tax base |
Select predefined query for Customer invoices tax base in the Periodic VAT communication setup. |
Customer invoices tax amount |
Select predefined query for Customer invoices tax amount in the Periodic VAT communication setup. |
Vendor invoices tax base |
Select predefined query for Vendor invoices tax base in the Periodic VAT communication setup. |
Vendor invoices tax amount |
Select predefined query for Vendor invoices tax amount in the Periodic VAT communication setup. |
Sender fiscal code |
Fill in Sender fiscal code if needed. Corresponding value will be reflected in 1.2.1 <CodiceFiscale> tag. |
Sender position code |
Fill in Sender position code if needed. Corresponding value will be reflected in 1.2.2 <Carica> tag. |
Directory |
Select directory where generated reports should be saved. |
Click OK button on the dialog form to let AX generate XML report according to criteria set up.
You can set up Invoices communication register to work in batch regime. To do so, use Batch tab on Update register data form.
Export button includes two buttons:
-
Preview
-
Export
Preview function works as Export but without updating data in data base, creating files only. Instead of report number from Sequence number, a combination of Date and Time of file creation is used. Nevertheless, if an invoice was not included into report, its status will be changed to Dismissed, included invoices’ statuses will remain Created.
Re-export
Invoices that were already exported and have Status equal to Exported can be re-exported to Authority data base. To do so, use Re-export button on the Invoices communication registerMenu.
The dialog form of the Re-export function has the similar options as Export function, but according to the official documentation re-export should be done for just one invoice.
Fields description:
Field name |
Field description |
Customer invoices tax base |
Select predefined query for Customer invoices tax base in the Periodic VAT communication setup. |
Customer invoices tax amount |
Select predefined query for Customer invoices tax amount in the Periodic VAT communication setup. |
Vendor invoices tax base |
Select predefined query for Vendor invoices tax base in the Periodic VAT communication setup. |
Vendor invoices tax amount |
Select predefined query for Vendor invoices tax amount in the Periodic VAT communication setup. |
Sender fiscal code |
Fill in Sender fiscal code if needed. Corresponding value will be reflected in 1.2.1 <CodiceFiscale> tag. |
Sender position code |
Fill in Sender position code if needed. Corresponding value will be reflected in 1.2.2 <Carica> tag. |
Directory |
Select directory where generated reports should be saved. |
External report number |
Fill in the number (in the Authority system) of the initial report which you are going to update. This number is not stored in AX. The value filled in will be reported in 4.1 <IdFile> tag. |
Cancel
Invoices that were already sent and have Status equal to Exported can be canceled from the Authority data base. To do so, use Cancel function. This function should be done in two steps:
-
Create file to cancel register (Pending cancel) - When an invoice was previously successfully exported and has Status Exported, it can be canceled using function Cancel > Create file to cancel register. Then its status updates to Pending cancel.
-
Change status to Cancelled (Cancelled) - When an invoice was added to an XML file for cancelation, it has Status Pending cancel, and it was successfully deleted from the Authority's data base, it can be marked as Cancelled, by using function Cancel > Change status to Cancelled.
Fields description:
Field name |
Field description |
Initial report number |
Select an initial report number which you are going to cancel. It is an internal AX report number. |
Invoice |
Select an invoice number which you are going to cancel. Leave blank if you need to cancel a whole report. |
Sender fiscal code |
Fill in Sender fiscal code if needed. Corresponding value will be reflected in 1.2.1 <CodiceFiscale> tag. |
Sender position code |
Fill in Sender position code if needed. Corresponding value will be reflected in 1.2.2 <Carica> tag. |
Directory |
Select directory where generated reports should be saved. |
External report number |
Fill in the number (in the Authority system) of the initial report which you are going to cancel. This number is not stored in AX. The value filled in will be reported in 4.1 <IdFile> tag. |
Status
If an invoice in the on Invoices communication register is in status Created, user can manually change the status to Excluded to optimize queries and work with the register. To do so, use Status > Excluded button. An Excluded invoice status can be manually changed to Created with the same button Status > Created.
Invoices in Excluded status are not processed by any of the abovementioned functions.
Review communications
AX stores all the generated XML reports. You can review all the XML files correspondent to the selected invoice. To do so, click Review communications button on the Menu.
Review communications form fields description:
Field name |
Field description |
Status |
Reflects the status of each of communications with SII. May have the following values:
|
Created date and time |
Reflects the date and time when the corresponding XML report was created. |
Request |
The tab shows the XML report that was sent to the SII system |
Invoice journal
Use this function to open Invoice journal for the selected invoice.
Hotfix information
How to obtain the Microsoft Dynamics AX updates files
This update is available for manual download and installation from the Microsoft Download Center.
Prerequisites
You must have one of the following products installed to apply this hotfix:
-
Microsoft Dynamics AX 2012 R3
Restart requirement
You must restart the Application Object Server (AOS) service after you apply the hotfix.
If you are encountering an issue downloading, installing this hotfix, or have other technical support questions, contact your partner or, if enrolled in a support plan directly with Microsoft, you can contact technical support for Microsoft Dynamics and create a new support request. To do this, visit the following Microsoft website:
https://mbs.microsoft.com/support/newstart.aspx
You can also contact technical support for Microsoft Dynamics by phone using these links for country specific phone numbers. To do this, visit one of the following Microsoft websites:
Partners
https://mbs.microsoft.com/partnersource/resources/support/supportinformation/Global+Support+Contacts
Customers
https://mbs.microsoft.com/customersource/northamerica/help/help/contactus
In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to any additional support questions and issues that do not qualify for the specific update in question.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained here in is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.