web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 942
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
    difference in calculations of the tax for the salesline
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 734 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 636

#3
Martin Dráb Profile Picture

Martin Dráb 553 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans