Bypass validation for REACT_ITEMs being retired.

This commit is contained in:
Infineon\Mitchem
2025-09-03 13:15:58 -07:00
parent 7ec010b03f
commit 981840fd95
2 changed files with 63 additions and 51 deletions

View File

@ -135,56 +135,66 @@ return
WRITE_RECORD_PRE:
ErrMsg = ''
ErrMsg = ''
OrigRetireDt = OrigRecord<REACT_ITEM_RETIRE_DT$>
NewRetireDt = Record<REACT_ITEM_RETIRE_DT$>
// Req'd parameter checks
ItemType = {RI_TYPE}
If ItemType EQ '' then ErrMsg := 'Item Type was not specified. '
If (ItemType NE 'LE') AND (ItemType NE 'RE') then
SerialNo = Record<REACT_ITEM_SERIAL_NO$>
If SerialNo EQ '' then
ErrMsg := 'Serial No. is required for this Reactor Item type. '
end
If OrigRetireDt EQ '' AND NewRetireDt NE '' then
RetireBypass = True$
end else
RetireBypass = False$
end
If ItemType EQ 'S' then
PocketQty = Record<REACT_ITEM_PKT_QTY$>
PocketSize = Record<REACT_ITEM_PKT_SIZE$>
If PocketSize EQ '' then
ErrMsg := 'Pocket size is required for Susceptor Item Type. '
If RetireBypass EQ False$ then
// Req'd parameter checks
ItemType = {RI_TYPE}
If ItemType EQ '' then ErrMsg := 'Item Type was not specified. '
If (ItemType NE 'LE') AND (ItemType NE 'RE') then
SerialNo = Record<REACT_ITEM_SERIAL_NO$>
If SerialNo EQ '' then
ErrMsg := 'Serial No. is required for this Reactor Item type. '
end
end
If PocketQty EQ '' then
ErrMsg := 'Pocket quantity is required for Susceptor Item Type. '
end
If ErrMsg = '' then
ExpectedQty = ''
Begin Case
Case Record<REACT_ITEM_PART_TYPE$> EQ 'ASM'
If PocketSize EQ 6 OR PocketSize EQ 8 then
ExpectedQty = 1
If ItemType EQ 'S' then
PocketQty = Record<REACT_ITEM_PKT_QTY$>
PocketSize = Record<REACT_ITEM_PKT_SIZE$>
If PocketSize EQ '' then
ErrMsg := 'Pocket size is required for Susceptor Item Type. '
end
If PocketQty EQ '' then
ErrMsg := 'Pocket quantity is required for Susceptor Item Type. '
end
If ErrMsg = '' then
ExpectedQty = ''
Begin Case
Case Record<REACT_ITEM_PART_TYPE$> EQ 'ASM'
If PocketSize EQ 6 OR PocketSize EQ 8 then
ExpectedQty = 1
end
Case Record<REACT_ITEM_PART_TYPE$> EQ 'HTR'
If PocketSize EQ 8 then
ExpectedQty = 3
end else
If PocketSize EQ 6 then ExpectedQty = 5
end
Case Record<REACT_ITEM_PART_TYPE$> EQ 'EPP'
If PocketSize EQ 8 then
ExpectedQty = 8
end else
If PocketSize EQ 6 then ExpectedQty = 18
end
Case Record<REACT_ITEM_PART_TYPE$> EQ ''
ErrMsg := 'Part Type. is required for Susceptor Reactor Item type. '
Case Otherwise$
ErrMsg := 'Invalid Part Type for Susceptor Reactor Item Type. '
End Case
If ExpectedQty NE '' then
If PocketQty NE ExpectedQty then
ErrMsg := 'Invalid Pocket Quantity for Part Type/Pocket Size combination. '
end
Case Record<REACT_ITEM_PART_TYPE$> EQ 'HTR'
If PocketSize EQ 8 then
ExpectedQty = 3
end else
If PocketSize EQ 6 then ExpectedQty = 5
end
Case Record<REACT_ITEM_PART_TYPE$> EQ 'EPP'
If PocketSize EQ 8 then
ExpectedQty = 8
end else
If PocketSize EQ 6 then ExpectedQty = 18
end
Case Record<REACT_ITEM_PART_TYPE$> EQ ''
ErrMsg := 'Part Type. is required for Susceptor Reactor Item type. '
Case Otherwise$
ErrMsg := 'Invalid Part Type for Susceptor Reactor Item Type. '
End Case
If ExpectedQty NE '' then
If PocketQty NE ExpectedQty then
ErrMsg := 'Invalid Pocket Quantity for Part Type/Pocket Size combination. '
end
end
end
@ -197,8 +207,6 @@ WRITE_RECORD_PRE:
Record = ''
ActionFlow = ACTION_STOP$
end else
OrigRetireDt = OrigRecord<REACT_ITEM_RETIRE_DT$>
NewRetireDt = Record<REACT_ITEM_RETIRE_DT$>
OrigNotes = OrigRecord<REACT_ITEM_NOTES$>
NewNotes = Record<REACT_ITEM_NOTES$>
If ( (OrigRetireDt NE NewRetireDt) or (OrigNotes NE NewNotes) ) then
@ -283,3 +291,4 @@ return