GST Calculation for SalesOrder in Dyanmics Ax 2012


Description :If we customize Sales Invoice and Free Tax Invoice report for AX2012, we may need to get sales tax information. But how to get it. They are quite several ways to get it, and it depends only type of document you print also.

If you need to calculate tax using AX SalesTotals or PurchTotals class.

static void GSTTaxForsalesOrder(Args _args)
{
    TaxTmpWorkTransForm     taxTmpWorkTransForm;
    SalesTotals             salesTotals;
    TaxSales                taxSales;
    SalesLine               salesLine;
    container               cont;
    salesTotals = SalesTotals::construct(SalesTable::find("YourSalesOrderId"));
    salesTotals.calc();
    cont         = salesTotals.displayFieldsCurrency(salesTotals.currencyCode());
    info(strFmt("Sales order total GST: %1", conpeek(cont, TradeTotals::posTaxTotal()))); 
}

Related Posts

Previous
Next Post »

2 comments

comments
Anonymous
January 11, 2021 at 3:31:00 PM GMT+5:30 delete

Thanks for sharing. Reach Vakilsearch site to know about gst invoice format

Reply
avatar

Thanks for comments.....