IF AppliesFromEntryNo = 0 THEN
EXIT;
WITH GlobalItemLedgerEntry DO BEGIN
IF "Prod. Order No." = '' THEN
EXIT;
OldItemLedgerEntry.GET(AppliesFromEntryNo);
IF NOT AllowProdApplication(OldItemLedgerEntry,GlobalItemLedgEntry) THEN
ERROR(
Text022,
OldItemLedgerEntry."Entry Type",
"Entry Type",
"Item No.",
"Prod. Order No.");
IF ItemApplnEntry.CheckIsCyclicalLoop("Entry No.",OldItemLedgerEntry) THEN
ERROR(
Text022,
OldItemLedgerEntry."Entry Type",
"Entry Type",
"Item No.",
"Prod. Order No.");
END;IF AppliesFromEntryNo = 0 THEN
EXIT;
WITH GlobalItemLedgerEntry DO BEGIN
IF "Prod. Order No." = '' THEN
EXIT;
OldItemLedgerEntry.GET(AppliesFromEntryNo);
IF NOT AllowProdApplication(OldItemLedgerEntry,GlobalItemLedgEntry) THEN
ERROR(
Text022,
OldItemLedgerEntry."Entry Type",
"Entry Type",
"Item No.",
"Prod. Order No.");
IF ItemApplnEntry.CheckIsCyclicalLoop("Entry No.",OldItemLedgerEntry) THEN
ERROR(
Text022,
OldItemLedgerEntry."Entry Type",
"Entry Type",
"Item No.",
"Prod. Order No.");
END;