Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Dynamics Nav AVg Cost control

Posted on by Microsoft Employee

Is it possible prevent the 'Positive adjustment' from affecting AVG Cost?

*This post is locked for comments

  • Verified answer
    jcastro Profile Picture
    jcastro 2,245 on at
    RE: Dynamics Nav AVg Cost control

    One of the issues that a lot of people have when they start working with NAV is that their habits are not the "best" and you could say NAV does not tolerate mistakes as easily as other ERP's. That does not mean that the system does not provide a standard way of solving those things.

    If you create as sales document and post it and afterwards you realize it's mistaken, you can "undo" the effects of that document by generating for instance a credit memo. That way not only you gain that you didn't have to modify the system but also educate the users and leave a trail you can easily follow when problems appear. When you modify the system that way you should be aware that you could cause future trouble to not be as easily detected.

    By the way, if you do not want the last direct cost to be applied onto a positive transaction (purchase, positive adjustment, sales return, etc) you can manually change the cost of the product that will enter the system before posting.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics Nav AVg Cost control

    Thanks Jose,

    Actually financial department requested that because all our positive adjustments are due to wrong sales transactions or some other kinds of mistakes, e.g. selling item1 instead of item2, so correction must be by negative item2 & positive item1, thus the average cost will be affected by the positive, which is in "Last Direct Cost", and the effects will not delete each others, so the variance in AVG cost calculation appears here.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics Nav AVg Cost control

    I did that by modifying Inventory Management Codeunit.

  • jcastro Profile Picture
    jcastro 2,245 on at
    RE: Dynamics Nav AVg Cost control

    Like Rashed has said, it is not as simple. Doing it the way you're proposing would imply that any positive adjustment done with the "wrong" unit cost would cause the exceeding cost to never leave the warehouse, for that extra cost is not considered when calculating the average cost.

    Is it possible for us to know why you need such a requirement?

  • Rashed Profile Picture
    Rashed 3,765 on at
    RE: Dynamics Nav AVg Cost control

    It's not as simple as this.   You need to modify adjust cost to adjust the positive entries to average cost. So that it doesn't affect the average cost. 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics Nav AVg Cost control

    Thanks a lot for your reply,

    I've modified

    ItemCostManagement.calculateAveragecost

    by setting additional filter as:

    SETFILTER("Item Ledger Entry Type",'<>%1',"Item Ledger Entry Type"::"Positive Adjmt.");

    so i had to add another key to value entry as:

    Item No.,Expected Cost,Valuation Date,Location Code,Variant Code,Item Ledger Entry Type

    What do you see?

  • Verified answer
    Rashed Profile Picture
    Rashed 3,765 on at
    RE: Dynamics Nav AVg Cost control

    You'll have to modify the system to do it.  It's not a lot of code changes, but you need to know where to change them.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans