Bypass validation for REACT_ITEMs being retired.
This commit is contained in:
@ -503,6 +503,7 @@ RETURN
|
||||
LUPktSize:
|
||||
* * * * * * *
|
||||
|
||||
Retired = Get_Property(@Window: '.RETIRE_DT', 'TEXT')
|
||||
RIType = Get_Property(@Window:'.RI_TYPE', 'TEXT')
|
||||
If RIType EQ 'S' then
|
||||
PocketQty = ''
|
||||
@ -533,7 +534,7 @@ If RIType EQ 'S' then
|
||||
Set_Property(@Window:'.PKT_QTY', 'TEXT', PocketQty)
|
||||
END
|
||||
end else
|
||||
ErrMsg('A valid Part Type (EPP, ASM, HTR) must be selected before selecting Pocket Size.')
|
||||
If Retired EQ '' then ErrMsg('A valid Part Type (EPP, ASM, HTR) must be selected before selecting Pocket Size.')
|
||||
end
|
||||
end
|
||||
|
||||
@ -597,6 +598,7 @@ RETURN
|
||||
|
||||
PktSizeChange:
|
||||
|
||||
Retired = Get_Property(@Window: '.RETIRE_DT', 'TEXT')
|
||||
RIType = Get_Property(@Window:'.RI_TYPE', 'TEXT')
|
||||
If RIType EQ 'S' then
|
||||
PocketQty = ''
|
||||
@ -624,12 +626,13 @@ PktSizeChange:
|
||||
End Case
|
||||
Set_Property(@Window:'.PKT_QTY', 'TEXT', PocketQty)
|
||||
end else
|
||||
ErrMsg('A valid Pocket Size (6 or 8 in.) is required.')
|
||||
If Retired EQ '' then ErrMsg('A valid Pocket Size (6 or 8 in.) is required.')
|
||||
end
|
||||
end else
|
||||
ErrMsg('A valid Part Type (EPP, ASM, HTR) must be selected before selecting Pocket Size.')
|
||||
If Retired EQ '' then ErrMsg('A valid Part Type (EPP, ASM, HTR) must be selected before selecting Pocket Size.')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user