Skip to main content

Posts

Showing posts from December, 2015

Sales quotation GST through X++

X++ code to achieve this; static void SalesTax_Per_SalesQuotation(Args _args) {     SalesQuotationTable     salesQuotationTable;     SalesQuotationTotals    salesQuotationTotals;     container                cont;         salesQuotationTotals = SalesQuotationTotals::construct(SalesQuotationTable::find( "QUOT000022" ));     salesQuotationTotals.calc();     cont         = salesQuotationTotals.displayFieldsCurrency(salesQuotationTotals.currencyCode());     info( strFmt ( "Sales quotation total GST: %1" , conpeek (cont, TradeTotals::posTaxTotal()))); }

GST/TAX at sales order and sales line level through X++

Sales order GST : Total GST of Sales order can be seen from following screen in AX 2012 X++ code to achieve this; static   void  SalesTax_Per_SalesOrder(Args _args) {     TaxTmpWorkTransForm     taxTmpWorkTransForm;     SalesTotals             salesTotals;     TaxSales                taxSales;     SalesLine               salesLine;      container                cont;     salesTotals = SalesTotals::construct(SalesTable::find( "SAOR000770" ));     salesTotals.calc();     cont         = salesTotals.displayFieldsCurrency(salesTotals.currencyCode());     info( strFmt ( "Sales order total GST: %1" ,  conpeek (cont, TradeTotals::posTaxTotal()))); } X++ code to achieve this; This code will print GST against each sales line for selected/passed sales order static   void  SalesTax_Per_SalesLine(Args _args) {     TaxTmpWorkTransForm     taxTmpWorkTransForm;     SalesTotals             salesTotals;     TaxSales                ta