PurchTotals purchTotals; TaxPurch taxPurch; TmpTaxWorkTrans tmpTaxWorkTrans; VendInvoiceInfoTable vendInvoiceInfoTable; MarkupTrans markupTrans; // Invoice purchTotals = PurchTotals::newParmTable( vendInvoiceInfoTable, PurchUpdate::All, AccountOrder::None, vendInvoiceInfoTable.ParmId, '', vendInvoiceInfoTable.Ordering); purchTotals.calc(); taxPurch = purchTotals.tax(); // PO taxPurch = PurchTotals::getTax(purchTable); taxPurch.showTaxesSourceSingleLine(markupTrans.TableId, markupTrans.RecId, true); // markupTrans could be also PurchLine, VendInvoiceInfoLine tmpTaxWorkTrans = taxPurch.tmpTaxWorkTrans(); while select tmpTaxWorkTrans where tmpTaxWorkTrans.SourceRecId == markupTrans.RecId && tmpTaxWorkTrans.SourceTableId == markupTrans.TableId { info(strFmt("code: %1, amount %2", tmpTaxWorkTrans.TaxCode, tmpTaxWorkTrans.TaxAmount)); }
If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.
Buy Me a CoffeeNo comments. Be the first one to comment on this post.
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own "buy me a coffee" link.
Join us.