web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

difference in calculations of the tax for the salesline

(0) ShareShare
ReportReport
Posted on by 1,230
Hi,
 
I'm trying to calculate tax for the sales line via code in order to get exactly the same value from the financials menu /salestax/ button on salestable form
 
 
//
 
 
I need to get the for this line 18.41. Under the hood class TAX os working to calculate this value and the value in the calculations is 18.406666666 which is rounded to 18.41 by the system.
 
I have found 2 ways to calculate tax for the line via code. they are described here
 
 
using both of them I get 18.4034 value which is rounded to 18.4 and I need 18.41 exactly as it is on the form after clicking sales tax button.  
 
Before diving into the very heavy code of the TAX class maybe there is something important I miss out?
 
Thanks.
I have the same question (0)
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    Before you delve into complex code, you can refer to this official document: Tax calculation rounding rules - Finance | Dynamics 365 | Microsoft Learn. It mentioned that the Rounding precision and Rounding method fields determine how calculated amounts in the payload from the tax calculation service are rounded. It also provides an example that shows how the amount 987.345 is rounded for different combinations of rounding precisions and rounding methods.
    Best regards,
    Kevin

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 681

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 446 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 202 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans