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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Calculating Sales Discounts, Charges, Taxes for Partial Quantities in Custom Tables

(0) ShareShare
ReportReport
Posted on by 206
Hi community, 

I am working on a requirement where I have created custom tables to store sales order data (header and lines). A single sales order can be stored multiple times in these custom tables; therefore, the custom sales line table may contain quantities that are less than the corresponding quantities on the standard sales line table.

I need to calculate discounts, line amounts, charges, and taxes based on these partial quantities and then roll up the results to the custom header table. What would be the best approach to calculate discounts, line amounts, charges, and taxes for these quantities?

I have reviewed several options, such as using the SalesTotals class, Tax::calcTaxAmount() for calculating taxes by passing custom quantities and line amounts, and Markup::calcTrans() for calculating charges/markups. However, I am still unsure whether I am missing a simpler or more efficient approach that would ensure there are no calculation differences between my implementation and the OOTB logic, and that the results always match the standard system calculations.

Thank you for you kind response.  
I have the same question (0)

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 867 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 348 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans