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

Is there existing function to calculate Tax with the price include sales tax ?

(1) ShareShare
ReportReport
Posted on by 596
Hi guys,
 
 
 
If I want to calculate my sales order tax by code, is there an existing function in F&O to calculate it with considering the Price Include Sales Tax ?
 
I currently using the method in Tax class -> calcTaxAmount(), which is the code is like this :
 
static TaxAmountCur calcTaxAmount(TaxGroup               _taxGroup,
                                             TaxItemGroup           _taxItemGroup,
                                             TransDate              _taxDate,
                                             CurrencyCode           _sourceCurrencyCode,
                                             AmountCur              _baseAmountCur,
                                             TaxModuleType          _taxModuleType,
                                             TaxBase                _baseQty          = 0,
                                             UnitOfMeasureSymbol    _baseUnit         = '',
                                             ItemId                 _itemId           = '',
                                             TaxDirection           _taxDirection     = TaxDirection::OutgoingTax,
                                             GSTHSTTaxType_CA       _gsthstTaxType_CA = GSTHSTTaxType_CA::None)
    {
        Tax             tax = Tax::construct();
        TaxAmountCur    taxAmountCur;
        ;
        taxAmountCur = tax.taxCalcWithoutSource(_taxGroup,
                                                _taxItemGroup,
                                                _taxDate,
                                                _sourceCurrencyCode,
                                                _baseAmountCur,
                                                _taxModuleType,
                                                _baseQty,
                                                _baseUnit,
                                                _itemId,
                                                _taxDirection,
                                                _gsthstTaxType_CA);
        return taxAmountCur;
    }
 
If I'm not mistaken by reading this method, it does not have parameter to know that I have a condition that the price is Include Sales Tax.
Which mean if I'm giving the parameter value of the /_baseAmountCur/ of 100, and the TaxGroup and TaxItemGroup which is set to 8%, the result value will be 8, whereby the expected should be 7.41
 
How to get the correct result of my tax calculation ? Is there other existing method that I can use to calculate my sales order to get the correct tax amount ?
 
Thanks,
 
 
 
 
I have the same question (0)
  • Suggested answer
    Frank Hamelly | MVP, MCP, CSA Profile Picture
    46,625 Moderator on at
    Yes. 
     
  • Voltes Profile Picture
    596 on at
    Hi,
     
    I'm sorry, I meant through code. However I will take a look if there is something related to that Marginal Base, which up until I wrote this, I haven't found the said option used in Tax class.
     
    I will update if something there is something good.
     
    Thanks.

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... 583 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 378

#3
Diego Mancassola Profile Picture

Diego Mancassola 255

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans