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

Notifications

Announcements

No record found.

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 Super User 2025 Season 2 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

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
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans