Merged PR 11767: NCR hold removal prompt

This commit is contained in:
Mitchem Dakota (CSC FI SPS MESLEO External)
2025-02-27 20:50:52 +01:00
committed by Stieber Daniel (CSC FI SPS MESLEO)
parent 87d79edef8
commit 779ed0ba29
7 changed files with 3615 additions and 139 deletions

View File

@ -11,12 +11,13 @@ COMPILE FUNCTION Comm_WM_Out(Instruction, Parm1,Parm2)
with the current WM_OUT record have metrology run data.
08/26/2019 - DJS - Updated the RDS Metrology verification section to use RDS_Services('VerifyEPPMetrology'), which
contains code adapted from the RDS_POST_EPI FQA sign button event.
02/27/2025 - DJM - Added prompt to remove hold when creating NCR in 'RejMat'
*/
DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow, Set_List_Box_Data, obj_Post_Log
DECLARE SUBROUTINE Btree.Extract, Send_Event, Security_Err_Msg, Forward_Event, End_Window, Start_Window, obj_WO_Mat_Log
DECLARE SUBROUTINE Send_Message, Print_Cass_Out, obj_WM_Out, obj_Notes, obj_WO_Mat, obj_Tables, Set_Property, obj_WO_Wfr
DECLARE SUBROUTINE Start_Window, Obj_RDS, Database_Services, Rds_Services, Signature_Services, Wm_Out_Services
DECLARE SUBROUTINE Start_Window, Obj_RDS, Database_Services, Rds_Services, Signature_Services, Wm_Out_Services, Sleepery
DECLARE SUBROUTINE Logging_Services, Wo_Mat_Qa_Services, Error_Services, Post_Event, Wafer_Counter_Services, Hold_Services
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists, obj_Tables
@ -1278,20 +1279,53 @@ RejMat:
WMOKey = WONo:'*':WOStep:'*':OutCassNo
WMOStatus = Xlate('WM_OUT', WMOKey, 'CURR_STATUS', 'X')
OnHold = (WMOStatus EQ 'HOLD')
If Onhold NE True$ then
GoSub FQAVerify
If Not(Authorized) then Return 0
Result = ''
SlotSelection = Get_Property(@WINDOW:'.SLOT','SELPOS')
SelectedRows = SlotSelection<2>
CONVERT @VM TO @FM in SelectedRows
SelCnt = COUNT(SelectedRows,@FM) + (SelectedRows NE '')
IF SelCnt = 0 THEN
ErrMsg('You must select at least one row in order to create an NCR.')
RETURN
END
GoSub FQAVerify
If Not(Authorized) then Return 0
If OnHold EQ True$ then
Result = Dialog_Box('NDW_HOLD_REMOVAL_PROMPT',@WINDOW,'WM_OUT':@VM:WMOKey:@VM:WOMatKey)
If Result NE True$ then
Return
end else
Send_Event(@Window, 'READ')
end
end
If (OnHold NE True$) OR (Result = True$) then
OffHoldDTMs = Xlate('WO_MAT', WOMatKey, 'HOLD_STOP_DTM', 'X')
SAPBatchNo = Xlate('WO_MAT', WOMatKey, WO_MAT_SAP_BATCH_NO$, 'X')
If OffHoldDTMs NE '' then
// Ensure at least a minute has elapsed since the cassette was last taken off hold.
LastDTM = OffHoldDTMs[-1, 'B':@VM]
TimeElapsed = Datetime() - LastDTM
// .000694 is the equivalent to 60 seconds in datetime format
If (TimeElapsed LT '.000694') AND (SAPBatchNo NE '') then
Def = ""
Def<MTEXT$> = "Please wait for SAP to process off hold transaction..."
Def<MTYPE$> = "U"
MsgUp = Msg(@window, Def) ;* display the processing message
WaitTime = '.000694' - TimeElapsed
WaitSeconds = WaitTime * 86400 ;* 86400 = 60 seconds * 60 minutes * 24 hours
WaitMilliSec = WaitSeconds * 1000
Sleepery(WaitMilliSec)
Msg(@window, MsgUp) ;* take down the processing message
end
end
WMOutList = Get_Property(@WINDOW:'.SLOT','LIST')
SlotSelection = Get_Property(@WINDOW:'.SLOT','SELPOS')
SelectedRows = SlotSelection<2>
CONVERT @VM TO @FM in SelectedRows
SelCnt = COUNT(SelectedRows,@FM) + (SelectedRows NE '')
IF SelCnt = 0 THEN RETURN
InCassNos = ''
InSlotNos = ''
RDSNos = ''
@ -1448,10 +1482,6 @@ RejMat:
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
End
end else
// Cassette is on hold so material cannot be rejected.
ErrorMessage = 'Create NCR denied!. The cassette must be taken off hold before rejecting material.'
Msg(@Window, '', 'OK', '', 'Error':@FM:ErrorMessage)
end
RETURN
@ -2268,3 +2298,4 @@ RefreshWaferCounterData:
return