Zero cost price on purchase line inventory transactions
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”.
Allow All Cookies
Third Party Embedes
Third-party cookies are cookies that are set by other websites, not this one. This website may use embedded content from other websites, such as YouTube or Google maps. Your consent is required to view content from these websites embedded on this site.