Tuesday 24 October 2006

Dynamics Ax 4 Bug in Tax Calculation in Ledger Intercompany Accounting

Using std Axapta 4.0 with accounts not done incl. Tax.

That is in Ledger Parameters / Tab Tax untick the include VAT and in the Ledger Journals do the same either at header or setup levels.

Then create an intercompany link between two companies, with the appropriate setup.

Add a line that posts an amount with a TaxGroup and a TaxItemGroup that gives a VAT rate.

The system when checking the journal will find no error, and when you try to post will report that the document does not balance as it doubles the VAT amount.

The culcript is a new alegorithm introduced in V4 in the TaxVoucherService Class.

In order to remove the issue I have added the following in the Update now method of LedgerJournalTrans class:

Original

if (taxVoucherService)
{

if (taxVoucherService.ledgerFallbackAccount() == _ledgerJournalTrans.AccountNum)
{
taxAmount = taxVoucherService.taxAmountToPost(_ledgerJournalTrans.LineNum);
}
}

Changed

if (taxVoucherService.ledgerFallbackAccount() == _ledgerJournalTrans.AccountNum && _Posting != LedgerPostingType::InterCompany )
{ // Changed on 20 Jul 2006 at 17:44:45 by SJO

taxAmount = taxVoucherService.taxAmountToPost(_ledgerJournalTrans.LineNum);
// Changed on 20 Jul 2006 at 17:44:45 by SJO
}
}

As the VAT amount has already been added in the intercompanyupdate process earlier.


This bug is reported and will be fixed in Version 4.1 due out end 2007.

/Sven

No comments: