Scenario:- In this post we see how we can get salestax amount of a purchline from purchase order
code:-
PurchTable purchTable =PurchTable::find('00000400');
PurchTotals purchTotals = PurchTotals::newPurchTable(purchTable);
purchTotals.calc();
TmpTaxWorkTrans tmpTaxWorkTrans;
tmpTaxWorkTrans.setTmpData(purchTotals.tax().tmpTaxWorkTrans());
real salestax;
while select * from tmpTaxWorkTrans
where tmpTaxWorkTrans.SourceRecId == Pass Purchlinerecid
{
// Process the tax information for the specific line
salestax+=tmpTaxWorkTrans.TaxAmount;
}
info(strfmt("SalesTaxamount:-%1",salestax));
No comments:
Post a Comment