Adjust Cost - Item Entries

isacaisaca Member Posts: 5
Hi, :D

I've just migrated to Nav 5.0, and an error occurrs when I run the report to adjust costs.

I'm running this report, for imported entries from different years.

The Error is: "There is no Value Entry within the filter.
Filters: Item No.: 120000181, Valuation Date:01-01-08..31-12-07"
Tried the same on Nav 4.0 and didn't have any problems.

After debugging it seems that the program, when treating an entry from the year after, gets the wrong valuation date. I made a change to codeunit 5895 - Inventory adjustment that seems to work, but I need to find out if it is a bug or not, for Nav 5.0.

Did anyone had this problem?

Thanks

Answers

  • rajpatelbcarajpatelbca Member Posts: 178
    isaca wrote:
    Hi, :D

    I've just migrated to Nav 5.0, and an error occurrs when I run the report to adjust costs.

    I'm running this report, for imported entries from different years.

    The Error is: "There is no Value Entry within the filter.
    Filters: Item No.: 120000181, Valuation Date:01-01-08..31-12-07"
    Tried the same on Nav 4.0 and didn't have any problems.

    After debugging it seems that the program, when treating an entry from the year after, gets the wrong valuation date. I made a change to codeunit 5895 - Inventory adjustment that seems to work, but I need to find out if it is a bug or not, for Nav 5.0.

    Did anyone had this problem?

    Thanks

    think you have to check table item ledger entry's entry no. is not available item ledger entry no. filed in value entry table for that particular item.

    if there are no. of item ledger entry then create function that checks each ILE entry no. is available in item ledger entry no. field of Value Entry table.
    Experience Makes Man Perfect....
    Rajesh Patel
  • isacaisaca Member Posts: 5
    think you have to check table item ledger entry's entry no. is not available item ledger entry no. filed in value entry table for that particular item.

    if there are no. of item ledger entry then create function that checks each ILE entry no. is available in item ledger entry no. field of Value Entry table.


    Don't really think the problem is that.

    The adjust cost features, in NAV 5, are completly different from NAV4
    The entries were imported to NAV 4 and NAV 5 in the same way,
    and it works on NAV4.

    The error message clearely displays a date interval that is impossible!
    "...Valuation Date:01-01-08..31-12-07"

    Can be bug or lack or configuration somewhere! :(
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Did you do a full object upgrade or just a technical upgrade?

    And was the Batch or code unit modified in anyway BEFORE the upgrade? If so how did you transfer those mods across?

    If this is a bug in standard NAV, its something that could affect many people.
    David Singleton
  • kinekine Member Posts: 12,562
    Do not forget about the Inventory Posting period - it is new thing in the NAV 5.0. May be that the periods are not defined and it create this problem...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    kine wrote:
    Do not forget about the Inventory Posting period - it is new thing in the NAV 5.0. May be that the periods are not defined and it create this problem...

    :oops: I completely forgot that...
    David Singleton
  • isacaisaca Member Posts: 5
    Do not forget about the Inventory Posting period -
    it is new thing in the NAV 5.0. May be that the periods are not defined and it create this problem...

    :( Througout my tests I was reading about the Inventory periods, I got the ideia that it´s not obligatory to fill them. Anyway, I did the test now, and the problem persists.
    Did you do a full object upgrade or just a technical upgrade?

    And was the Batch or code unit modified in anyway BEFORE the upgrade? If so how did you transfer those mods across?

    If this is a bug in standard NAV, its something that could affect many people.

    Yes, we did a full upgrade, and the code has never been changed by us.

    At the time you run the report, the table "Avg. Cost Adjmt. Entry Point" ,
    for a certain Item, has records for each period where the item had entries.

    During the excution of the report, this table is temporarily filled, for the item,as if there were entries in all periods. When it goes from one entry that in reality does not exist in vallue entry, to one that exists and is from another year, it crashes with the error of the date interval.

    In NAV 4, at some point, there is an evaluation of the "Avg. Cost Adjmt. Entry Point"."Valuation Date" to the "Value Entry"."Valuation Date", and in NAV 5 there isn't. :(

    In Codeunit 5895 - Inventory Adjustment, in function AvgValueEntriesToAdjustExist, I Tried this, and worked, just not sure if it is the best solution.

    IF FINDFIRST THEN BEGIN
    FindNextRange := TRUE;
    IF "Valuation Date" > CalendarPeriod."Period End" THEN BEGIN
    CalendarPeriod."Period Start" := "Valuation Date";
    //
    AvgCostAdjmtEntryPoint."Valuation Date" := "Valuation Date";
    //
    AvgCostAdjmtEntryPoint.GetValuationPeriod(CalendarPeriod);
    END;
  • cernstcernst Member Posts: 280
    Not really sure if it'sa problem in the code. Could be a problem in the data you have migrated. I know that there is a problem in the value entries and the field valuation date that in some cases in eariler versions is set to 9999-12-31. Maybe this could be the problem? or somthing else in the data i value entries.
    _____________________
    NAV Freelance Consultant
  • isacaisaca Member Posts: 5
    Thanks for all your help. I've just found out that this is really a bug in Navision 5.0 in Knowledge Base from Microsoft.

    Here's the link to solve it! :D

    https://mbs.microsoft.com/knowledgebase ... OPUQUOKTYN
Sign In or Register to comment.