To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
...
ItemLedgEntry.RESET;
ItemLedgEntry.SETCURRENTKEY("Item No.",Open,"Variant Code",Positive,"Expiration Date");
ItemLedgEntry.SETRANGE("Item No.",ItemNo);
// Delete the following line.
ItemLedgEntry.SETRANGE(Open,TRUE);
// End of the deleted line.
ItemLedgEntry.SETRANGE("Variant Code",Variant);
IF LotNo <>'' THEN
ItemLedgEntry.SETRANGE("Lot No.",LotNo)
ELSE
IF SerialNo <> '' THEN
ItemLedgEntry.SETRANGE("Serial No.",SerialNo);
ItemLedgEntry.SETRANGE(Positive,TRUE);
IF ItemLedgEntry.ISEMPTY THEN
EXIT;
ItemLedgEntry.FINDSET;
OK := TRUE;
...
...
ItemLedgEntry.RESET;
ItemLedgEntry.SETCURRENTKEY("Item No.",Open,"Variant Code",Positive,"Expiration Date");
ItemLedgEntry.SETRANGE("Item No.",ItemNo);
ItemLedgEntry.SETRANGE("Variant Code",Variant);
IF LotNo <> '' THEN
ItemLedgEntry.SETRANGE("Lot No.",LotNo)
ELSE
IF SerialNo <> '' THEN
ItemLedgEntry.SETRANGE("Serial No.",SerialNo);
ItemLedgEntry.SETRANGE(Positive,TRUE);
IF ItemLedgEntry.ISEMPTY THEN
EXIT;
ItemLedgEntry.FINDSET;
OK := TRUE;
...