ITEM TRACKING [Selecting the Lot No.]

KimKim Member Posts: 85
Hi;
I had an order which I was suppossed to issue 20 Units. I already had 2 units available in the inventory. Transferred the Items from another warehouse location which had the same Lot No. as the earlier lot which had 2 Units. The problem is only the initial lot is available of 2 Units...I debugged the code and realized that when populating the entries on the Entry Summary table navision only enters one entry per batch
I would like to know:
1. Why is this so....why isn't possible to sum up the total figure of same batches??
2. Can i manipulate the code below without compromising any other areas??

NOTE-Have used ** to show where Navision is controlling ensuring single entry per batch.

Code Unit 6500:AssistEditLotSerialNo

InsertRec := TRUE;
**TempReservEntry.SETRANGE("Serial No.",ItemLedgEntry."Serial No.");
**TempReservEntry.SETRANGE("Lot No.",ItemLedgEntry."Lot No.");
**IF NOT TempReservEntry.FIND('-') THEN BEGIN
TempReservEntry.INIT;
TempReservEntry."Entry No." := -ItemLedgEntry."Entry No.";
TempReservEntry."Reservation Status" := ReservEntry."Reservation Status"::Surplus;
TempReservEntry.Positive := ItemLedgEntry.Positive;
TempReservEntry."Item No." := ItemLedgEntry."Item No.";
TempReservEntry."Location Code" := ItemLedgEntry."Location Code";
TempReservEntry."Quantity (Base)" := ItemLedgEntry2."Remaining Quantity";
TempReservEntry."Source Type" := DATABASE::"Item Ledger Entry";
TempReservEntry."Source Ref. No." := ItemLedgEntry."Entry No.";
TempReservEntry."Serial No." := ItemLedgEntry."Serial No.";
TempReservEntry."Lot No." := ItemLedgEntry."Lot No.";
TempReservEntry."Variant Code" := ItemLedgEntry."Variant Code";
IF TempReservEntry.Positive THEN BEGIN
TempReservEntry."Warranty Date" := ItemLedgEntry."Warranty Date";
TempReservEntry."Expiration Date" := ItemLedgEntry."Expiration Date";
TempReservEntry."Expected Receipt Date" := 0D
END ELSE
TempReservEntry."Shipment Date" := 31129999D;
IF InsertRec THEN
TempReservEntry.INSERT;
END;
Sign In or Register to comment.