SalesLine.TESTFIELD("Return Qty. Received",0);
SalesLine.TESTFIELD("Shipment No.",'');
SalesLine.TESTFIELD("Return Receipt No.",'');
SalesLine.TESTFIELD("Blanket Order No.",'');
SalesLine.TESTFIELD("Prepmt. Amt. Inv.",0);
SalesLineTmp := SalesLine;
IF SalesLine.Nonstock THEN BEGIN
SalesLine.Nonstock := FALSE;
SalesLine.MODIFY;
END;
SalesLineTmp.INSERT;
RecreateReservEntry(SalesLine,0,TRUE);
RecreateReqLine(SalesLine,0,TRUE);
UNTIL SalesLine.NEXT = 0;
// Delete the following lines.
IF "Location Code" <> xRec."Location Code" THEN
IF NOT TempReservEntry.ISEMPTY THEN
ERROR(Text047,FIELDCAPTION("Location Code"));
// End of the deleted lines.
ItemChargeAssgntSales.SETRANGE("Document Type","Document Type");
ItemChargeAssgntSales.SETRANGE("Document No.","No.");
IF ItemChargeAssgntSales.FINDSET THEN BEGIN
…
SalesLine.TESTFIELD("Return Qty. Received",0);
SalesLine.TESTFIELD("Shipment No.",'');
SalesLine.TESTFIELD("Return Receipt No.",'');
SalesLine.TESTFIELD("Blanket Order No.",'');
SalesLine.TESTFIELD("Prepmt. Amt. Inv.",0);
// Add the following lines.
IF SalesLine."Location Code" <> "Location Code" THEN
SalesLine.VALIDATE("Location Code","Location Code");
// End of the added lines.
SalesLineTmp := SalesLine;
IF SalesLine.Nonstock THEN BEGIN
SalesLine.Nonstock := FALSE;
SalesLine.MODIFY;
END;
SalesLineTmp.INSERT;
RecreateReservEntry(SalesLine,0,TRUE);
RecreateReqLine(SalesLine,0,TRUE);
UNTIL SalesLine.NEXT = 0;
ItemChargeAssgntSales.SETRANGE("Document Type","Document Type");
ItemChargeAssgntSales.SETRANGE("Document No.","No.");
IF ItemChargeAssgntSales.FINDSET THEN BEGIN
…