Code to Tax adjustment for Ledger Journal in MSD axapta

This is a Code to Tax adjustment for Ledger Journal in axapta You can try this code in Job in AOT. I hope it can help you to get class and method details for tax adjustment.



LedgerJOurnalTrans LJTrans;

TaxLedgerJournalCalculate taxLedgerJournalCalculate;

TaxLedgerJournal taxLedgerJournal;

TaxRegulation TaxReg;

;
ttsbegin;

select firstonly LJTrans  where LJTrans.JournalNum == "000787_j";

taxLedgerJournal = TaxLedgerJournal::construct(TaxJournalCall::Journal, LJTrans, null);

TaxReg = new TaxRegulation();

taxLedgerJournal.calcAndPost();

TaxReg.setTax(taxLedgerJournal);

TaxReg.createSumsFromTmp();

TaxReg.allocateAmount(7.8);

TaxReg.saveTaxRegulation();