Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Calculation in the cost of the item

(0) ShareShare
ReportReport
Posted on by 557

Hi all. 

We came across an issue for a while now. 

When we purchase an item, the cost is calculated by AX. When we sell it, sometimes at a price less than cost price or at a price higher than cost price, the cost of the item changes. In some cases, the items would be sold for a profit. In some cases, items are sold for a loss (considering the whole quantity is sold). In these cases, the cost of the item shows the difference between purchased & sold costs. 

Suppose we bought an item for USD 10

Sold it for USD 12

The cost of the item shows USD 2. 

And in the case where we sold it for USD 8, the cost of the item shows USD -2. 

In both cases, the physical available stock is 0 as the full quantity is sold. 

Why is our profit / loss affecting the cost of the item? How can we change this? This affects only certain items and we were unable to pick a relation / common factor between them. 

*This post is locked for comments

  • Verified answer
    oldman.logan Profile Picture
    oldman.logan 557 on at
    RE: Calculation in the cost of the item

    Yes, I can confirm that recalculation of the selected items fixes the negative or positive financial cost prices. This posts adjustments into the inventory group ledger account of the item and also adjusts the amount among sales orders / purchase orders for that item and affects the Cost of Goods Sold ledger account. If there are a large number of such items with rogue cost, it could affect the Cost of Goods Sold significantly. In our case, we have several negative and positive financial cost prices either of which do not have any available physical quantity. So net effect of the changes to the COGS account should be zero or minimal. Going to implement this on the test machine before we can reproduce it to the live environment.

    We are looking to upgrade soon to AX 2012 or 365 and we will be making sure that inventory is closed regularly to prevent such issues. 

    Thanks a lot for the support! 

  • Verified answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Calculation in the cost of the item

    Ups. If the inventory close has not been run for almost 8 years trying to run it in your prod system will probably take a long time and affect the performance.

    I would try - as you said - trying to run a recalculation only for the items with a negative cost price and those items where you have a good feeling that the cost prices are wrong.

    If you upgrade to a newer version one day then please implement a process where somebody regularly closes inventory.

    Best regards

    Ludwig

  • oldman.logan Profile Picture
    oldman.logan 557 on at
    RE: Calculation in the cost of the item

    [quote user="Ludwig Reinhard"]

    Hi,

    Actually the costs that you see before running the inventory close or recalculation are 'wrong' and not reliable in the sense that they do not apply to your inventory model (weighted average). Therefore, you shouldn't start doing a cost analysis before the recalculation/close of the inventory has been executed.

    Have you checked whether the negative cost amount has been changed by the recalculation?

    Best regards

    Ludwig

    [/quote]

    Thanks Dr. Ludwig for your reply. The issue here is that an inventory close / recalculation has not been done since 2010. So this affects the cost of various items in a way that it is lesser than the current purchase price of the item. In some cases, it is way more than the current selling price. This will cause a system wide issue. Yes, the recalculation has affected and adjusted the negative cost for most items. A few are remaining though. Will the issue be resolved if we do a recalculation only for the items with negative cost? 

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Calculation in the cost of the item

    Hi,

    Actually the costs that you see before running the inventory close or recalculation are 'wrong' and not reliable in the sense that they do not apply to your inventory model (weighted average). Therefore, you shouldn't start doing a cost analysis before the recalculation/close of the inventory has been executed.

    Have you checked whether the negative cost amount has been changed by the recalculation?

    Best regards

    Ludwig

  • oldman.logan Profile Picture
    oldman.logan 557 on at
    RE: Calculation in the cost of the item

    [quote user="Ludwig Reinhard"]

    Hi,

    The process in AX2009 is basically identical to AX2012 and D365FO.

    You can find a description about the steps required on the following Docs site for aX2012:

    https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/run-inventory-recalculation

    Best regards,

    Ludwig

    [/quote]

    We tried the inventory recalculation on the test server and it causes the cost price of the items to fluctuate. Some costs have gone up, some has come down. This renders our costs to be no longer reliable. 

  • oldman.logan Profile Picture
    oldman.logan 557 on at
    RE: Calculation in the cost of the item

    Hi...

    I can provide an example for a negative cost item here. 

    7382.Cost.jpg

    7382.Cost.jpg

    The purchase cost and selling cost difference is -1.410 which appears in Financial cost of the item and there is no available quantity. 

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Calculation in the cost of the item

    Hi,

    The process in AX2009 is basically identical to AX2012 and D365FO.

    You can find a description about the steps required on the following Docs site for aX2012:

    https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/run-inventory-recalculation

    Best regards,

    Ludwig

  • oldman.logan Profile Picture
    oldman.logan 557 on at
    RE: Calculation in the cost of the item

    Thanks for your reply Dr. Ludwig. How can I run an inventory recalculation? Could you direct me?  

    I will share the details of the sales order shortly.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Calculation in the cost of the item

    Hi,

    The setup of your inventory model group seems in general ok.

    Can you share details of the sales order where you see a negative cost price?

    This might be the result of latest purchase price parameter that has been selected for your item especially if the last purchase was actually a return to a vendor.

    Can you check whether this was the case for the sales order that showed a negative cost price?

    Have you already tried runnin an inventory recalculation and checked the sales order that showed the negative cost price again?

    Best regards,

    Ludwig

  • oldman.logan Profile Picture
    oldman.logan 557 on at
    RE: Calculation in the cost of the item

    Hi.. Thanks for your replies. Here is more information on the item in screenshots.

    7838.Setup.jpg

    7838.Setup.jpg

    May I ask what is the significance of selecting both Latest Purchase Price and Latest Cost Price for price update? 

    WA.jpg

    In the last screenshot, Inventory Model Group - Weighted Average - There is only one group for all items named WA. I found this check box for "financial negative inventory" under the group. What is its significance?  How will it affect the item costs if I change the setting? 

    The original setup for AX was done back in 2009 by a consultant who is no longer with us. Forgive my ignorance since my expertise is elsewhere but glad to learn more everyday, thanks to your support.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans