web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Dynamics Nav AVg Cost control

(0) ShareShare
ReportReport
Posted on by

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

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rashed Profile Picture
    3,765 on at

    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.

  • Community Member Profile Picture
    on at

    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?

  • Rashed Profile Picture
    3,765 on at

    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. 

  • jcastro Profile Picture
    2,245 on at

    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?

  • Community Member Profile Picture
    on at

    I did that by modifying Inventory Management Codeunit.

  • Community Member Profile Picture
    on at

    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.

  • Verified answer
    jcastro Profile Picture
    2,245 on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans