Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Polish VAT report

(0) ShareShare
ReportReport
Posted on by 25

I have a customer with Dynamics AX 2012 R2 CU7 that wants to use the SAF reports for Poland. We have setup and configured everything according to the Microsoft documentation around this. We have also installed the necessary localizations hotfixes needed. We have setup the AIF-ports which used XSL-files for transformation for all the SAF reports for Poland but we have trouble with the output for the report called "SAF VAT sales and purchase register (Poland)". The problem is in the XML report for XML element K_45.

The values in the xml file in element K_45 will be incorrect when using the XSL-file on the AIF-port. We get NaN values for K_45.

  1.  All rows in TaxInCostPrice values are filled in in an array. 
  2. An index keeps track of the array that contains all TaxInCostPrice values.
  3. For the K_45 element there is a test if the array exists.
  4. Then the value in K_45 is calculated according to the following formula:

<K_45>
     <xsl:choose>
           <xsl:when test="$TaxInCostPrice">
                  <xsl:value-of select="format-number($K_45 * ($K_46 div ($K_46 + $TaxInCostPrice[$Count])),'########0.00')"/>
           </xsl:when>
           <xsl:otherwise>
                  <xsl:value-of select="format-number($K_45,'########0.00')"/>
           </xsl:otherwise>
     </xsl:choose>
</K_45>

The problem with NaN occurs when the variable Count is counted> 5 and the program tries to pick things that are not available. It occurs after

five managed lines, the first five lines will have value and on the sixth section and forward it will be NaN.

There isn´t always a value in the field TaxInCostPrice on the lines in the table TaxTrans.

How can we make the field K_45 to display the right values in the XML report?  

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans