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.

Changes in XSD schema of Lithuanian SAF-T-file for 2018 in Microsoft Dynamics AX


View products that this article applies to.

Introduction

The changes in XSD schema of SAF-T file for 2018 reporting (XSD 2.0) are provided. Data for 2018 year and further can be provided only via XSD 2.0 version.

↑ Back to the top


Legislation changes

On the 28th of December 2017, Lithuanian tax authority has released new decree VA-127/2017-12-28. This decree represents the new version 2.0 of SAF-T file XSD schema.The old XSD schema 1.1. is valid for the 2017 data submission and the new XSD schema 2.0 is valid for the year 2017 and later periods.

There are no changes in business processes. Changes affect XSD shema and the way SAF-T file can be formed.

Lithuanian tax authority provided guidelines what information each part should include as well as additional information, how parts should be generated and numbered. All these changes will be described in details in chapters 4 and 5.

The relevant information can be found: https://www.vmi.lt/cms/saf-t

See the KB for the version 1. here https://support.microsoft.com/authoring/article/3207942?locale=en

↑ Back to the top


Example of address types setup

In some cases, the reporting data should be transformed in a uniform way throughout the whole report (or multiple reports), especially to support data that does not exist in Microsoft Dynamics AX.

The Report should display Address Type codes according to the XSD file approved by Lithuanian tax authority instead of AX types. At least because Address type in AX contains much more values than XSD allows.

It is implemented in a separate XSLT AifOutboundPortReportSAFT_LT.xslt. Please find the example below:

  1. Edit the XSLT file AifOutboundPortReportSAFT_LT.xslt (any text editor – from Notepad to Visual Studio)

    1. See the "Add replacement pattern(s)" area; it contains replacement patterns (one or multiple) (in the example - one pattern called AddressTypeSAFT); pattern is a list of replacement pairs "from - to"; hope the semantics is quite self-explanatory.

      <ReplacementPattern name="AddressTypeSAFT">

           <Replace>

               <From></From>

              <To>KT</To>

           </Replace>

           <Replace>

              <From>Business</From>

              <To>BA</To>

           </Replace>

           <Replace>

              <From>Korespondencijos adresas</From>

              <To>KA</To>

           </Replace>

           <Replace>

              <From>Sąskaitos išrašymo adresas</From>

              <To>SIA</To>

           </Replace>

           <Replace>

              <From>Registracijos adresas</From>

              <To>RA</To>

           </Replace>

           <Replace>

              <From>Prekės išsiuntimo adresas</From>

              <To>PIA</To>

           </Replace>

           <Replace>

              <From>Prekės pristatymo adresas</From>

              <To>PPA</To>

           </Replace>

        </ReplacementPattern>

    2. Edit (add/remove) replacement rules (and patterns, if more than one is needed).

    3. Edit (add/remove) replacement rules (and patterns, if more than one is needed).See the "Add XPath(s) to transform here" area; here XPath(s) that should be updated should be listed with what replacement pattern should be applied to each.

      <xsl:template match="//SAFT:AddressType">

      <xsl:call-template name="Replace">

      <xsl:with-param name="ReplacementPattern" select="'AddressTypeSAFT'"/>

      <xsl:with-param name="IfFromNotFoundUseOriginal" select="false()"/> </xsl:call-template>
      </
      xsl:template>

    4. By default, if the replacement pattern does not contain the applicable rule, the tag will be fulfilled with the value "KT". In the example above, Address type "Business”"will be replaced by "BA". To replace all non-set up types with blank values, use the parameter IfFromNotFoundUseOriginal set to "false()" (<xsl:with-param name = "IfFromNotFoundUseOriginal" select="false()"/>).

    2. Save the XSLT. 

    3. Note If multiple replacements are needed, multiple patterns can be created in one XSLT.

↑ Back to the top


Business scenario

Scenario steps:

  1. User runs "SAF-T data export" function.

  2. On the request form user:

    1. Selects from – to date (year/month/day);

    2. Selects one of the types of the SAF-T file (F/ GL/ PS/ SI/ PI/ PA/ AS);

    3. Fills number of parts (by default 1 should be filled);

    4. Fills part number (by default 1 should be filled);

    5. Selects entity, for which the SAF-t file will be generated;

    6. Selects the route where the created XML file will be saved.

  3. XML is created.

  4. A created XML file is reported to the tax authority by uploading the file to SAF-T application.

↑ Back to the top


Hotfix information

How to obtain the Microsoft Dynamics AX updates

The updates are 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
  • Microsoft Dynamics AX 2012 R2
  • Microsoft Dynamics AX 2009 SP1

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.

↑ Back to the top


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.

↑ Back to the top


Keywords: kbexpertiseinter, kbexpertisebeginner, kbexpertiseadvance, kbmbsquickpub, kbsurveynew, kbmbspartner, kbnoloc, kbmbsmigrate, XSD schema of Lithuanian SAF-T-file, kbqfe

↑ Back to the top

Article Info
Article ID : 4095529
Revision : 15
Created on : 4/25/2018
Published on : 4/25/2018
Exists online : False
Views : 333