Item Ledger Entries Remaining Quantity does not make sense

Tan_Eng_SiongTan_Eng_Siong Member Posts: 84
Hi

I have a question about the Item Ledger Entries. I usually am able to tie all the stock movement of the item from the Item Ledger Entries.

However, I have a customer who has an Item whose stock movement cannot be reconciled on the Item Ledger Entries. Firstly they have a sales invoice for 2 qty of the items. So the Quantity field and the Invoiced Quantity field shows -2 repectively. However, the Remaining Quantity shows -1. This is not so strange except that there is a purchase of 39 qty of the same item, in the same location that is still not sold. I expect the remaining quantity to be 0 for the sales invoice row and the 38 for the purchase row.

Can anyone clue me on this?

Thanks

Tan Eng Siong
Tan Eng Siong

Comments

  • PavlosPavlos Member Posts: 19
    Hi Tan,

    First of all I want to ask you whick version of Navision your Customer is using? I know for sure that there was a bug in 3.7a version that is now fixed (actually the correction was to remove 2 IF statements in CU22). However you should check the "Lot No." and "Serial No." fields for these records in Item Ledger Entry. In order to update the Remaining Quantity as you expect there fields must have the same value.

    Remaining Quantity is a very important field that HAS to be updated correctly otherwise you will be in serious trouble (you will get the annoying message: "Item is not on Inventory" although you have the required quantity).

    Hope this help.
  • Tan_Eng_SiongTan_Eng_Siong Member Posts: 84
    The customer is on 3.7A. May I know what the changes to the codeunit is? I certainly could not find it in partnersource. The item is not lot tracked or serial number tracked which I found it even more strange.

    But this is not likely to fix the customer's old data is it?

    Tan Eng Siong
    Tan Eng Siong
  • Tan_Eng_SiongTan_Eng_Siong Member Posts: 84
    Sorry the customer is actually on Navision 3.6 and hotfix 25.

    Thanks

    Tan Eng Siong
    Tan Eng Siong
  • PavlosPavlos Member Posts: 19
    This is the suggested fix by MBS:

    Suggested code fix in Codeunit 22:

    LOCAL PROCEDURE ApplyItemLedgEntry@1(VAR ItemLedgEntry@1000 : Record 32;VAR OldItemLedgEntry@1001 : Record 32;VAR ValueEntry@1002 : Record 5802;CausedByTransfer@1003 : Boolean); ...
    IF NOT ItemLedgEntry.Positive THEN BEGIN // Remove IF Location.GET(ItemLedgEntry."Location Code") THEN IF Location."Use As In-Transit" THEN OldItemLedgEntry.TESTFIELD("Transfer Order No.",ItemLedgEntry."Transfer Order No."); END; // Remove ...
    ...
    IF NOT ItemLedgEntry.Positive THEN BEGIN // Remove IF Location.GET(ItemLedgEntry."Location Code") THEN IF Location."Use As In-Transit" THEN ItemLedgEntry2.SETRANGE("Transfer Order No.",ItemLedgEntry."Transfer Order No."); END; // Remove =============================================


    As far as the existing data this should be updated manually or alternatively you can create a batch job to do the correction, although I'm not recomment this kind of solution. I've come across this case several times and I've correct the data manually! :cry:
  • Tan_Eng_SiongTan_Eng_Siong Member Posts: 84
    Thanks for the code. We are still fixing the issue. Will let you know if it works.
    Tan Eng Siong
  • BagheeraBagheera Member Posts: 57
    I was looking for this as well.

    After fixing this what one should do to fix the corrupt data already caused by the bug?
    animateduserbar6sx.gif
Sign In or Register to comment.