migrated from OI 9
This commit is contained in:
parent
3cdb08d0fd
commit
f9f296fa5e
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
13803
LSL2/OIWIN/RDS.json
13803
LSL2/OIWIN/RDS.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
16608
LSL2/OIWIN/WO_MAT.json
16608
LSL2/OIWIN/WO_MAT.json
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Wind
|
||||
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Signature_Services
|
||||
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note
|
||||
DECLARE SUBROUTINE obj_WO_Mat_Log, obj_WO_Mat, obj_Clean_Insp, Unlock, Lock, Database_Services, Yield
|
||||
DECLARE SUBROUTINE Override_Log_Services, Dialog_Box, obj_WO_Wfr, Error_Services
|
||||
DECLARE SUBROUTINE Override_Log_Services, Dialog_Box, obj_WO_Wfr, Error_Services, Hold_Services
|
||||
|
||||
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, Environment_Services
|
||||
DECLARE FUNCTION Send_Message, Msg, Security_Check, obj_React_Run_CI, Select_Into, MemberOf, Database_Services
|
||||
@ -1090,7 +1090,8 @@ SignInsp:
|
||||
HoldEntityID = WOMatKey
|
||||
Set_Status(0)
|
||||
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
|
||||
If Not(OnHold) then obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'')
|
||||
* If Not(OnHold) then obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'')
|
||||
If Not(OnHold) then Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, '', '', '', '')
|
||||
ErrCode = ''
|
||||
If Not(Get_Status(ErrCode)) then
|
||||
// Ensure the user didn't cancel the hold operation.
|
||||
@ -1288,7 +1289,8 @@ SignInsp:
|
||||
HoldEntityID = WMOKey
|
||||
Set_Status(0)
|
||||
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
|
||||
If Not(OnHold) then obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'')
|
||||
* If Not(OnHold) then obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'')
|
||||
If Not(OnHold) then Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, '', '', '', '')
|
||||
ErrCode = ''
|
||||
If Not(Get_Status(ErrCode)) then
|
||||
|
||||
@ -1965,3 +1967,4 @@ SetGroupBackground:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -11,8 +11,8 @@ COMPILE FUNCTION Comm_RDS(Method, Parm1, Parm2)
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, ErrMsg, Security_Err_Msg, Popup, Print_Cass_Labels
|
||||
DECLARE SUBROUTINE Print_Prod_Labels, obj_WO_Mat_Log, obj_Post_Log, obj_Tables, obj_React_Run, Post_Event
|
||||
DECLARE SUBROUTINE obj_Appwindow, Start_Window, Btree.Extract, Msg, Start_Window,Print_Cleanroom_Labels_Thermal
|
||||
DECLARE SUBROUTINE Print_Prod_Labels, obj_WO_Mat_Log, obj_Post_Log, obj_Tables, obj_React_Run, Post_Event, Hold_Services
|
||||
DECLARE SUBROUTINE obj_Appwindow, Start_Window, Btree.Extract, Msg, Start_Window,Print_Cleanroom_Labels_Thermal, Error_Services
|
||||
DECLARE SUBROUTINE obj_RDS_Test, obj_Notes, Print_Control_Plan, obj_WO_Mat, Send_Event, Print_RDS_Instruction, obj_RDS
|
||||
DECLARE SUBROUTINE Start_Window, Development_Services, Dialog_Box, SAP_Services, End_Window, Logging_Services, Rds_Services
|
||||
|
||||
@ -20,7 +20,7 @@ DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Send_Message, Po
|
||||
DECLARE FUNCTION obj_Tables, obj_Clean_Insp, obj_WO_Mat_QA, obj_RDS_Test, obj_WO_Mat, Signature_Services
|
||||
DECLARE FUNCTION obj_WO_Step, Security_Check, obj_RDS_Audit, obj_WM_In, Create_Dialog, obj_NCR, obj_WO_Mat, MemberOf
|
||||
DECLARE FUNCTION Start_Window, Database_Services, Development_Services, RDS_Services, RTI_Lock_Owner, Logging_Services
|
||||
DECLARE FUNCTION Environment_Services, Wafer_Counter_Services, Error_Services
|
||||
DECLARE FUNCTION Environment_Services, Wafer_Counter_Services, Error_Services, Hold_Services
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
|
||||
@ -309,6 +309,15 @@ Refresh:
|
||||
Set_Property( @WINDOW:'.VIEW_MOD_HIST', 'VISIBLE', 1 )
|
||||
END
|
||||
|
||||
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
|
||||
WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X', '')
|
||||
HoldCheck = Hold_Services('CheckForHold', WOMatKey, '')
|
||||
IF HoldCheck THEN
|
||||
Set_Property(@WINDOW:'.HOLD_BUTTON2','TEXT','Remove Hold')
|
||||
END ELSE
|
||||
Set_Property(@WINDOW:'.HOLD_BUTTON2','TEXT','Place on Hold')
|
||||
END
|
||||
|
||||
|
||||
* Wafers Accounting and update section
|
||||
|
||||
@ -1258,7 +1267,14 @@ FirstRead:
|
||||
* * * * * * *
|
||||
* Hooked from RDS (first wafer) screen
|
||||
|
||||
|
||||
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
|
||||
WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X', '')
|
||||
HoldCheck = Hold_Services('CheckForHold', WOMatKey, '')
|
||||
IF HoldCheck THEN
|
||||
Set_Property(@WINDOW:'.HOLD_BUTTON2','TEXT','Remove Hold')
|
||||
END ELSE
|
||||
Set_Property(@WINDOW:'.HOLD_BUTTON2','TEXT','Place on Hold')
|
||||
END
|
||||
|
||||
* * * * * * *
|
||||
FirstRefresh:
|
||||
@ -2031,6 +2047,7 @@ MoveMetToZone:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
HoldClick:
|
||||
* * * * * * *
|
||||
@ -2041,13 +2058,23 @@ HoldClick:
|
||||
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
Send_Event(@WINDOW,'CLEAR') ; // 12/21/2017 - DMB - Although WRITE normally clears the form, QBF mode will prevent the clear so do this explicitly so the lock is removed from the RDS record.
|
||||
|
||||
IF RDSNo NE '' then
|
||||
HoldEntity = 'RDS'
|
||||
HoldEntityID = RDSNo
|
||||
|
||||
obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEnt)
|
||||
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
//obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEnt)
|
||||
Transition = Hold_Services('CheckForHold', WOMatKey, CtrlEnt)
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEnt, '', HoldData, '')
|
||||
IF Error_Services("HasError") THEN
|
||||
ErrCode = Error_Services("GetMessage")
|
||||
ErrMsg(errCode)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:RDSNo)
|
||||
|
||||
@ -2072,10 +2099,24 @@ HoldDC:
|
||||
HistoryCols = Get_Property(CtrlEntID, "COLUMN")
|
||||
ColName = HistoryCols<1,1,CurrCol>
|
||||
|
||||
WOMatRec = Database_Services("ReadDataRow", "WO_MAT", WOMatKey, "", "", FALSE$)
|
||||
|
||||
obj_WO_Mat('EditHoldReason',WOMatKey:@RM:ColName:@RM:CurrRow)
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
IF INDEX(ColName,'START',1) THEN
|
||||
HoldStartReason = WOMatRec<WO_MAT_HOLD_START_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Start Reason':@FM:HoldStartReason)
|
||||
END ELSE
|
||||
IF INDEX(ColName,'STOP',1) THEN
|
||||
HoldStopReason = WOMatRec<WO_MAT_HOLD_STOP_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Stop Reason':@FM:HoldStopReason)
|
||||
END
|
||||
END
|
||||
|
||||
If UpdatedText NE 'Cancel' then
|
||||
Hold_Services("EditHoldReason",WOMatKey, ColName, CurrRow, UpdatedText)
|
||||
End
|
||||
IF Error_Services("NoError") NE TRUE$ THEN
|
||||
ErrMsg(Error_Services("GetMessage"))
|
||||
end
|
||||
Send_Event(CtrlEntID,'CALCULATE',CurrCol)
|
||||
|
||||
RETURN
|
||||
@ -2880,3 +2921,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -8,9 +8,9 @@ COMPILE FUNCTION Comm_WM_In(Instruction, Parm1,Parm2)
|
||||
|
||||
DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow, Send_Message
|
||||
DECLARE SUBROUTINE Btree.Extract, Send_Event, Security_Err_Msg, Forward_Event, End_Window, Start_Window
|
||||
DECLARE SUBROUTINE EditCell, obj_NCR, obj_Notes, obj_WO_Mat, obj_WO_Wfr, WM_IN_Services
|
||||
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists
|
||||
DECLARE FUNCTION Dialog_Box, obj_WO_Log, obj_NCR, MemberOf, WM_IN_Services
|
||||
DECLARE SUBROUTINE EditCell, obj_NCR, obj_Notes, obj_WO_Mat, obj_WO_Wfr, WM_IN_Services, Hold_Services, Error_Services
|
||||
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists, Error_Services
|
||||
DECLARE FUNCTION Dialog_Box, obj_WO_Log, obj_NCR, MemberOf, WM_IN_Services, Hold_Services, Database_Services
|
||||
|
||||
|
||||
$INSERT POPUP_EQUATES
|
||||
@ -27,6 +27,7 @@ $INSERT LSL_USERS_EQU
|
||||
$INSERT SECURITY_RIGHTS_EQU
|
||||
$INSERT NOTIFICATION_EQU
|
||||
$INSERT RTI_STYLE_EQUATES
|
||||
$INSERT LOGICAL
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
|
||||
@ -733,14 +734,26 @@ WONo = WMInKey[1,'*']
|
||||
CassNo = FIELD(WMInKey,'*',3)
|
||||
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
TableName = 'WM_IN'
|
||||
TableKey = WMInKey
|
||||
HoldEntity = 'WM_IN'
|
||||
HoldEntityID = WMInKey
|
||||
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
|
||||
obj_WO_Mat('ToggleHold',WOMatKey:@RM:TableName:@RM:TableKey) ;* 3/7/2008 JCH
|
||||
* obj_WO_Mat('ToggleHold',WOMatKey:@RM:TableName:@RM:TableKey) ;* 3/7/2008 JCH
|
||||
*
|
||||
* IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
Transition = Hold_Services('CheckForHold', WOMatKey, CtrlEnt)
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEnt, '', HoldData)
|
||||
IF Error_Services("HasError") THEN
|
||||
ErrCode = Error_Services("GetMessage")
|
||||
ErrMsg(errCode)
|
||||
end
|
||||
end
|
||||
|
||||
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WMInKey)
|
||||
|
||||
@ -769,8 +782,24 @@ CurrRow = CurrPos<2>
|
||||
HistoryCols = Get_Property(CtrlEntID, "COLUMN")
|
||||
ColName = HistoryCols<1,1,CurrCol>
|
||||
|
||||
obj_WO_Mat('EditHoldReason',WOMatKey:@RM:ColName:@RM:CurrRow) ;* 3/7/2008 JCH
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
WOMatRec = Database_Services("ReadDataRow", "WO_MAT", WOMatKey, "", "", FALSE$)
|
||||
|
||||
IF INDEX(ColName,'START',1) THEN
|
||||
HoldStartReason = WOMatRec<WO_MAT_HOLD_START_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Start Reason':@FM:HoldStartReason)
|
||||
END ELSE
|
||||
IF INDEX(ColName,'STOP',1) THEN
|
||||
HoldStopReason = WOMatRec<WO_MAT_HOLD_STOP_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Stop Reason':@FM:HoldStopReason)
|
||||
END
|
||||
END
|
||||
|
||||
If UpdatedText NE 'Cancel' then
|
||||
Hold_Services("EditHoldReason",WOMatKey, ColName, CurrRow, UpdatedText)
|
||||
End
|
||||
IF Error_Services("NoError") NE TRUE$ THEN
|
||||
ErrMsg(Error_Services("GetMessage"))
|
||||
end
|
||||
|
||||
Send_Event(CtrlEntID,'CALCULATE',CurrCol)
|
||||
|
||||
@ -794,3 +823,4 @@ Page:
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
@ -17,13 +17,13 @@ DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindo
|
||||
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 Logging_Services, Wo_Mat_Qa_Services, Error_Services, Post_Event, Wafer_Counter_Services
|
||||
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
|
||||
DECLARE FUNCTION Dialog_Box, obj_WO_Log, MemberOf, obj_NCR, Send_Message, MemberOf, obj_WM_Out, NextKey, obj_MUWafers
|
||||
DECLARE FUNCTION Start_Window, Database_Services, Error_Services, Obj_WO_Mat, Obj_RDS, obj_Clean_Insp,SRP_Array
|
||||
DECLARE FUNCTION Signature_Services, Environment_Services, Logging_Services, obj_Clean_Insp, Wm_Out_Services
|
||||
DECLARE FUNCTION Wafer_Counter_Services, Datetime
|
||||
DECLARE FUNCTION Wafer_Counter_Services, Datetime, Hold_Services
|
||||
|
||||
$INSERT POPUP_EQUATES
|
||||
$INSERT LOGICAL
|
||||
@ -1523,9 +1523,20 @@ HoldClick:
|
||||
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
|
||||
obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEnt) ;* 8/31/2010 JCH Added CtrlEnt
|
||||
//obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEnt) ;* 8/31/2010 JCH Added CtrlEnt
|
||||
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
* IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
Transition = Hold_Services('CheckForHold', WOMatKey, CtrlEnt)
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEnt, '', HoldData)
|
||||
IF Error_Services("HasError") THEN
|
||||
ErrCode = Error_Services("GetMessage")
|
||||
ErrMsg(errCode)
|
||||
end
|
||||
end
|
||||
|
||||
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WMOutKey)
|
||||
|
||||
@ -1554,8 +1565,24 @@ HoldDC:
|
||||
HistoryCols = Get_Property(CtrlEntID, "COLUMN")
|
||||
ColName = HistoryCols<1,1,CurrCol>
|
||||
|
||||
obj_WO_Mat('EditHoldReason',WOMatKey:@RM:ColName:@RM:CurrRow) ;* 3/7/2008 JCH
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
WOMatRec = Database_Services("ReadDataRow", "WO_MAT", WOMatKey, "", "", FALSE$)
|
||||
|
||||
IF INDEX(ColName,'START',1) THEN
|
||||
HoldStartReason = WOMatRec<WO_MAT_HOLD_START_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Start Reason':@FM:HoldStartReason)
|
||||
END ELSE
|
||||
IF INDEX(ColName,'STOP',1) THEN
|
||||
HoldStopReason = WOMatRec<WO_MAT_HOLD_STOP_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Stop Reason':@FM:HoldStopReason)
|
||||
END
|
||||
END
|
||||
|
||||
If UpdatedText NE 'Cancel' then
|
||||
Hold_Services("EditHoldReason",WOMatKey, ColName, CurrRow, UpdatedText)
|
||||
End
|
||||
IF Error_Services("NoError") NE TRUE$ THEN
|
||||
ErrMsg(Error_Services("GetMessage"))
|
||||
end
|
||||
|
||||
Send_Event(CtrlEntID,'CALCULATE',CurrCol)
|
||||
|
||||
@ -2198,3 +2225,4 @@ RefreshWaferCounterData:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -9,10 +9,10 @@ COMPILE FUNCTION Comm_WO_Mat(Instruction, Parm1,Parm2)
|
||||
|
||||
DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow, Send_Message
|
||||
DECLARE SUBROUTINE Btree.Extract, Send_Event, Security_Err_Msg, Forward_Event, End_Window, Start_Window
|
||||
DECLARE SUBROUTINE EditCell, obj_NCR, obj_Notes, obj_WO_Mat, obj_Tables, SAP_Services
|
||||
DECLARE SUBROUTINE EditCell, obj_NCR, obj_Notes, obj_WO_Mat, obj_Tables, SAP_Services, Hold_Services
|
||||
|
||||
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists
|
||||
DECLARE FUNCTION Dialog_Box, obj_WO_Log, obj_NCR, MemberOf, obj_Tables
|
||||
DECLARE FUNCTION Dialog_Box, obj_WO_Log, obj_NCR, MemberOf, obj_Tables, Error_Services, Hold_Services, Database_Services
|
||||
|
||||
|
||||
$INSERT POPUP_EQUATES
|
||||
@ -483,9 +483,21 @@ HoldClick:
|
||||
Set_Property(@WINDOW,'SAVEWARN',0)
|
||||
Send_Event(@WINDOW,'CLEAR')
|
||||
|
||||
obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEnt)
|
||||
* obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEnt)
|
||||
*
|
||||
* IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
Transition = Hold_Services('CheckForHold', WOMatKey, CtrlEnt)
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEnt, '', HoldData, '')
|
||||
IF Error_Services("HasError") THEN
|
||||
ErrCode = Error_Services("GetMessage")
|
||||
ErrMsg(errCode)
|
||||
end
|
||||
end
|
||||
|
||||
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
|
||||
|
||||
@ -515,11 +527,24 @@ HoldDC:
|
||||
ColName = HistoryCols<1,1,CurrCol>
|
||||
|
||||
Set_Property(@WINDOW,'SAVEWARN',0)
|
||||
Send_Event(@WINDOW,'CLEAR')
|
||||
WOMatRec = Database_Services("ReadDataRow", "WO_MAT", WOMatKey, "", "", FALSE$)
|
||||
|
||||
obj_WO_Mat('EditHoldReason',WOMatKey:@RM:ColName:@RM:CurrRow)
|
||||
IF INDEX(ColName,'START',1) THEN
|
||||
HoldStartReason = WOMatRec<WO_MAT_HOLD_START_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Start Reason':@FM:HoldStartReason)
|
||||
END ELSE
|
||||
IF INDEX(ColName,'STOP',1) THEN
|
||||
HoldStopReason = WOMatRec<WO_MAT_HOLD_STOP_REASON$,CurrRow>
|
||||
UpdatedText = Dialog_Box('DIALOG_TEXT',@WINDOW,'Hold Stop Reason':@FM:HoldStopReason)
|
||||
END
|
||||
END
|
||||
|
||||
IF Get_Status(errCode) THEN ErrMsg(errCode)
|
||||
If UpdatedText NE 'Cancel' then
|
||||
Hold_Services("EditHoldReason",WOMatKey, ColName, CurrRow, UpdatedText)
|
||||
End
|
||||
IF Error_Services("NoError") NE TRUE$ THEN
|
||||
ErrMsg(Error_Services("GetMessage"))
|
||||
end
|
||||
|
||||
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
|
||||
|
||||
@ -748,3 +773,4 @@ RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
238
LSL2/STPROC/HOLDS_API.txt
Normal file
238
LSL2/STPROC/HOLDS_API.txt
Normal file
@ -0,0 +1,238 @@
|
||||
Function Holds_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Holds_API
|
||||
|
||||
Description : API logic for the Holds resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Materials[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Holds.OnHold.POST
|
||||
- Holds.OffHold.POST
|
||||
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/06/24 djm Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
Declare function RDS_Services, WM_Out_Services, Oi_Wizard_Services, Memberof, Hold_Services, SRP_Stopwatch
|
||||
Declare subroutine Hold_Services, SRP_Stopwatch
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
API Holds.OnHold.POST
|
||||
* SRP_Stopwatch('Reset')
|
||||
* SRP_Stopwatch('Start', 'API Start')
|
||||
HoldData = ''
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
If Key EQ 'userID' then
|
||||
CurrUser = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
If ValidSession then
|
||||
StatusCode = ''
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
If SRP_JSON(objBody, 'Parse', Body) EQ '' then
|
||||
Key = SRP_JSON(objBody, 'GetValue', 'key')
|
||||
Reason = SRP_JSON(objBody, 'GetValue', 'reason')
|
||||
Extended = SRP_JSON(objBody, 'GetValue', 'extendedFlag')
|
||||
SRP_JSON(objBody, 'Release')
|
||||
end
|
||||
If Key NE '' AND Reason NE '' AND Extended NE '' then
|
||||
GoSub GetEntityType
|
||||
ReactorType = Xlate('WO_MAT', WOMatKey, 'REACTOR_TYPE_NO_CONV', 'X', '')
|
||||
If ReactorType NE 'EPP' AND ReactorType NE '' then
|
||||
If HoldEntity NE 'Invalid' then
|
||||
HoldData<1> = CurrUser
|
||||
HoldData<2> = Reason
|
||||
HoldData<3> = Extended
|
||||
HoldType = 'HOLD'
|
||||
* SRP_Stopwatch('Start', 'Service Start')
|
||||
Hold_Services("OnHold", WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, CurrUser)
|
||||
* SRP_Stopwatch('Stop', 'Service Start')
|
||||
If Error_Services('NoError') then
|
||||
HTTP_Services('SetResponseStatus', 200, 'Lot successfully placed on hold.')
|
||||
end else
|
||||
ErrorText = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 400, ErrorText)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Error. The record type could not be determined.')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 501, 'EpiPro lot holds are not currently supported by OIWizard. The OpenInsight user interface must be used in order to proceed..')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'The Key, Reason, or Extended property is missing.')
|
||||
end
|
||||
End else
|
||||
HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
end
|
||||
* SRP_Stopwatch('Stop', 'API Start')
|
||||
* Test = SRP_Stopwatch('GetAll')
|
||||
* debug
|
||||
end api
|
||||
|
||||
|
||||
API Holds.OffHold.POST
|
||||
|
||||
HoldData = ''
|
||||
Allowed = FALSE$
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
If Key EQ 'userID' then
|
||||
CurrUser = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
If ValidSession then
|
||||
If MemberOf(CurrUser, 'ENG_TECH') OR MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR') then Allowed = True$
|
||||
If Allowed NE FALSE$ then
|
||||
StatusCode = ''
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
If SRP_JSON(objBody, 'Parse', Body) EQ '' then
|
||||
Key = SRP_JSON(objBody, 'GetValue', 'key')
|
||||
Reason = SRP_JSON(objBody, 'GetValue', 'reason')
|
||||
SRP_JSON(objBody, 'Release')
|
||||
end
|
||||
If Key NE '' AND Reason NE ''then
|
||||
GoSub GetEntityType
|
||||
ReactorType = Xlate('WO_MAT', WOMatKey, 'REACTOR_TYPE_NO_CONV', 'X', '')
|
||||
If ReactorType NE 'EPP' AND ReactorType NE '' then
|
||||
If HoldEntity NE 'Invalid' then
|
||||
HoldData<1> = CurrUser
|
||||
HoldData<2> = Reason
|
||||
HoldData<3> = False$
|
||||
HoldType = 'HOLD'
|
||||
Hold_Services("OffHold", WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, CurrUser)
|
||||
If Error_Services('NoError') then
|
||||
HTTP_Services('SetResponseStatus', 200, 'Lot successfully taken off hold.')
|
||||
end else
|
||||
ErrorText = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 400, ErrorText)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Error. The record type could not be determined.')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 501, 'EpiPro lot holds are not currently supported by OIWizard. The OpenInsight user interface must be used in order to proceed..')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'The Key or Reason property is missing.')
|
||||
end
|
||||
End Else
|
||||
HTTP_Services('SetResponseStatus', 403, 'User is not permitted to access this resource.')
|
||||
end
|
||||
End else
|
||||
HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
GetEntityType:
|
||||
|
||||
WOMatKey = ''
|
||||
HoldEntity = ''
|
||||
HoldEntityID = Key
|
||||
Begin Case
|
||||
Case RowExists('RDS', HoldEntityID)
|
||||
EntityType = 'RDS'
|
||||
WOMatKey = Xlate(EntityType, HoldEntityID, 'WO_MAT_KEY', 'X', '')
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
HoldEntity = EntityType
|
||||
end else
|
||||
HoldEntity = 'Invalid'
|
||||
end
|
||||
Case RowExists('WM_IN', HoldEntityID)
|
||||
EntityType = 'WM_IN'
|
||||
WOMatKey = Xlate(EntityType, HoldEntityID, 'WO_MAT_KEY', 'X', '')
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
HoldEntity = EntityType
|
||||
end else
|
||||
HoldEntity = 'Invalid'
|
||||
end
|
||||
Case RowExists('WM_OUT', HoldEntityID)
|
||||
EntityType = 'WM_OUT'
|
||||
WOMatKey = Xlate(EntityType, HoldEntityID, 'WO_MAT_KEY', 'X', '')
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
HoldEntity = EntityType
|
||||
end else
|
||||
HoldEntity = 'Invalid'
|
||||
end
|
||||
Case RowExists('WO_MAT', HoldEntityID)
|
||||
WOMatKey = HoldEntityID
|
||||
EntityType = 'WO_MAT'
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
HoldEntity = EntityType
|
||||
end else
|
||||
HoldEntity = 'Invalid'
|
||||
end
|
||||
Case Otherwise$
|
||||
HoldEntity = 'Invalid'
|
||||
|
||||
End Case
|
||||
|
||||
return
|
||||
|
||||
|
767
LSL2/STPROC/HOLD_SERVICES.txt
Normal file
767
LSL2/STPROC/HOLD_SERVICES.txt
Normal file
@ -0,0 +1,767 @@
|
||||
Compile function Hold_Services(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Hols_Services
|
||||
|
||||
Description : Handler program for all Hold services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
6/28/24 djm Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert SERVICE_SETUP
|
||||
|
||||
$Insert MSG_EQUATES
|
||||
$Insert DICT_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$INSERT NOTIFICATION_EQU
|
||||
|
||||
|
||||
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
|
||||
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
|
||||
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
|
||||
Declare subroutine Wm_Out_Services, Rds_Services
|
||||
|
||||
GoToService else
|
||||
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
|
||||
end
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// ToggleHold
|
||||
//
|
||||
// WOMatKey - [Required]
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityID - [Required]
|
||||
// CtrlEntID - [Required]
|
||||
// OriginFlag - [Optional]
|
||||
// HoldData - [Optional]
|
||||
// OperatorID - [Optional]
|
||||
//
|
||||
// Toggles hold status from on to off, or from off to on.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ToggleHold(WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, HoldData, OperatorID)
|
||||
|
||||
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or CtrlEntID = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, CtrlEntID passed to service.')
|
||||
end else
|
||||
HoldCheck = Hold_Services("CheckForHold", WOMatKey, CtrlEntID)
|
||||
If Unassigned(OperatorID) then OperatorID = ''
|
||||
BEGIN CASE
|
||||
CASE INDEX(CtrlEntID,'SHIP_HOLD',1) ; HoldType = 'SHOLD' ; * Ship Hold
|
||||
CASE 1 ; HoldType = 'HOLD' ; * Production or Engineering Hold
|
||||
END CASE
|
||||
If Error_Services("NoError") then
|
||||
If HoldCheck = False$ then
|
||||
Hold_Services("OnHold", WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID)
|
||||
end else
|
||||
Hold_Services("OffHold", WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID)
|
||||
end
|
||||
If Error_Services("NoError") then
|
||||
Response = True$
|
||||
end else
|
||||
Response = Error_Services("GetMessage")
|
||||
end
|
||||
end else
|
||||
Response = Error_Services("GetMessage")
|
||||
end
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// ToggleMultipleHolds
|
||||
//
|
||||
// WOMatKeys - [Required] @FM delimited array, count must match HoldEntityIDs
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityIDs - [Required] @FM delimited, count must match WOMatKeys
|
||||
// CtrlEntID - [Required]
|
||||
// OriginFlag - [Optional]
|
||||
// HoldData - [Required]
|
||||
//
|
||||
// Toggles hold status for multiple lots from on to off, or from off to on.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ToggleMultipleHolds(WOMatKeys, HoldEntity, HoldEntityIDs, CtrlEntID, OriginFlag, HoldData)
|
||||
|
||||
IF WOMatKeys = '' or HoldEntity = '' or HoldEntityIDs = '' or CtrlEntID = '' or HoldData = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKeys, HoldEntity, HoldEntityIDs, CtrlEntID, or HoldData passed to service.')
|
||||
end else
|
||||
BEGIN CASE
|
||||
CASE INDEX(CtrlEntID,'SHIP_HOLD',1) ; HoldType = 'SHOLD' ; * Ship Hold
|
||||
CASE 1 ; HoldType = 'HOLD' ; * Production or Engineering Hold
|
||||
END CASE
|
||||
WOMatCount = DCount(WOMatKeys, @FM)
|
||||
HoldEntityCount = Dcount(HoldEntityIDs, @FM)
|
||||
Reason = HoldData<2>
|
||||
If WOMatCount NE HoldEntityCount then
|
||||
Error_Services('Add', 'WOMatKeys count must match HoldEntityIDs count.')
|
||||
end else
|
||||
For I = 1 to WOMatCount
|
||||
Hold_Services('ToggleHold', WOMatKeys<I>, HoldEntity, HoldEntityIDs<I>, CtrlEntID, OriginFlag, HoldData)
|
||||
If Error_Services("NoError") then
|
||||
Hold_Services("HoldNotification", HoldEntity, HoldEntityIDs<I>, Reason, HoldCheck, HoldType)
|
||||
end else
|
||||
Response = Error_Services("GetMessage")
|
||||
end
|
||||
Next I
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// EnableMultipleHolds
|
||||
//
|
||||
// WOMatKeys - [Required] @FM delimited array, count must match HoldEntityIDs
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityIDs - [Required] @FM delimited, count must match WOMatKeys
|
||||
// CtrlEntID - [Required]
|
||||
// OriginFlag - [Optional]
|
||||
// HoldData - [Required]
|
||||
//
|
||||
// Toggles hold status for multiple lots from off to on.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service EnableMultipleHolds(WOMatKeys, HoldEntity, HoldEntityIDs, CtrlEntID, OriginFlag, HoldData)
|
||||
|
||||
IF WOMatKeys = '' or HoldEntity = '' or HoldEntityIDs = '' or HoldData = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKeys, HoldEntity, HoldEntityIDs, CtrlEntID, or HoldData passed to service.')
|
||||
end else
|
||||
BEGIN CASE
|
||||
CASE INDEX(CtrlEntID,'SHIP_HOLD',1) ; HoldType = 'SHOLD' ; * Ship Hold
|
||||
CASE 1 ; HoldType = 'HOLD' ; * Production or Engineering Hold
|
||||
END CASE
|
||||
Reason = HoldData<2>
|
||||
WOMatCount = DCount(WOMatKeys, @FM)
|
||||
HoldEntityCount = Dcount(HoldEntityIDs, @FM)
|
||||
If WOMatCount NE HoldEntityCount then
|
||||
Error_Services('Add', 'WOMatKeys count must match HoldEntityIDs count.')
|
||||
end else
|
||||
If CtrlEntID EQ 'NDW_RDS_QUERY' OR CtrlEntID EQ 'NDW_WM_OUT_QUICK_QUERY' then
|
||||
Def = ""
|
||||
Def<MCAPTION$> = "Processing..."
|
||||
Def<MTYPE$ > = "G"
|
||||
Def<MEXTENT$> = HoldEntityCount
|
||||
Def<MTEXTWIDTH$> = 400
|
||||
Def<MCOL$> = -2 ;* message h-pos in pixels, or -2 (center screen, the default), -1 (center parent)
|
||||
Def<MROW$> = -2 ;* message v-pos in pixels
|
||||
MsgUp = Msg(@window, Def)
|
||||
end
|
||||
For I = 1 to WOMatCount
|
||||
If Hold_Services('CheckForHold', WOMatKeys<I>) EQ False$ then
|
||||
Hold_Services('OnHold', WOMatKeys<I>, HoldEntity, HoldEntityIDs<I>, HoldType, HoldData)
|
||||
* If Error_Services("NoError") then
|
||||
* Hold_Services("HoldNotification", HoldEntity, HoldEntityIDs<I>, Reason, True$, HoldType)
|
||||
* end else
|
||||
* Response = Error_Services("GetMessage")
|
||||
* end
|
||||
end
|
||||
If CtrlEntID EQ 'NDW_RDS_QUERY' OR CtrlEntID EQ 'NDW_WM_OUT_QUICK_QUERY' then Msg(@window, MsgUp, I, MSGINSTUPDATE$)
|
||||
Next I
|
||||
If CtrlEntID EQ 'NDW_RDS_QUERY' OR CtrlEntID EQ 'NDW_WM_OUT_QUICK_QUERY' then retval = Msg(@window, MsgUp) ;* take down the gauge
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// DisableMultipleHolds
|
||||
//
|
||||
// WOMatKeys - [Required] @FM delimited array, count must match HoldEntityIDs
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityIDs - [Required] @FM delimited, count must match WOMatKeys
|
||||
// CtrlEntID - [Required]
|
||||
// OriginFlag - [Optional]
|
||||
// HoldData - [Required]
|
||||
//
|
||||
// Toggles hold status for multiple lots from on to off.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service DisableMultipleHolds(WOMatKeys, HoldEntity, HoldEntityIDs, CtrlEntID, OriginFlag, HoldData)
|
||||
|
||||
IF WOMatKeys = '' or HoldEntity = '' or HoldEntityIDs = '' or HoldData = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKeys, HoldEntity, HoldEntityIDs, CtrlEntID, or HoldData passed to service.')
|
||||
end else
|
||||
BEGIN CASE
|
||||
CASE INDEX(CtrlEntID,'SHIP_HOLD',1) ; HoldType = 'SHOLD' ; * Ship Hold
|
||||
CASE 1 ; HoldType = 'HOLD' ; * Production or Engineering Hold
|
||||
END CASE
|
||||
WOMatCount = DCount(WOMatKeys, @FM)
|
||||
HoldEntityCount = Dcount(HoldEntityIDs, @FM)
|
||||
Reason = HoldData<2>
|
||||
If WOMatCount NE HoldEntityCount then
|
||||
Error_Services('Add', 'WOMatKeys count must match HoldEntityIDs count.')
|
||||
end else
|
||||
If CtrlEntID EQ 'NDW_RDS_QUERY' OR CtrlEntID EQ 'NDW_WM_OUT_QUICK_QUERY' then
|
||||
Def = ""
|
||||
Def<MCAPTION$> = "Processing..."
|
||||
Def<MTYPE$ > = "G"
|
||||
Def<MEXTENT$> = HoldEntityCount
|
||||
Def<MTEXTWIDTH$> = 400
|
||||
Def<MCOL$> = -2 ;* message h-pos in pixels, or -2 (center screen, the default), -1 (center parent)
|
||||
Def<MROW$> = -2 ;* message v-pos in pixels
|
||||
MsgUp = Msg(@window, Def)
|
||||
end
|
||||
For I = 1 to WOMatCount
|
||||
If Hold_Services('CheckForHold', WOMatKeys<I>) EQ True$ then
|
||||
Hold_Services('OffHold', WOMatKeys<I>, HoldEntity, HoldEntityIDs<I>, HoldType, HoldData)
|
||||
* If Error_Services("NoError") then
|
||||
* Hold_Services("HoldNotification", HoldEntity, HoldEntityIDs<I>, Reason, False$, HoldType)
|
||||
* end else
|
||||
* Response = Error_Services("GetMessage")
|
||||
* end
|
||||
end
|
||||
If CtrlEntID EQ 'NDW_RDS_QUERY' OR CtrlEntID EQ 'NDW_WM_OUT_QUICK_QUERY' then Msg(@window, MsgUp, I, MSGINSTUPDATE$)
|
||||
Next I
|
||||
If CtrlEntID EQ 'NDW_RDS_QUERY' OR CtrlEntID EQ 'NDW_WM_OUT_QUICK_QUERY' then retval = Msg(@window, MsgUp) ;* take down the gauge
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// OnHold
|
||||
//
|
||||
// WOMatKey - [Required]
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityID - [Required]
|
||||
// HoldType - [Required]
|
||||
// HoldData - [Optional]
|
||||
// OperatorID - [Optional]
|
||||
//
|
||||
// Places a lot on hold.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID)
|
||||
|
||||
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or HoldType = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, or HoldType passed to service.')
|
||||
end else
|
||||
If Hold_Services('CheckForHold', WOMatKey) EQ False$ then
|
||||
//Turn hold on
|
||||
CustInfo = XLATE('WO_MAT',WOMatKey,'CUST_NAME','X')
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey, '', '', '')
|
||||
If HoldData EQ '' then
|
||||
Begin Case
|
||||
Case OriginFlag EQ 'P' ;*Packaging form
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Packaging scanned data mismatch.'
|
||||
HoldData<3> = False$
|
||||
Case OriginFlag EQ 'PTO' ;*PTO/PSVER form
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'PTO/PSVER scanned data mismatch.'
|
||||
HoldData<3> = False$
|
||||
Case OriginFlag EQ 'H' ;*Auto-hold service
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Makeup box is older than three years.'
|
||||
HoldData<3> = False$
|
||||
End Case
|
||||
end
|
||||
UserID = HoldData<1>
|
||||
Reason = HoldData<2>
|
||||
Extended = HoldData<3>
|
||||
|
||||
CurrDate = OCONV(Date(),'D4/')
|
||||
CurrTime = OCONV(Time(),'MTS')
|
||||
CurrDTM = ICONV(CurrDate:' ':CurrTime,'DT')
|
||||
IF HoldType = 'HOLD' THEN
|
||||
|
||||
WOMatRec<WO_MAT_HOLD$> = 1
|
||||
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_START_DTM$,1,0,CurrDTM)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_START_USER$,1,0,UserID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_START_REASON$,1,0,Reason)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_EXTENDED$,1,0,Extended)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_STOP_DTM$,1,0,'')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_STOP_USER$,1,0,'')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_STOP_REASON$,1,0,'')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_ENTITY$,1,0,HoldEntity)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_HOLD_ENTITY_ID$,1,0,HoldEntityID)
|
||||
|
||||
***********************************************************
|
||||
|
||||
// - djs - 10/29/2019
|
||||
// Updated material log entry method to be more reliable.
|
||||
// Material log entries in quick succession were failing to be recorded.
|
||||
NumTimestamps = Dcount(WOMatRec<WO_MAT_INV_WH$>, @VM)
|
||||
NewEntryPos = NumTimestamps + 1
|
||||
CurrWH = WOMatRec<WO_MAT_INV_WH$, NewEntryPos - 1> ;* WH before hold
|
||||
CurrLoc = WOMatRec<WO_MAT_INV_LOCATION$, NewEntryPos - 1> ;* LOC before hold
|
||||
CurrTool = WOMatRec<WO_MAT_INV_TOOL_ID$, NewEntryPos - 1> ;* ToolID before hold
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_WH$, NewEntryPos, 0, CurrWH)
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_LOCATION$, NewEntryPos, 0, CurrLoc)
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_ACTION$, NewEntryPos, 0, 'HOLD_ON')
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_DTM$, NewEntryPos, 0, CurrDTM)
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_USER$, NewEntryPos, 0, UserID)
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_TAG$, NewEntryPos, 0, '')
|
||||
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_TOOL_ID$, NewEntryPos, 0, CurrTool)
|
||||
|
||||
END ELSE
|
||||
|
||||
WOMatRec<WO_MAT_SHIP_HOLD$> = 1
|
||||
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_START_DTM$,1,0,CurrDTM)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_START_USER$,1,0,UserID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_START_REASON$,1,0,Reason)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_EXTENDED$,1,0,Extended)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_STOP_DTM$,1,0,'')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_STOP_USER$,1,0,'')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_SHIP_HOLD_STOP_REASON$,1,0,'')
|
||||
END
|
||||
|
||||
IF HoldEntity = 'WM_OUT' THEN
|
||||
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'HOLD' ;* JCH 7/14/2009
|
||||
END
|
||||
|
||||
IF HoldEntity = 'WM_IN' THEN
|
||||
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'HOLD' ;* JCH 7/14/2009
|
||||
END
|
||||
|
||||
Database_Services("WriteDataRow", "WO_MAT", WOMatKey, WOMatRec, True$, False$, '')
|
||||
If Error_Services("NoError") then
|
||||
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
|
||||
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Lot is already on hold.')
|
||||
end
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// OffHold
|
||||
//
|
||||
// WOMatKey - [Required]
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityID - [Required]
|
||||
// HoldType - [Required]
|
||||
// HoldData - [Optional]
|
||||
// OperatorID - [Optional]
|
||||
//
|
||||
// Removes a hold placed on a lot.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID)
|
||||
|
||||
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or HoldType = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, or HoldType passed to service.')
|
||||
end else
|
||||
If OperatorID EQ '' then OperatorID = @USER4
|
||||
if MemberOf(OperatorID, 'ENG_TECH') OR MemberOf(OperatorID, 'LEAD') OR MemberOf(OperatorID, 'SUPERVISOR') then
|
||||
//Turn hold off
|
||||
If Hold_Services('CheckForHold', WOMatKey) EQ True$ then
|
||||
CustInfo = XLATE('WO_MAT',WOMatKey,'CUST_NAME','X')
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey, '', '', '')
|
||||
If HoldData EQ '' then
|
||||
Begin Case
|
||||
Case OriginFlag EQ 'P' ;*Packaging form
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Packaging scanned data mismatch.'
|
||||
HoldData<3> = False$
|
||||
Case OriginFlag EQ 'PTO' ;*PTO/PSVER form
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'PTO/PSVER scanned data mismatch.'
|
||||
HoldData<3> = False$
|
||||
Case OriginFlag EQ 'H' ;*Auto-hold service
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Makeup box is older than three years.'
|
||||
HoldData<3> = False$
|
||||
End Case
|
||||
end
|
||||
UserID = HoldData<1>
|
||||
Reason = HoldData<2>
|
||||
Extended = HoldData<3>
|
||||
|
||||
CurrDate = OCONV(Date(),'D4/')
|
||||
CurrTime = OCONV(Time(),'MTS')
|
||||
CurrDTM = ICONV(CurrDate:' ':CurrTime,'DT')
|
||||
IF HoldType = 'HOLD' THEN
|
||||
|
||||
WOMatRec<WO_MAT_HOLD$> = 0
|
||||
|
||||
WOMatRec<WO_MAT_HOLD_STOP_DTM$,1> = CurrDTM
|
||||
WOMatRec<WO_MAT_HOLD_STOP_USER$,1> = UserID
|
||||
WOMatRec<WO_MAT_HOLD_STOP_REASON$,1> = Reason
|
||||
WOMatRec<WO_MAT_HOLD_EXTENDED$,1> = 0
|
||||
|
||||
***********************************************************
|
||||
|
||||
LOCATE CurrDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE
|
||||
|
||||
IF Pos > 1 THEN
|
||||
CurrWH = WOMatRec<WO_MAT_INV_WH$,Pos-1> ;* WH before hold
|
||||
CurrLoc = WOMatRec<WO_MAT_INV_LOCATION$,Pos-1> ;* LOC before hold
|
||||
CurrTool = WOMatRec<WO_MAT_INV_TOOL_ID$,Pos-1> ;* ToolID before hold
|
||||
|
||||
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,CurrWH)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,CurrLoc)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_ACTION$,Pos,0,'HOLD_OFF')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_DTM$,Pos,0,CurrDTM)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_USER$,Pos,0,UserID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TAG$,Pos,0,'')
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TOOL_ID$,Pos,0,CurrTool)
|
||||
|
||||
END ;* End of check for Pos > 1 Rcvd is always the first transaction
|
||||
|
||||
END ;* End of DTM locate
|
||||
|
||||
**************************************************************
|
||||
|
||||
END ELSE
|
||||
WOMatRec<WO_MAT_SHIP_HOLD$> = 0
|
||||
|
||||
WOMatRec<WO_MAT_SHIP_HOLD_STOP_DTM$,1> = CurrDTM
|
||||
WOMatRec<WO_MAT_SHIP_HOLD_STOP_USER$,1> = UserID
|
||||
WOMatRec<WO_MAT_SHIP_HOLD_STOP_REASON$,1> = Reason
|
||||
WOMatRec<WO_MAT_SHIP_HOLD_EXTENDED$,1> = 0
|
||||
END
|
||||
|
||||
IF HoldEntity = 'WM_OUT' THEN
|
||||
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = obj_WM_Out('CurrStatus',HoldEntityID:@RM:@RM:WOMatRec)
|
||||
END
|
||||
|
||||
IF HoldEntity = 'WM_IN' THEN
|
||||
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = obj_WM_In('CurrStatus',HoldEntityID:@RM:@RM:WOMatRec)
|
||||
END
|
||||
|
||||
Database_Services("WriteDataRow", "WO_MAT", WOMatKey, WOMatRec, True$, False$, '')
|
||||
If Error_Services("NoError") then
|
||||
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
|
||||
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Lot is not on hold.')
|
||||
end
|
||||
end else
|
||||
Error_Services("Add", "User does not have permission to remove lot holds.")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
End Service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// CheckForHold
|
||||
//
|
||||
// WOMatKey - [Required]
|
||||
// CtrlEntID - [Optional]
|
||||
//
|
||||
// Returns whether or not a lot is on hold.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service CheckForHold(WOMatKey, CtrlEntID)
|
||||
|
||||
IF WOMatKey = '' THEN
|
||||
|
||||
Error_Services('Add', 'Null parameter WOMatKey passed to service.')
|
||||
|
||||
end else
|
||||
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey, '', '', '')
|
||||
|
||||
BEGIN CASE
|
||||
CASE INDEX(CtrlEntID,'SHIP_HOLD',1) ; HoldType = 'SHOLD' ; * Ship Hold
|
||||
CASE 1 ; HoldType = 'HOLD' ; * Production or Engineering Hold
|
||||
END CASE
|
||||
|
||||
IF HoldType = 'SHOLD' THEN
|
||||
HoldCheck = WOMatRec<WO_MAT_SHIP_HOLD$>
|
||||
END ELSE
|
||||
HoldCheck = WOMatRec<WO_MAT_HOLD$>
|
||||
END
|
||||
|
||||
If HoldCheck EQ '' then HoldCheck = False$
|
||||
|
||||
Response = HoldCheck
|
||||
|
||||
End
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// HoldNotification
|
||||
//
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityID - [Required]
|
||||
// Reason - [Required]
|
||||
// Transition - [Required]
|
||||
// HoldType - [Required]
|
||||
//
|
||||
// Notifies specified users of changes in lot holds.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service HoldNotification(HoldEntity, HoldEntityID, Reason, Transition, HoldType, OperatorID)
|
||||
|
||||
IF HoldEntity = '' or HoldEntityID = '' or Reason = '' or Transition = '' or HoldType = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, HoldType, or HoldData passed to service.')
|
||||
end else
|
||||
BEGIN CASE
|
||||
CASE HoldEntity = 'RDS'
|
||||
IF Transition EQ True$ THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Hold'
|
||||
END
|
||||
|
||||
AttachWindow = HoldEntity
|
||||
AttachKey = HoldEntityID
|
||||
|
||||
CASE HoldEntity = 'WO_MAT'
|
||||
IF Transition EQ True$ THEN
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Placed on Ship Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Ship Hold'
|
||||
END
|
||||
END ELSE
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Ship Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Ship Hold'
|
||||
END
|
||||
END
|
||||
|
||||
AttachWindow = HoldEntity
|
||||
AttachKey = HoldEntityID
|
||||
|
||||
|
||||
CASE HoldEntity = 'REACT_RUN'
|
||||
IF Transition EQ True$ THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Hold'
|
||||
END
|
||||
|
||||
AttachWindow = 'REACT_RUN'
|
||||
AttachKey = HoldEntityID
|
||||
|
||||
|
||||
CASE HoldEntity = 'WM_IN'
|
||||
|
||||
IF Transition EQ True$ THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Hold'
|
||||
END
|
||||
|
||||
AttachWindow = HoldEntity
|
||||
AttachKey = HoldEntityID
|
||||
|
||||
CASE HoldEntity = 'WM_OUT'
|
||||
IF Transition EQ True$ THEN
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Placed on Ship Hold ':HoldEntityID
|
||||
Message = 'Material Placed on Ship Hold'
|
||||
END
|
||||
END ELSE
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Hold'
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Ship Hold ':HoldEntityID
|
||||
Message = 'Material Taken off Ship Hold'
|
||||
END
|
||||
END
|
||||
|
||||
AttachWindow = HoldEntity
|
||||
AttachKey = HoldEntityID
|
||||
|
||||
END CASE
|
||||
Message := ' - ':Reason
|
||||
|
||||
IF HoldType = 'SHOLD' THEN
|
||||
|
||||
Recipients = XLATE('NOTIFICATION','SHIP_HOLD',NOTIFICATION_USER_ID$,'X')
|
||||
If OperatorID NE '' then
|
||||
SentFrom = OperatorID
|
||||
end else
|
||||
SentFrom = @USER4
|
||||
end
|
||||
|
||||
SendToGroup = ''
|
||||
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
END
|
||||
|
||||
Recipients = XLATE('NOTIFICATION','RDS_HOLD',NOTIFICATION_USER_ID$,'X')
|
||||
If OperatorID NE '' then
|
||||
SentFrom = OperatorID
|
||||
end else
|
||||
SentFrom = @USER4
|
||||
end
|
||||
|
||||
SendToGroup = ''
|
||||
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// EditHoldReason
|
||||
//
|
||||
// WOMatKey - [Required]
|
||||
// ColName - [Required]
|
||||
// ColValNo - [Required]
|
||||
// UpdatedText - [Required]
|
||||
//
|
||||
// Edits the reason for a lot's hold status.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service EditHoldReason(WOMatKey, ColName, ColValNo, UpdatedText)
|
||||
|
||||
IF WOMatKey = '' OR ColName = '' OR ColValNo = '' OR UpdatedText = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, ColName, ColValNo, or UpdatedText passed to service.')
|
||||
end else
|
||||
WOMatRec = Database_Services("ReadDataRow", "WO_MAT", WOMatKey, "", "", "")
|
||||
If Error_Services("NoError") then
|
||||
WOMatRec = Database_Services("ReadDataRow", "WO_MAT", WOMatKey, "", "", FALSE$)
|
||||
|
||||
IF INDEX(ColName,'START',1) THEN
|
||||
HoldStartReason = WOMatRec<WO_MAT_HOLD_START_REASON$,ColValNo>
|
||||
WOMatRec<WO_MAT_HOLD_START_REASON$,ColValNo> = UpdatedText
|
||||
END ELSE
|
||||
IF INDEX(ColName,'STOP',1) THEN
|
||||
HoldStopReason = WOMatRec<WO_MAT_HOLD_STOP_REASON$,ColValNo>
|
||||
WOMatRec<WO_MAT_HOLD_STOP_REASON$,ColValNo> = UpdatedText
|
||||
END
|
||||
END
|
||||
|
||||
Database_Services("WriteDataRow", "WO_MAT", WoMatKey, WOMatRec, "", "", "")
|
||||
end else
|
||||
Respose = Error_Services("GetMessage")
|
||||
end
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// CreateComment
|
||||
//
|
||||
// HoldEntity - [Required]
|
||||
// HoldEntityID - [Required]
|
||||
// Reason - [Required]
|
||||
// Transition - [Required]
|
||||
// HoldType - [Required]
|
||||
//
|
||||
// Creates a HoldEntity comment marking changes in lot holds.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service CreateComment(HoldEntity, HoldEntityID, Reason, Transition, HoldType, OperatorID)
|
||||
|
||||
IF HoldEntity = '' or HoldEntityID = '' or Reason = '' or Transition = '' or HoldType = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, HoldType, or HoldData passed to service.')
|
||||
end else
|
||||
BEGIN CASE
|
||||
|
||||
CASE HoldEntity = 'WO_MAT' OR HoldEntity = 'RDS'
|
||||
If HoldEntity = 'WO_MAT' then
|
||||
RDSNo = Xlate('WO_MAT', HoldEntityID, 'RDS_NO', 'X', '')
|
||||
end else
|
||||
RDSNo = HoldEntityID
|
||||
end
|
||||
IF Transition EQ True$ THEN
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END ELSE
|
||||
Subject = 'Material Placed on Ship Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END
|
||||
END ELSE
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Ship Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END
|
||||
END
|
||||
Subject := ' - ':Reason
|
||||
Rds_Services('AddComment', RDSNo, Subject, '')
|
||||
|
||||
|
||||
CASE HoldEntity = 'WM_IN'
|
||||
|
||||
IF Transition EQ True$ THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END
|
||||
Subject := ' - ':Reason
|
||||
Wm_In_Services('AddComment', HoldEntityID, Subject)
|
||||
|
||||
CASE HoldEntity = 'WM_OUT'
|
||||
IF Transition EQ True$ THEN
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Placed on Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END ELSE
|
||||
Subject = 'Material Placed on Ship Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END
|
||||
END ELSE
|
||||
IF HoldType = 'HOLD' THEN
|
||||
Subject = 'Material Taken off Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END ELSE
|
||||
Subject = 'Material Taken off Ship Hold ':HoldEntityID : ' by user ': OperatorID
|
||||
END
|
||||
END
|
||||
Subject := ' - ':Reason
|
||||
Wm_Out_Services('AddComment', HoldEntityID, Subject)
|
||||
END CASE
|
||||
end
|
||||
|
||||
end service
|
||||
|
@ -42,7 +42,8 @@ $insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
Declare function RDS_Services, WM_Out_Services
|
||||
Declare function RDS_Services, WM_Out_Services, Oi_Wizard_Services, Memberof, Hold_Services
|
||||
Declare subroutine Hold_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
@ -131,3 +132,4 @@ CreateHALItem:
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
@ -33,7 +33,7 @@ $Insert WO_LOG_EQUATES
|
||||
|
||||
Declare function Scan_Services, Memory_Services, Database_Services, SRP_JSON, RTI_CreateGUID, Memberof, obj_WO_Mat
|
||||
Declare function Get_Property, RDS_Services, EpiPro_Services, DateTime, Signature_Services, Material_Movement_Services
|
||||
Declare subroutine Scan_Services, Memory_Services, Database_Services, SRP_JSON, Security_Services
|
||||
Declare subroutine Scan_Services, Memory_Services, Database_Services, SRP_JSON, Security_Services, Hold_Services
|
||||
Declare subroutine obj_WO_Mat_Log, obj_WO_Mat, Set_Status, SAP_Services, Obj_Notes, Print_SAP_Cass_Ship_Label
|
||||
|
||||
GoToService else
|
||||
@ -597,8 +597,9 @@ ToggleLotHold:
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
OriginFlag = 'PTO' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:OriginFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:OriginFlag:@RM:OperatorID
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, '', OperatorID)
|
||||
|
||||
// Check if second cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in Cassette2
|
||||
@ -661,7 +662,8 @@ ToggleLotHold:
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
OriginFlag = 'PTO' ;* Flag to indicate a hold initiated from the packaging form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:OriginFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, '', OperatorID)
|
||||
end
|
||||
|
||||
gosub SendPTOMismatchNotification
|
||||
@ -694,3 +696,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ Declare function Logging_Services, Environment_Services, Datetime, obj_WO_Ste
|
||||
Declare function SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, obj_Shipment, SRP_Date
|
||||
Declare subroutine Material_Services, Memory_Services, Database_Services, SRP_Array, Btree.Extract, Logging_Services
|
||||
Declare subroutine SRP_Stopwatch, Set_Status, RList, Work_Order_Services, SQL_Services, obj_WO_Mat, obj_Notes
|
||||
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log
|
||||
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, Hold_Services
|
||||
|
||||
UseMakeupWafersTable = Database_Services('ReadDataRow', 'APP_INFO', 'USE_MAKEUP_WAFERS_TABLE')
|
||||
If UseMakeupWafersTable EQ '' then UseMakeupWafersTable = False$
|
||||
@ -133,19 +133,39 @@ Service GetLotHistory(IDType=IDType, LotID, StartDate, EndDate)
|
||||
RDSNo = WOMatRow<WO_MAT_RDS_NO$>
|
||||
RDSRow = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
|
||||
// Get RDS Comments
|
||||
CommentDates = RDSRow<RDS_COMMENT_DATE$>
|
||||
CommentUsers = RDSRow<RDS_COMMENT_USER$>
|
||||
Comments = RDSRow<RDS_COMMENT_NOTE$>
|
||||
CommentList = CommentDates :@FM: CommentUsers :@FM:@FM: Comments
|
||||
CommentArray = SRP_Rotate_Array(CommentList)
|
||||
|
||||
CommentCount = DCount(CommentArray, @FM)
|
||||
For I = 1 to CommentCount
|
||||
ThisComment = CommentArray<I, 4>
|
||||
Begin Case
|
||||
Case IndexC(ThisComment, 'Material Taken off Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_OFF'
|
||||
|
||||
Case IndexC(ThisComment, 'Material Placed on Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_ON'
|
||||
End Case
|
||||
Next I
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
// Remove Hold Inventory actions from array because they are populated from RDS commments.
|
||||
Locate 'HOLD_OFF' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
Locate 'HOLD_ON' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
|
||||
end else
|
||||
// RDS is default IDType
|
||||
// Open RDS and WO_MAT records
|
||||
@ -153,19 +173,38 @@ Service GetLotHistory(IDType=IDType, LotID, StartDate, EndDate)
|
||||
WOMatKey = Xlate('RDS', LotID, 'WO_MAT_KEY', 'X')
|
||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
|
||||
// Get RDS Comments
|
||||
CommentDates = RDSRow<RDS_COMMENT_DATE$>
|
||||
CommentUsers = RDSRow<RDS_COMMENT_USER$>
|
||||
Comments = RDSRow<RDS_COMMENT_NOTE$>
|
||||
CommentList = CommentDates :@FM: CommentUsers :@FM:@FM: Comments
|
||||
CommentArray = SRP_Rotate_Array(CommentList)
|
||||
|
||||
CommentCount = DCount(CommentArray, @FM)
|
||||
For I = 1 to CommentCount
|
||||
ThisComment = CommentArray<I, 4>
|
||||
Begin Case
|
||||
Case IndexC(ThisComment, 'Material Taken off Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_OFF'
|
||||
|
||||
Case IndexC(ThisComment, 'Material Placed on Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_ON'
|
||||
End Case
|
||||
Next I
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
// Remove Hold Inventory actions from array because they are populated from RDS commments.
|
||||
Locate 'HOLD_OFF' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
Locate 'HOLD_ON' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
end
|
||||
// Add Comments if present
|
||||
If CommentArray NE '' then
|
||||
@ -176,7 +215,6 @@ Service GetLotHistory(IDType=IDType, LotID, StartDate, EndDate)
|
||||
// Sort by Date
|
||||
SortedLotArray = SRP_Array('SortRows', LotArray, 'D1', 'LIST')
|
||||
|
||||
|
||||
// Convert DateTimes to External
|
||||
RowCount = Dcount(SortedLotArray, @FM)
|
||||
If StartDate NE '' AND EndDate NE '' then
|
||||
@ -248,7 +286,8 @@ Service ProcessAutoHold()
|
||||
HoldList<-1> = ReactType:TAB$:HoldEntityID
|
||||
OnHold = Xlate(HoldEntity, HoldEntityID, 'HOLD', 'X')
|
||||
If OnHold NE True$ then
|
||||
obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'':@RM:'H':@RM:'SYSTEM')
|
||||
//obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'':@RM:'H':@RM:'SYSTEM')
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, '', 'H', '', 'SYSTEM')
|
||||
end
|
||||
|
||||
LogData = ''
|
||||
@ -1291,3 +1330,4 @@ ClearCursors:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -43,8 +43,9 @@ $insert SUPPLEMENTS_EQUATES
|
||||
|
||||
equ WOCust$ to 2
|
||||
|
||||
Declare subroutine SRP_Show_Window, Rds_Services, ErrMsg, Start_Window, Placedialog, Supplement_Services
|
||||
Declare subroutine SRP_Show_Window, Rds_Services, ErrMsg, Start_Window, Placedialog, Supplement_Services, Hold_Services
|
||||
Declare function Database_Services, Material_Services, Rds_Services, RGB, SRP_Array, MemberOf, Supplement_Services
|
||||
Declare function Hold_Services
|
||||
|
||||
CRLF = \0D0A\
|
||||
|
||||
@ -236,6 +237,72 @@ Event PUB_ENG_OPTIONS.CLICK()
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_ON_HOLD.CLICK()
|
||||
|
||||
SelPos = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos')
|
||||
SelCount = Dcount(SelPos, @VM)
|
||||
SelRDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
|
||||
SelRDSList = SRP_Array('Rotate', SelRDSList, @FM, @VM)
|
||||
RDSKeys = SelRDSList<4>
|
||||
Swap @VM with @FM in RDSKeys
|
||||
SelCount = DCount(RDSKeys, @FM)
|
||||
WOMatKeys = Xlate('RDS', RDSKeys, 'WO_MAT_KEY', 'X', '')
|
||||
Transition = True$
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
GoSub GetView
|
||||
Hold_Services('EnableMultipleHolds', WOMatKeys, 'RDS', RDSKeys, 'NDW_RDS_QUERY', '', HoldData)
|
||||
For L = 1 to SelCount
|
||||
ThisPos = SelPos<L>
|
||||
If CurrentViewSelection _EQC 'quick' then
|
||||
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.ItemValue[16;' : ThisPos : ']', 'On Hold')
|
||||
end else
|
||||
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.ItemValue[19;' : ThisPos : ']', 'On Hold')
|
||||
end
|
||||
Next L
|
||||
HoldOffFlag = True$
|
||||
HoldOnFlag = False$
|
||||
Gosub CheckSelectedForHolds
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_OFF_HOLD.CLICK()
|
||||
|
||||
SelPos = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelPos')
|
||||
SelCount = Dcount(SelPos, @VM)
|
||||
SelRDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
|
||||
SelRDSList = SRP_Array('Rotate', SelRDSList, @FM, @VM)
|
||||
RDSKeys = SelRDSList<4>
|
||||
Swap @VM with @FM in RDSKeys
|
||||
SelCount = DCount(RDSKeys, @FM)
|
||||
WOMatKeys = Xlate('RDS', RDSKeys, 'WO_MAT_KEY', 'X', '')
|
||||
Transition = False$
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
GoSub GetView
|
||||
Hold_Services('DisableMultipleHolds', WOMatKeys, 'RDS', RDSKeys, 'NDW_RDS_QUERY', '', HoldData)
|
||||
For L = 1 to SelCount
|
||||
ThisPos = SelPos<L>
|
||||
If CurrentViewSelection _EQC 'quick' then
|
||||
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.ItemValue[16;' : ThisPos : ']', 'Off Hold')
|
||||
end else
|
||||
Set_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.ItemValue[19;' : ThisPos : ']', 'Off Hold')
|
||||
end
|
||||
Next L
|
||||
HoldOffFlag = False$
|
||||
HoldOnFlag = True$
|
||||
Gosub CheckSelectedForHolds
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event OLE_SUBCLASS.OnComboClick(CtrlId, Sel, Value)
|
||||
|
||||
Send_Event(CtrlId, 'LOSTFOCUS')
|
||||
@ -250,6 +317,9 @@ Event OLE_RPT_RDS_LIST.OnSelChange()
|
||||
Enabled = (SelRDSList NE '')
|
||||
Set_Property(@Window:'.PUB_ENG_OPTIONS', 'ENABLED', Enabled)
|
||||
end
|
||||
HoldOnFlag = False$
|
||||
HoldOffFlag = False$
|
||||
Gosub CheckSelectedForHolds
|
||||
|
||||
end event
|
||||
|
||||
@ -404,6 +474,7 @@ GetRdsColumns:
|
||||
RDSColumns<0, 13> = 'PART_NUM'
|
||||
RDSColumns<0, 14> = 'LOT_NUM'
|
||||
RDSColumns<0, 15> = 'SUPPL_INST'
|
||||
RDSColumns<0, 16> = 'HOLD_STATUS'
|
||||
end else
|
||||
RDSColumns = ''
|
||||
RDSColumns<0, 1> = 'ABBREV_OR_CO_NAME'
|
||||
@ -452,6 +523,7 @@ GetColumnList:
|
||||
ColumnList<13> = 'Cust Part No' : @VM : 'TEXT' : @VM : 75 : @VM : @VM : @VM : @VM : @VM : @VM : 75 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
ColumnList<14> = 'Lot Number' : @VM : 'TEXT' : @VM : 80 : @VM : @VM : @VM : @VM : @VM : @VM : 75 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
ColumnList<15> = 'Supplement' : @VM : 'P' : @VM : 160 : @VM : @VM : @VM : @VM : @VM : @VM : 75 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
ColumnList<16> = 'Hold Status' : @VM : 'TEXT' : @VM : 75 : @VM : @VM : @VM : @VM : @VM : @VM : 40 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
end else
|
||||
ColumnList = ''
|
||||
ColumnList<1> = 'Customer' : @VM : 'TEXT' : @VM : 120 : @VM : @VM : @VM : @VM : @VM : @VM : 50 : @VM : 'Left' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
@ -520,3 +592,39 @@ GetExistingSupps:
|
||||
|
||||
return
|
||||
|
||||
|
||||
CheckSelectedForHolds:
|
||||
|
||||
If Unassigned(HoldOnFlag) then HoldOnFlag = False$
|
||||
If Unassigned(HoldOffFlag) then HoldOffFlag = False$
|
||||
SelRDSList = Get_Property(@Window : '.OLE_RPT_RDS_LIST', 'OLE.SelList')
|
||||
If SelRDSList NE '' then
|
||||
SelRDSList = SRP_Array('Rotate', SelRDSList, @FM, @VM)
|
||||
RDSKeys = SelRDSList<4>
|
||||
Swap @VM with @FM in RDSKeys
|
||||
SelCount = DCount(RDSKeys, @FM)
|
||||
|
||||
For K = 1 to SelCount
|
||||
WOMatKey = Xlate('RDS', RDSKeys<K>, 'WO_MAT_KEY', 'X', '')
|
||||
HoldCheck = Hold_Services('CheckForHold', WOMatKey, '')
|
||||
If HoldCheck EQ True$ AND HoldOffFlag EQ False$ then
|
||||
HoldOffFlag = True$
|
||||
end
|
||||
If HoldCheck EQ False$ AND HoldOnFlag EQ False$ then
|
||||
HoldOnFlag = True$
|
||||
end
|
||||
Until HoldOnFlag EQ True$ and HoldOffFlag EQ True$
|
||||
Next K
|
||||
end
|
||||
if MemberOf(@USER4, 'ENG_TECH') OR MemberOf(@USER4, 'LEAD') OR MemberOf(@USER4, 'SUPERVISOR') then
|
||||
// IF ANY SELECTED LOTS ARE ON HOLD, ENABLE PUB_OFF_HOLD
|
||||
Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', HoldOffFlag)
|
||||
end else
|
||||
Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', False$)
|
||||
end
|
||||
// IF ANY SELECTED LOTS ARE NOT ON HOLD, ENABLE PUB_ON_HOLD
|
||||
Set_Property(@Window:'.PUB_ON_HOLD', 'ENABLED', HoldOnFlag)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -38,8 +38,8 @@ $insert EVENT_SETUP
|
||||
$insert WO_MAT_EQUATES
|
||||
$insert MSG_EQUATES
|
||||
|
||||
Declare subroutine SRP_Show_Window, ErrMsg, Error_Services
|
||||
Declare function Database_Services, WM_Out_Services, RGB, SRP_Array, MemberOf, Error_Services
|
||||
Declare subroutine SRP_Show_Window, ErrMsg, Error_Services, Hold_Services
|
||||
Declare function Database_Services, WM_Out_Services, RGB, SRP_Array, MemberOf, Error_Services, Hold_Services
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
@ -76,6 +76,7 @@ Event WINDOW.CREATE(CreateParam)
|
||||
WMOColumns<0, 5> = 'EPI_REACT_NO'
|
||||
WMOColumns<0, 6> = 'SUP_VER_SIG_DTM'
|
||||
WMOColumns<0, 7> = 'PART_NO'
|
||||
WMOColumns<0, 8> = 'HOLD'
|
||||
|
||||
Swap @VM with @FM in CreateParam
|
||||
Begin Case
|
||||
@ -137,6 +138,88 @@ Event PUB_OK.CLICK()
|
||||
|
||||
end event
|
||||
|
||||
Event PUB_ON_HOLD.CLICK()
|
||||
|
||||
SelPos = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelPos')
|
||||
SelCount = Dcount(SelPos, @VM)
|
||||
* SelWMOList = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelList')
|
||||
* SelWMOList = SRP_Array('Rotate', SelWMOList, @FM, @VM)
|
||||
WMOutKeys = ''
|
||||
SelWMOList = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelList')
|
||||
SelWMOList = SRP_Array('Rotate', SelWMOList, @FM, @VM)
|
||||
SelWO = SelWMOList<2>
|
||||
SelStep = SelWMOList<3>
|
||||
SelCass = SelWMOList<4>
|
||||
WOMatKeys = ''
|
||||
If SelWO NE '' then
|
||||
For each WONo in SelWO using @VM setting vPos
|
||||
WOMatKeys<0, -1> = WONo:'*':SelCass<0 , vPos>
|
||||
WMOutKeys<0, -1> = WONo:'*':SelStep<0 , vPos> :'*': SelCass<0 , vPos>
|
||||
Next WONo
|
||||
end
|
||||
Swap @VM with @FM in WMOutKeys
|
||||
Swap @VM with @FM in WOMAtKeys
|
||||
SelCount = DCount(WMOutKeys, @FM)
|
||||
* WOMatKeys = Xlate('WM_OUT', WMOutKeys, 'WO_MAT_KEY', 'X', '')
|
||||
Transition = True$
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
Hold_Services('EnableMultipleHolds', WOMatKeys, 'WM_OUT', WMOutKeys, 'NDW_WM_OUT_QUICK_QUERY', '', HoldData)
|
||||
For L = 1 to SelCount
|
||||
ThisPos = SelPos<L>
|
||||
Set_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.ItemValue[8;' : ThisPos : ']', 'On Hold')
|
||||
Next L
|
||||
HoldOffFlag = True$
|
||||
HoldOnFlag = False$
|
||||
Gosub CheckSelectedForHolds
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_OFF_HOLD.CLICK()
|
||||
|
||||
SelPos = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelPos')
|
||||
SelCount = Dcount(SelPos, @VM)
|
||||
* SelWMOList = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelList')
|
||||
* SelWMOList = SRP_Array('Rotate', SelWMOList, @FM, @VM)
|
||||
WMOutKeys = ''
|
||||
SelWMOList = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelList')
|
||||
SelWMOList = SRP_Array('Rotate', SelWMOList, @FM, @VM)
|
||||
SelWO = SelWMOList<2>
|
||||
SelStep = SelWMOList<3>
|
||||
SelCass = SelWMOList<4>
|
||||
WOMatKeys = ''
|
||||
If SelWO NE '' then
|
||||
For each WONo in SelWO using @VM setting vPos
|
||||
WOMatKeys<0, -1> = WONo:'*':SelCass<0 , vPos>
|
||||
WMOutKeys<0, -1> = WONo:'*':SelStep<0 , vPos> :'*': SelCass<0 , vPos>
|
||||
Next WONo
|
||||
end
|
||||
Swap @VM with @FM in WMOutKeys
|
||||
Swap @VM with @FM in WOMAtKeys
|
||||
SelCount = DCount(WMOutKeys, @FM)
|
||||
* WOMatKeys = Xlate('WM_OUT', WMOutKeys, 'WO_MAT_KEY', 'X', '')
|
||||
Transition = True$
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
Hold_Services('DisableMultipleHolds', WOMatKeys, 'WM_OUT', WMOutKeys, 'NDW_WM_OUT_QUICK_QUERY', '', HoldData)
|
||||
For L = 1 to SelCount
|
||||
ThisPos = SelPos<L>
|
||||
Set_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.ItemValue[8;' : ThisPos : ']', 'Off Hold')
|
||||
Next L
|
||||
HoldOffFlag = False$
|
||||
HoldOnFlag = True$
|
||||
Gosub CheckSelectedForHolds
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
@ -251,6 +334,9 @@ Event OLE_RPT_WM_OUT_LIST.OnSelChange()
|
||||
Enabled = (SelWMOList NE '')
|
||||
Set_Property(@Window:'.PUB_ENG_OPTIONS', 'ENABLED', Enabled)
|
||||
end
|
||||
HoldOnFlag = False$
|
||||
HoldOffFlag = False$
|
||||
Gosub CheckSelectedForHolds
|
||||
|
||||
end event
|
||||
|
||||
@ -281,6 +367,7 @@ Setup_OLE_Controls:
|
||||
ColumnList<5> = 'Rx' : @VM : 'NUMBER' : @VM : 10 : @VM : @VM : @VM : @VM : @VM : @VM : 10 : @VM : 'Center' : @VM : @VM : '#######' : @VM : @VM : 'Segoe UI,9'
|
||||
ColumnList<6> = 'FQA Sig' : @VM : 'TEXT' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 20 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
ColumnList<7> = 'Cust Part No' : @VM : 'TEXT' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 20 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
ColumnList<8> = 'Hold Status' : @VM : 'TEXT' : @VM : 30 : @VM : @VM : @VM : @VM : @VM : @VM : 20 : @VM : 'Center' : @VM : @VM : @VM : @VM : 'Segoe UI,9'
|
||||
|
||||
Set_Property(WMORptCtrl, 'OLE.ColumnList', ColumnList)
|
||||
Set_Property(WMORptCtrl, 'OLE.MultiSelect', 2) ; // 2 = Multiselect Toggle Mode
|
||||
@ -313,6 +400,7 @@ Setup_OLE_Controls:
|
||||
FormSize<3> = Oconv(MaxClientWidth * '0.9', 'MD0')
|
||||
end
|
||||
Set_Property(@Window, '@ORIGSIZE', FormSize)
|
||||
Gosub CheckSelectedForHolds
|
||||
// Pull then save original list after formatting for savewarn purposes
|
||||
Set_Property(WMORptCtrl, 'OLE.List', WMOList)
|
||||
WMOList = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.List')
|
||||
@ -344,3 +432,48 @@ RefreshRowColors:
|
||||
Set_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelPos', SelPos)
|
||||
|
||||
return
|
||||
|
||||
CheckSelectedForHolds:
|
||||
|
||||
If Unassigned(HoldOnFlag) then HoldOnFlag = False$
|
||||
If Unassigned(HoldOffFlag) then HoldOffFlag = False$
|
||||
SelWMOList = Get_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.SelList')
|
||||
If SelWMOList NE '' then
|
||||
SelWMOList = SRP_Array('Rotate', SelWMOList, @FM, @VM)
|
||||
* WMOutKeys = SelWMOList<4>
|
||||
HoldStatuses = SelWMOList<8>
|
||||
* Swap @VM with @FM in WMOutKeys
|
||||
* SelCount = DCount(WMOutKeys, @FM)
|
||||
|
||||
Swap @VM with @FM in HoldStatuses
|
||||
SelCount = DCount(HoldStatuses, @FM)
|
||||
|
||||
For K = 1 to SelCount
|
||||
* WOMatKey = Xlate('WM_OUT', WMOutKeys<K>, 'WO_MAT_KEY', 'X', '')
|
||||
* HoldCheck = Hold_Services('CheckForHold', WOMatKey, '')
|
||||
HoldText = HoldStatuses<K>
|
||||
If HoldText = 'On Hold' then
|
||||
HoldCheck = True$
|
||||
end else
|
||||
HoldCheck = False$
|
||||
end
|
||||
If HoldCheck EQ True$ AND HoldOffFlag EQ False$ then
|
||||
HoldOffFlag = True$
|
||||
end
|
||||
If HoldCheck EQ False$ AND HoldOnFlag EQ False$ then
|
||||
HoldOnFlag = True$
|
||||
end
|
||||
Until HoldOnFlag EQ True$ and HoldOffFlag EQ True$
|
||||
Next K
|
||||
end
|
||||
if MemberOf(@USER4, 'ENG_TECH') OR MemberOf(@USER4, 'LEAD') OR MemberOf(@USER4, 'SUPERVISOR') then
|
||||
// IF ANY SELECTED LOTS ARE ON HOLD, ENABLE PUB_OFF_HOLD
|
||||
Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', HoldOffFlag)
|
||||
end else
|
||||
Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', False$)
|
||||
end
|
||||
// IF ANY SELECTED LOTS ARE NOT ON HOLD, ENABLE PUB_ON_HOLD
|
||||
Set_Property(@Window:'.PUB_ON_HOLD', 'ENABLED', HoldOnFlag)
|
||||
|
||||
return
|
||||
|
||||
|
@ -15,8 +15,9 @@ COMPILE FUNCTION obj_Notes(Method,Parms)
|
||||
*/
|
||||
|
||||
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, SRP_Send_Mail, obj_Calendar, Database_Services
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, SRP_Send_Mail, obj_Calendar, Database_Services, SRP_Stopwatch
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, obj_Notes_Sent, Btree.Extract, Send_Info, obj_Notes
|
||||
Declare subroutine Obj_Post_Log, SRP_Stopwatch
|
||||
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT NOTES_EQU
|
||||
@ -50,6 +51,7 @@ BEGIN CASE
|
||||
CASE Method = 'PostEMail' ; GOSUB PostEMail
|
||||
CASE Method = 'ForwardEMail' ; GOSUB ForwardEMail
|
||||
CASE Method = 'EMail' ; GOSUB EMail
|
||||
CASE Method = 'BulkCreate' ; GOSUB BulkCreate
|
||||
CASE 1
|
||||
ErrorMsg = 'Unknown Method ':QUOTE(Method):' passed to object.'
|
||||
|
||||
@ -410,7 +412,7 @@ RETURN
|
||||
* * * * * * *
|
||||
ForwardEMail:
|
||||
* * * * * * *
|
||||
debug
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
ServiceKeyID = 'Obj_Notes*ForwardEMail'
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
@ -593,4 +595,163 @@ NEXT I ;* End of Recipient Loop
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
BulkCreate:
|
||||
* * * * * * *
|
||||
* SRP_Stopwatch('Reset')
|
||||
Recipients = Parms[1,@RM]
|
||||
SentFrom = Parms[COL2()+1,@RM]
|
||||
Subject = Parms[COL2()+1,@RM]
|
||||
Message = Parms[COL2()+1,@RM]
|
||||
AttachWindow = Parms[COL2()+1,@RM]
|
||||
AttachKeys = Parms[COL2()+1,@RM]
|
||||
SendToGroup = Parms[COL2()+1,@RM]
|
||||
|
||||
IF NOT(ASSIGNED(Recipients)) THEN ErrorMsg = 'Unassigned Parameter "Recipients" passed to object. (':Method:')'
|
||||
IF NOT(ASSIGNED(SentFrom)) THEN ErrorMsg = 'Unassigned Parameter "SentFrom" passed to object. (':Method:')'
|
||||
IF NOT(ASSIGNED(Subject)) THEN ErrorMsg = 'Unassigned Parameter "Subject" passed to object. (':Method:')'
|
||||
IF NOT(ASSIGNED(Message)) THEN ErrorMsg = 'Unassigned Parameter "Message" passed to object. (':Method:')'
|
||||
|
||||
IF NOT(ASSIGNED(AttachWindow)) THEN AttachWindow = ''
|
||||
IF NOT(ASSIGNED(AttachKeys)) THEN AttachKeys = ''
|
||||
IF NOT(ASSIGNED(SendToGroup)) THEN SendToGroup = ''
|
||||
|
||||
IF ErrorMsg NE '' THEN RETURN
|
||||
|
||||
thisRecipients = ''
|
||||
RecipCnt = 0
|
||||
|
||||
FOR I = 1 TO COUNT(Recipients,@VM) + (Recipients NE '')
|
||||
Recipient = Recipients<1,I>
|
||||
IF Recipient NE '' THEN
|
||||
LOCATE Recipient IN thisRecipients USING @VM SETTING Pos ELSE
|
||||
thisRecipients = INSERT(thisRecipients,1,Pos,0,Recipient)
|
||||
RecipCnt += 1
|
||||
END
|
||||
END
|
||||
NEXT I
|
||||
|
||||
NextNoteKey = NextKey('NOTES')
|
||||
|
||||
NoteRec = ''
|
||||
NoteRec<notes_message_type$> = 'I'
|
||||
NoteRec<notes_entry_date$> = Date()
|
||||
NoteRec<notes_entry_time$> = Time()
|
||||
NoteRec<notes_send_to$> = thisRecipients
|
||||
NoteRec<notes_from$> = SentFrom
|
||||
NoteRec<notes_message$> = Message
|
||||
NoteRec<notes_entry_id$> = @USER4
|
||||
NoteRec<notes_subject$> = Subject
|
||||
NoteRec<notes_attach_window$> = AttachWindow
|
||||
NoteRec<notes_attach_keys$> = AttachKeys
|
||||
NoteRec<notes_msg_groups_ids$> = SendToGroup
|
||||
|
||||
OtParms = 'NOTES':@RM:NextNoteKey:@RM:@RM:NoteRec
|
||||
|
||||
Fields = notes_message_type$:@VM ; Values = 'I' :@VM
|
||||
Fields := notes_entry_date$:@VM ; Values := Date() :@VM
|
||||
Fields := notes_entry_time$:@VM ; Values := Time() :@VM
|
||||
Fields := notes_send_to$:@VM ; Values := thisRecipients :@VM
|
||||
Fields := notes_from$:@VM ; Values := SentFrom :@VM
|
||||
Fields := notes_message$:@VM ; Values := Message :@VM
|
||||
Fields := notes_entry_id$:@VM ; Values := @USER4 :@VM
|
||||
Fields := notes_subject$:@VM ; Values := Subject :@VM
|
||||
Fields := notes_attach_window$:@VM ; Values := AttachWindow :@VM
|
||||
Fields := notes_attach_keys$:@VM ; Values := AttachKeys :@VM
|
||||
Fields := notes_msg_groups_ids$ ; Values := SendToGroup
|
||||
|
||||
oblParms = 'NOTES' :@RM
|
||||
oblParms := NextNoteKey :@RM
|
||||
oblParms := Fields :@RM
|
||||
oblParms := Values :@RM
|
||||
oblParms := "TOP" :@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP":@VM: "TOP" :@VM: "TOP"
|
||||
|
||||
* SRP_Stopwatch('Start', 'NOTES Write')
|
||||
//Obj_Post_Log('Create', oblParms)
|
||||
obj_Tables('WriteRec',OtParms) ;* Writes the Note record to disk
|
||||
* SRP_Stopwatch('Stop', 'NOTES Write')
|
||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS')
|
||||
|
||||
RecipientsText = thisRecipients
|
||||
|
||||
SWAP @VM WITH ', ' IN RecipientsText
|
||||
|
||||
FOR I = 1 TO RecipCnt
|
||||
|
||||
thisRecipient = thisRecipients<1,I>
|
||||
|
||||
obj_Notes_Sent('Create',thisRecipient:@RM:NextNoteKey:@RM:CurrDTM) ;* Add to Notes Sent buffer table
|
||||
|
||||
UserRec = XLATE('LSL_USERS',thisRecipient,'','X')
|
||||
FwdFlag = UserRec<LSL_USERS_FWD_EMAIL$>
|
||||
eMailAddr = UserRec<LSL_USERS_EMAIL$>
|
||||
|
||||
IF FwdFlag = 1 AND eMailAddr NE '' THEN
|
||||
|
||||
Text = ''
|
||||
Text<-1> = 'OI eMail From: ':OCONV(SentFrom,'[XLATE_CONV,LSL_USERS*FIRST_LAST]'):' at ':CurrDTM
|
||||
Text<-1> = ''
|
||||
Text<-1> = 'Recipients: ':RecipientsText
|
||||
Text<-1> = ''
|
||||
Text<-1> = 'Subject: ':Subject
|
||||
Text<-1> = ''
|
||||
Text<-1> = 'Message: '
|
||||
Text<-1> = ''
|
||||
Text<-1> = Message
|
||||
Text<-1> = ''
|
||||
|
||||
IF AttachWindow NE '' THEN
|
||||
Text<-1> = ''
|
||||
Text<-1> = 'Attached Window: ':AttachWindow
|
||||
END
|
||||
|
||||
IF AttachKeys NE '' THEN
|
||||
Text<-1> = ''
|
||||
Text<-1> = 'Record Key: ':AttachKeys
|
||||
END
|
||||
|
||||
IF SendToGroup NE '' THEN
|
||||
Text<-1> = ''
|
||||
Text<-1> = 'Sent to Group: ':SendToGroup
|
||||
END
|
||||
|
||||
HeaderText = Text<1>
|
||||
|
||||
CONVERT \00\ TO ',' IN Text
|
||||
SWAP @VM WITH ':@VM:' IN Text
|
||||
SWAP @FM WITH CHAR(13):CHAR(10) IN Text
|
||||
SWAP @TM WITH CHAR(13):CHAR(10) IN Text
|
||||
|
||||
eMailBoxKey = NextNoteKey:'*':thisRecipient
|
||||
|
||||
eMailBoxRec = ''
|
||||
eMailBoxRec<EMAIL_BOX_EMAIL_ADDR$> = eMailAddr
|
||||
eMailBoxRec<EMAIL_BOX_EMAIL_TEXT$> = Text
|
||||
eMailBoxRec<EMAIL_BOX_EMAIL_HEADER$> = HeaderText
|
||||
eMailBoxRec<EMAIL_BOX_FROM_USER$> = SentFrom
|
||||
SRP_Stopwatch('Start', 'Email Write')
|
||||
ebParms = 'EMAIL_BOX':@RM:eMailBoxKey:@RM:@RM:eMailBoxRec
|
||||
//obj_Tables('WriteRec',ebParms)
|
||||
|
||||
Fields = EMAIL_BOX_EMAIL_ADDR$:@VM ; Values = eMailAddr :@VM
|
||||
Fields := EMAIL_BOX_EMAIL_TEXT$:@VM ; Values := Text :@VM
|
||||
Fields := EMAIL_BOX_EMAIL_HEADER$:@VM ; Values := HeaderText :@VM
|
||||
Fields := EMAIL_BOX_FROM_USER$:@VM ; Values := SentFrom :@VM
|
||||
|
||||
eblParms = 'EMAIL_BOX' :@RM
|
||||
eblParms := eMailBoxKey :@RM
|
||||
eblParms := Fields :@RM
|
||||
eblParms := Values :@RM
|
||||
eblParms := "TOP" :@VM: "TOP" :@VM: "TOP":@VM: "TOP"
|
||||
* obj_Tables('WriteRec',ebParms)
|
||||
Obj_Post_Log('Create' eblParms)
|
||||
* SRP_Stopwatch('Stop', 'Email Write')
|
||||
END ;* End of check for forwarding flag
|
||||
|
||||
NEXT I
|
||||
//SRP_Stopwatch('ShowAll')
|
||||
* Test = SRP_Stopwatch('GetAll')
|
||||
* debug
|
||||
RETURN
|
||||
|
||||
|
||||
|
@ -210,3 +210,4 @@ Post:
|
||||
end
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -36,7 +36,7 @@ $insert NOTIFICATION_EQU
|
||||
Declare function Scan_Services, Memory_Services, Database_Services, SRP_JSON, RTI_CreateGUID, Memberof
|
||||
Declare function Get_Property, RDS_Services, EpiPro_Services, DateTime, Signature_Services
|
||||
Declare subroutine Scan_Services, Memory_Services, Database_Services, SRP_JSON, Security_Services, obj_Notes
|
||||
Declare subroutine obj_WO_Mat_Log, obj_WO_Mat, Set_Status, SAP_Services
|
||||
Declare subroutine obj_WO_Mat_Log, obj_WO_Mat, Set_Status, SAP_Services, Hold_Services
|
||||
|
||||
//TODO - flag used during cutover, delete from APP_INFO and removed commented lines reference Use2DBarcode
|
||||
*Use2DBarcode = Database_Services('ReadDataRow', 'APP_INFO', 'USE_PACKAGING_2D')
|
||||
@ -235,7 +235,8 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
OriginFlag = 'P' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:OriginFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, '', OperatorID)
|
||||
|
||||
// Write fail packaging record in material log for first cassette ID
|
||||
LogDate = OCONV( Date(), 'D2/' )
|
||||
@ -295,7 +296,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
IF Get_Status(errCode) THEN Error_Services('Add', 'Error code ':errCode:' in ':Service:' service.')
|
||||
|
||||
// Add error to error stack
|
||||
ErrorMessage = 'Lots do not match – operation cannot continue. '|
|
||||
ErrorMessage = 'Lots do not match - operation cannot continue. '|
|
||||
: 'Lot has been put on hold - place lot on hold shelf and notify Supervisor, Lead, or Engineering'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
@ -328,7 +329,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
// Valid Poly scan - has to be exact match
|
||||
Response = ScanData[2, 999]
|
||||
end else
|
||||
Error_Services('Add', 'Location does not equal POLY – operation cannot continue.')
|
||||
Error_Services('Add', 'Location does not equal POLY - operation cannot continue.')
|
||||
end
|
||||
|
||||
Case ScanType EQ 'TRILAM'
|
||||
@ -336,7 +337,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
// Valid Trilam scan - has to be exact match
|
||||
Response = ScanData[2, 999]
|
||||
end else
|
||||
Error_Services('Add', 'Location does not equal TRILAM – operation cannot continue.')
|
||||
Error_Services('Add', 'Location does not equal TRILAM - operation cannot continue.')
|
||||
end
|
||||
|
||||
Case ScanType EQ 'CASSETTE_1'
|
||||
@ -387,7 +388,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
HoldStatus = Xlate('WO_MAT', CassetteID, 'HOLD', 'X')
|
||||
FQAComp = Signature_Services('FinalSigComp', CassetteID)
|
||||
If (HoldStatus EQ True$) then
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue. ' |
|
||||
ErrorMessage = 'Lot is currently on hold - operation cannot continue. ' |
|
||||
: 'Place lot on hold shelf and notify Supervisor, Lead, or Engineering.'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end else If FQAComp NE True$ then
|
||||
@ -410,7 +411,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
FQAComp = Epipro_Services('GetFinalQAStatus', CassetteID)
|
||||
LblCheckComp = Signature_Services('CheckQALabelStatus', WOMatKey)
|
||||
If (HoldStatus EQ True$) then
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue. ' |
|
||||
ErrorMessage = 'Lot is currently on hold - operation cannot continue. ' |
|
||||
: 'Place lot on hold shelf and notify Supervisor, Lead, or Engineering.'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end else If FQAComp NE True$ then
|
||||
@ -434,7 +435,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
If (HoldStatus EQ True$) then
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue.' |
|
||||
ErrorMessage = 'Lot is currently on hold - operation cannot continue.' |
|
||||
: 'Place lot on hold shelf and notify Supervisor, Lead, or Engineering.'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end else If FQAComp NE True$ then
|
||||
@ -568,7 +569,8 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
OriginFlag = 'P' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:OriginFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
* obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, '', OperatorID)
|
||||
|
||||
// Check if second cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in SecondCassID
|
||||
@ -626,7 +628,8 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
OriginFlag = 'P' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:OriginFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, '', OperatorID)
|
||||
end
|
||||
|
||||
// Send scan mismatch notification
|
||||
@ -673,3 +676,4 @@ end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ $insert WO_MAT_EQUATES
|
||||
Declare function Scan_Services, Memory_Services, Database_Services, SRP_JSON, RTI_CreateGUID, Memberof
|
||||
Declare function Get_Property, RDS_Services, EpiPro_Services, DateTime, Signature_Services
|
||||
Declare subroutine Scan_Services, Memory_Services, Database_Services, SRP_JSON, Security_Services, obj_Notes
|
||||
Declare subroutine obj_WO_Mat_Log, obj_WO_Mat, Set_Status, SAP_Services
|
||||
Declare subroutine obj_WO_Mat_Log, obj_WO_Mat, Set_Status, SAP_Services, Hold_Services
|
||||
|
||||
GoToService else
|
||||
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
|
||||
@ -134,7 +134,8 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
PackagingFlag = True$ ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:PackagingFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, PackagingFlag, '', OperatorID)
|
||||
|
||||
// Write fail packaging record in material log for first cassette ID
|
||||
LogDate = OCONV( Date(), 'D2/' )
|
||||
@ -195,7 +196,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
IF Get_Status(errCode) THEN Error_Services('Add', 'Error code ':errCode:' in ':Service:' service.')
|
||||
|
||||
// Add error to error stack
|
||||
ErrorMessage = 'Lots do not match – operation cannot continue. '|
|
||||
ErrorMessage = 'Lots do not match – operation cannot continue. '|
|
||||
: 'Lot has been put on hold - place lot on hold shelf and notify Supervisor, Lead, or Engineering'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
@ -228,7 +229,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
// Valid Poly scan - has to be exact match
|
||||
Response = ScanData[2, 999]
|
||||
end else
|
||||
Error_Services('Add', 'Location does not equal POLY – operation cannot continue.')
|
||||
Error_Services('Add', 'Location does not equal POLY – operation cannot continue.')
|
||||
end
|
||||
|
||||
Case ScanType EQ 'TRILAM'
|
||||
@ -236,7 +237,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
// Valid Trilam scan - has to be exact match
|
||||
Response = ScanData[2, 999]
|
||||
end else
|
||||
Error_Services('Add', 'Location does not equal TRILAM – operation cannot continue.')
|
||||
Error_Services('Add', 'Location does not equal TRILAM – operation cannot continue.')
|
||||
end
|
||||
|
||||
Case ScanType EQ 'CASSETTE_1'
|
||||
@ -292,7 +293,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
If FQAComp EQ True$ then
|
||||
HoldStatus = Xlate('WM_OUT', CassetteID, 'HOLD', 'X')
|
||||
If (HoldStatus EQ True$) then
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue. ' |
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue. ' |
|
||||
: 'Place lot on hold shelf and notify Supervisor, Lead, or Engineering.'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
@ -311,7 +312,7 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
If FQAComp EQ True$ then
|
||||
HoldStatus = Xlate('RDS', CassetteID, 'HOLD', 'X')
|
||||
If (HoldStatus EQ True$) then
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue.' |
|
||||
ErrorMessage = 'Lot is currently on hold – operation cannot continue.' |
|
||||
: 'Place lot on hold shelf and notify Supervisor, Lead, or Engineering.'
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
@ -438,7 +439,8 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
PackagingFlag = True$ ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:PackagingFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, PackagingFlag, '', OperatorID)
|
||||
|
||||
// Check if second cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in SecondCassID
|
||||
@ -497,7 +499,8 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
|
||||
CtrlEntID = False$ ;* Control checked/unchecked
|
||||
PackagingFlag = True$ ;* Flag to indicate a hold initiated from the packagaing form
|
||||
Parms = WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:CtrlEntID:@RM:PackagingFlag:@RM:OperatorID
|
||||
obj_WO_Mat('ToggleHold', Parms)
|
||||
//obj_WO_Mat('ToggleHold', Parms)
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, PackagingFlag, '', OperatorID)
|
||||
end
|
||||
|
||||
// Send scan mismatch notification
|
||||
@ -620,3 +623,4 @@ SendErrorNotification:
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
return
|
||||
|
||||
|
@ -85,6 +85,7 @@ RETURN
|
||||
end else
|
||||
Void = set_property( @window:'.HOLD_BUTTON', 'VISIBLE', 0 )
|
||||
end
|
||||
|
||||
return
|
||||
*===============================================================================================*
|
||||
HOLD_CLICK:
|
||||
@ -640,3 +641,4 @@ TC_HOURS_CHECK:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -242,7 +242,6 @@ Service AddComment(RDSNo, Comment, UsernameOpt)
|
||||
oblParms := Fields:@RM
|
||||
oblParms := Values:@RM
|
||||
oblParms := "TOP" :@VM: "TOP" :@VM: "TOP"
|
||||
|
||||
obj_Post_Log('Create',oblParms)
|
||||
|
||||
End Service
|
||||
@ -455,9 +454,12 @@ Service GetRDSData(WorkOrderNo, Columns, ShowGasGauge, RDSOverrideList)
|
||||
If Error_Services('NoError') then
|
||||
For each Column in Columns using @VM setting vPos
|
||||
LoadTimeStart = GetTickCount()
|
||||
If Column NE 'ELAPSED_HOURS' then
|
||||
RDSList<fPos, vPos> = Calculate(Column)
|
||||
end else
|
||||
Begin Case
|
||||
Case Column EQ 'HOLD_STATUS'
|
||||
HoldStatus = Calculate(Column)
|
||||
If HoldStatus EQ 'No' then HoldStatus = 'Off Hold'
|
||||
RDSList<fPos, vPos> = HoldStatus
|
||||
Case Column EQ 'ELAPSED_HOURS'
|
||||
Val = OConv(Calculate(Column), 'MD2L')
|
||||
Hours = Field(Val, '.', 1)
|
||||
Minutes = '0.':Field(Val, '.', 2)
|
||||
@ -465,7 +467,10 @@ Service GetRDSData(WorkOrderNo, Columns, ShowGasGauge, RDSOverrideList)
|
||||
Minutes = Minutes[1, 'F.']
|
||||
Minutes = Fmt(Minutes, 'R(0)#2')
|
||||
RDSList<fPos, vPos> = Hours:':':Minutes
|
||||
end
|
||||
Case Otherwise$
|
||||
RDSList<fPos, vPos> = Calculate(Column)
|
||||
|
||||
End Case
|
||||
Next Column
|
||||
end else
|
||||
Error_Services('Add', 'Error reading RDS Record ' : @ID : ' in the ' : Service : ' service.')
|
||||
@ -1518,3 +1523,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -394,3 +394,4 @@ Setup_OLE_Controls:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -277,12 +277,23 @@ Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
|
||||
@RECORD = Database_Services('ReadDataRow', 'WM_OUT', @ID)
|
||||
If Error_Services('NoError') then
|
||||
For each Column in Columns using @VM setting vPos
|
||||
Begin Case
|
||||
Case Column EQ 'HOLD'
|
||||
HoldStatus = Calculate(Column)
|
||||
If HoldStatus EQ True$ then
|
||||
HoldStatus = 'On Hold'
|
||||
end else
|
||||
HoldStatus = 'Off Hold'
|
||||
end
|
||||
WMOList<fPos, vPos> = HoldStatus
|
||||
Case Otherwise$
|
||||
Val = Calculate(Column)
|
||||
Conv = Xlate('DICT.WM_OUT', Column, DICT_CONV$, 'X')
|
||||
If Conv NE '' then
|
||||
Val = OConv(Val, Conv)
|
||||
end
|
||||
WMOList<fPos, vPos> = Val
|
||||
End Case
|
||||
Next Column
|
||||
end else
|
||||
Error_Services('Add', 'Error reading WM_OUT Record ' : @ID : ' in the ' : Service : ' service.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user