static void VKTaxRegulation(Args _args) { PurchTotals purchTotals; TaxPurch taxPurch; VendInvoiceInfoTable vendInvoiceInfoTable; MarkupTrans commonLine; //VendInvoiceInfoLine commonLine; TaxRegulation taxRegulation; select firstOnly vendInvoiceInfoTable where vendInvoiceInfoTable.Num == "VKTest10"; purchTotals = PurchTotals::newParmTable( vendInvoiceInfoTable, PurchUpdate::All, AccountOrder::None, vendInvoiceInfoTable.ParmId, '', vendInvoiceInfoTable.Ordering); purchTotals.calc(); taxPurch = purchTotals.tax(); select commonLine where commonLine.RecId == 5637172328; taxRegulation = TaxRegulation::newTaxRegulation( taxPurch, null, commonLine.TableId, commonLine.RecId ); taxRegulation.allocateAmount(22); taxRegulation.saveTaxRegulation(); info('done'); }
static void VKTaxRegulationPO(Args _args) { PurchTable purchTable; PurchLine purchLine; TaxRegulation taxRegulation; purchTable = PurchTable::find('VK-001113'); purchLine = PurchLine::find('VK-001113'); taxRegulation = TaxRegulation::newTaxRegulation( PurchTotals::getTax(purchTable), null, tableNum(PurchLine), purchLine.RecId ); if(taxRegulation) { taxRegulation.allocateAmount(12); taxRegulation.saveTaxRegulation(); } }
\Classes\SysCountryRegionCode\isLegalEntityInConsolidatedCountryRegion
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 AdSense units.
Join us.