Tuesday, July 27, 2010

Journal total debit / credit balances not correct (AX4.0 SP2)

Some users complain about in Vendor Payment Journal form sometimes the journal total debit/credit become incorrect after editing the journal.

The problem was that the journal balances are “remembered” by the journal table and by design when open the form it only retrieve the existing value. Some bugs probably make it such that certain updates are ignored and lead to incorrect journal balances. While this does not affect the final result, it’s very inconvenient for users to do spot check.
Well, since the issue does not affect actual posting, I guess fixing the debit credit display is enough. These journals uses the LedgerJournalEngine to display the balances. In the linkActive method in the form datasource, there’s a line that initiate a ledgerJournalEngine:

ledgerJournalEngine.newJournalActive(ledgerJournalTable);

simply change it to the following:

ledgerJournalEngine.newJournalActive(ledgerJournalTable,true);

The “true” parameter instructs the engine to do a recal on the journal balance every time the journal is opened.

It’s not the perfect solution. The next step might be add a button to recalculate as needed but I can live without it.

4 comments:

  1. thanks a lot , it is totally valid.

    ReplyDelete
  2. Thanks a lot for sharing ........... Super like.

    ReplyDelete
  3. Thanks!! Worked great for Customer payments as well!

    ReplyDelete