Published On: December 27, 2016Categories: Technical

One of our clients experienced the following issue: Posting a purchase order invoice resulted in an inventory transaction with zero cost. However, the postings in the General ledger were correct. The stock valuation model was Weighted average date. The AX version is AX2012, R2, CU7.

We went trough the execution of the invoice posting and noticed that the cost price calculation is based on the accounting distributions. The logic takes into account all distributions on the line with the same financial dimensions as the PO line. In our case these are different. We assume this is because the PO is created from a PRQ. The accounting distribution has the same dimension as the PRQ line while the PO line dimensions are blank.

The cost price calculation starts in InventCostInputAmount class, getInputAmountFromDistribution method where the ledger dimension selection criteria is defined based on the purchase line. Then actual calculation is implemented in SourceDocumentLineProvider class. getDistributedAmountInAccountingCurrency method where AccountingDistribution entries are selected based on the previously defined ledger dimension combination.

This seems to be a common issue since it was experienced by others as well. The proposed solution from Microsoft is the following hotfix: KB 2967526 “Deleting a financial dimension affects the distributions on a purchase order receipt, invoice vouchers and inventory costs”.

  1. 2c7f878213f513555bc04ce37d976c1f?s=54&d=mm&r=g
    Sj June 12, 2017 at 8:41 am - Reply

    The problem still seems to persist at Ax 2012 Cu12

  2. cf798e531ef9401b4809b5a7b974078a?s=54&d=mm&r=g
    Jessica September 18, 2018 at 12:17 pm - Reply

    Yes, Agree with Sj, the problem is still there after installing KB2967526. Anyone has any idea? is there a newer version KB available to fix this issue?