...
WarehouseEntry@1002 : Record 7312;
WarehouseEntry2@1001 : Record 7312;
WhseJnlLine@1000 : Record 7311;
BEGIN
WarehouseEntry.SETCURRENTKEY("Location Code");
WarehouseEntry.SETRANGE("Location Code",Code);
...
...
WarehouseEntry@1002 : Record 7312;
WarehouseEntry2@1001 : Record 7312;
WhseJnlLine@1000 : Record 7311;
// Add the following lines.
ItemLedgerEntry@1007 : Record 32;
PositiveFilter@1008 : Boolean;
// End of the lines.
BEGIN
WarehouseEntry.SETCURRENTKEY("Location Code");
WarehouseEntry.SETRANGE("Location Code",Code);
...
...
IF WhseJnlLine.FINDFIRST THEN
ERROR(Text001,TABLECAPTION,Code);
Zone.SETRANGE("Location Code",Code);
Zone.DELETEALL;
Bin.SETRANGE("Location Code",Code);
...
...
IF WhseJnlLine.FINDFIRST THEN
ERROR(Text001,TABLECAPTION,Code);
// Add the following lines.
ItemLedgerEntry.SETCURRENTKEY("Item No.",Positive,"Location Code","Variant Code");
IF ItemLedgerEntry.FINDFIRST THEN
REPEAT
ItemLedgerEntry.SETRANGE("Item No.",ItemLedgerEntry."Item No.");
ItemLedgerEntry.SETRANGE("Location Code",Code);
FOR PositiveFilter := FALSE TO TRUE DO BEGIN
ItemLedgerEntry.SETRANGE(Positive,PositiveFilter);
IF ItemLedgerEntry.FINDLAST THEN
ERROR(Text013,Code);
END;
ItemLedgerEntry.SETRANGE(Positive);
ItemLedgerEntry.SETRANGE("Location Code");
ItemLedgerEntry.FINDLAST;
ItemLedgerEntry.SETRANGE("Item No.");
UNTIL ItemLedgerEntry.NEXT = 0;
// End of the lines.
Zone.SETRANGE("Location Code",Code);
Zone.DELETEALL;
Bin.SETRANGE("Location Code",Code);
...