...
TempSKU."Reordering Policy"::"Maximum Qty.":
BEGIN
// Delete the following lines.
IF TempSKU."Maximum Inventory" < TempSKU."Reorder Point" THEN
QtyToOrder := TempSKU."Reorder Point" - ProjectedInventory
ELSE
QtyToOrder := TempSKU."Maximum Inventory" - ProjectedInventory;
// The end of deleted lines.
Transparency.LogSurplus(
...
...
TempSKU."Reordering Policy"::"Maximum Qty.":
BEGIN
// Add the following lines.
IF TempSKU."Maximum Inventory" <= TempSKU."Reorder Point" THEN BEGIN
IF PlanningResilicency THEN
IF SKU.GET(TempSKU."Location Code",TempSKU."Item No.",TempSKU."Variant Code") THEN
ReqLine.SetResiliencyError(
STRSUBSTNO(
Text004,SKU.FIELDCAPTION("Maximum Inventory"),SKU."Maximum Inventory",SKU.TABLECAPTION,
SKU."Location Code",SKU."Item No.",SKU."Variant Code",
SKU.FIELDCAPTION("Reorder Point"),SKU."Reorder Point"),
DATABASE::"Stockkeeping Unit",SKU.GETPOSITION)
ELSE
IF Item.GET(TempSKU."Item No.") THEN
ReqLine.SetResiliencyError(
STRSUBSTNO(
Text005,Item.FIELDCAPTION("Maximum Inventory"),Item."Maximum Inventory",Item.TABLECAPTION,
Item."No.",Item.FIELDCAPTION("Reorder Point"),Item."Reorder Point"),
DATABASE::Item,Item.GETPOSITION);
TempSKU.TESTFIELD("Maximum Inventory",TempSKU."Reorder Point" + 1); // Assertion
END;
QtyToOrder := TempSKU."Maximum Inventory" - ProjectedInventory;
// The end of new lines.
Transparency.LogSurplus(
...