Merged PR 13813: Lot void routines enhancement

Lot void routines enhancement

Related work items: #110807
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-03-27 18:51:25 +01:00
parent 507c6bffba
commit b76db6bc72
22 changed files with 3950 additions and 2447 deletions

View File

@ -58,7 +58,7 @@ $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
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Services
GoToService else
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
@ -361,6 +361,29 @@ Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorI
If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
//Add in logging lot event
If UserId EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
End Case
end
end else
Error_Services('Add', 'Lot is already on hold.')
@ -474,6 +497,29 @@ Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, Operator
If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
//Add in logging lot event
if UserID EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
End Case
end
end else
Error_Services('Add', 'Lot is not on hold.')