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.
...
TestStatusOpen;
IF xRec."Location Code" <> "Location Code" THEN BEGIN
TESTFIELD("Qty. Rcd. Not Invoiced",0);
TESTFIELD("Receipt No.",'');
...
...
TestStatusOpen;
IF xRec."Location Code" <> "Location Code" THEN BEGIN
// Add the following lines.
IF "Prepmt. Amt. Inv." <> 0 THEN
IF NOT CONFIRM(Text044,FALSE,FIELDCAPTION("Direct Unit Cost"),FIELDCAPTION("Location Code")) THEN BEGIN
"Location Code" := xRec."Location Code";
EXIT;
END;
// End of the following lines.
TESTFIELD("Qty. Rcd. Not Invoiced",0);
TESTFIELD("Receipt No.",'');
...
TextConst 'ENU=The system will not update %1 when changing %2, because a Prepayment Invoice has been posted. Do you want to continue?';
...
PurchLinePriceExists(PurchHeader,PurchLine,FALSE);
CalcBestDirectUnitCost(TempPurchPrice);
IF FoundPurchPrice OR
NOT ((CalledByFieldNo = FIELDNO(Quantity)) OR
(((CalledByFieldNo = FIELDNO("Variant Code")) AND NOT PriceInSKU)))
THEN
"Direct Unit Cost" := TempPurchPrice."Direct Unit Cost";
END;
...
...
PurchLinePriceExists(PurchHeader,PurchLine,FALSE);
CalcBestDirectUnitCost(TempPurchPrice);
IF (FoundPurchPrice OR
NOT ((CalledByFieldNo = FIELDNO(Quantity)) OR
(((CalledByFieldNo = FIELDNO("Variant Code")) AND NOT PriceInSKU)))) AND
("Prepmt. Amt. Inv." = 0)
THEN
"Direct Unit Cost" := TempPurchPrice."Direct Unit Cost";
END;
...