A library with Microsoft Dynamics AX, Microsoft Dynamics 365 FinOps and Supply Chain Management, Power Platform, Integrations, development and functional processes, tricks and trip, tutorials and much more....
Thursday, December 31, 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:
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
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 taxSales;SalesLine salesLine;salesTotals = SalesTotals::construct(SalesTable::find("SAOR000770"));salesTotals.calc();taxSales = salesTotals.tax();taxTmpWorkTransForm = TaxTmpWorkTransForm::construct();taxTmpWorkTransForm.parmTaxObject(taxSales);While select SalesLine where salesLine.SalesId == 'SAOR000770'{taxTmpWorkTransForm.updateTaxShowTaxesSourceSingleLine(tableNum(SalesLine), salesLine.RecId, true);info(strFmt('%1',taxTmpWorkTransForm.parmTaxAmountCurTotal()));}}
Subscribe to:
Posts (Atom)
How to enable new Microsoft teams - Public Preview!
New Microsoft Teams is just AWESOME, quick but useful post below shows how you have this preview feature to make your life EASY! Open Micr...
-
One of the features of the dual-write is initial sync where you copy data from the source app (Finance Operation OR DataVerse) to the target...
-
This post focuses on the integration technologies available to have the Microsoft Dynamics 365 Finance Operations data available in Datavers...
-
Scenario: There are times when you want to delete an entity from target entity list and when you do so, you face an error message which does...