static void calcSalesTax(Args _args)
{
SalesTable salesTable;
SalesTotals salesTotals;
container c;
SalesLine salesLine;
Amount amount;
// tax of salesline
salesLine = salesLine::findRecId(33561334351);
amount = Tax::calcTaxAmount(salesLine.TaxGroup,
salesLine.TaxItemGroup,
systemDateGet(), // inventtrans.datastatus may be fitable
salesLine.CurrencyCode,
salesLine.LineAmount,//inventtrans.datastatus
TaxModuleType::Sales);
info(strFmt("%1", Amount));
// tax of salestable
salesTable = SalesTable::find("500010272");
salesTotals = SalesTotals::construct(salesTable, SalesUpdate::All);
salesTotals.calc();
c = salesTotals.displayFieldsCurrency(salesTotals.currencyCode());
amount = conPeek(c,TradeTotals::posTaxTotal());
info(strFmt("%1", Amount));
}
{
SalesTable salesTable;
SalesTotals salesTotals;
container c;
SalesLine salesLine;
Amount amount;
// tax of salesline
salesLine = salesLine::findRecId(33561334351);
amount = Tax::calcTaxAmount(salesLine.TaxGroup,
salesLine.TaxItemGroup,
systemDateGet(), // inventtrans.datastatus may be fitable
salesLine.CurrencyCode,
salesLine.LineAmount,//inventtrans.datastatus
TaxModuleType::Sales);
info(strFmt("%1", Amount));
// tax of salestable
salesTable = SalesTable::find("500010272");
salesTotals = SalesTotals::construct(salesTable, SalesUpdate::All);
salesTotals.calc();
c = salesTotals.displayFieldsCurrency(salesTotals.currencyCode());
amount = conPeek(c,TradeTotals::posTaxTotal());
info(strFmt("%1", Amount));
}