04.03.2019, 17:11 | #1 |
Участник
|
a33ik: Get tax codes for charge line/purchase order line/invoice line
Источник: http://daxonline.org/1642-get-tax-co...oice-line.html
============== X++ to go through tax codes: 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)); } Источник: http://daxonline.org/1642-get-tax-co...oice-line.html |
|
|
|