Monday, February 7, 2011

Update item cost price to on-hand cost in AX 2009

A common request from the client is to update their item costs under costing version (Item master > Price button) to the latest on-hand cost. I think it’s common because on-hand cost could change quite a bit from the original go-live cost price as time goes by, and this is especially true for weighted average items. As many of you know, the cost price from costing version is used in many places for calc invent cost, e.g. counting/PL journal, std cost rollup, etc. Though inven adjustment and close could rectify this problem (to some extent), you’ll have to live with the incorrect financial reports throughout the time and remember to adjust the cost again on next inv close. There is a checkbox on the item master – “Latest cost price” which saves the latest cost price to the costing version. However, I found it doesn’t work properly in a multi site environment. VersionID is always empty.
I couldn’t find an out-of-the-box function in AX to address this issue, so decided to do customization. On the costing version form, I added a button “update cost to on-hand cost”. On the new form, you can select which items you want to update, and then click ok. That’s it. Here are some highlights:
  • To update item cost price (Items > Price button > Costing versions) to its on-hand average cost.
  • Added a field CopiedFromOnHand to the CostingVersion table, so those pending costs added by this script can be easily identified when to be activated
  • Assume each operational site only has one main warehouse
  • Only the item that has physical inventory for the warehouse gets updated.
SharedProject_UpdateCostPriceToOnHand.xpo

3 comments:

  1. Has there been a change of role for this field in AX2009. I am most accustomed to issues taking place at current cost initially, but I think I am seeing issues at Last Cost in one AX2009 installation. I need another configuration.

    ReplyDelete
  2. Hi. I can no long download this link. Can you please reattach it? thank you

    ReplyDelete
  3. Hi. I can no long download this link. Can you please reattach it? thank you

    ReplyDelete