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, ...
Unanswered

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

(3) ShareShare
ReportReport
Posted on by 214
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 (1)
  • Arif Hussain Profile Picture
    214 on at

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 399

#3
Adis Profile Picture

Adis 251 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans