Commit to save progress.
Feature complete. Ready for UAT. Minor changes to ZPL Hold header and darkness. Implement post UAT changes. fixed small bug in WMO reprint event logic formatted code and removed commented out code
This commit is contained in:
committed by
Infineon\StieberD
parent
6050b346a5
commit
507c6bffba
@ -38,8 +38,9 @@ $insert EVENT_SETUP
|
||||
$insert WO_MAT_EQUATES
|
||||
$insert MSG_EQUATES
|
||||
|
||||
Declare subroutine SRP_Show_Window, ErrMsg, Error_Services, Hold_Services
|
||||
Declare subroutine SRP_Show_Window, ErrMsg, Error_Services, Hold_Services, Labeling_Services
|
||||
Declare function Database_Services, WM_Out_Services, RGB, SRP_Array, MemberOf, Error_Services, Hold_Services
|
||||
Declare function Datetime, Printer_Select
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
@ -138,12 +139,11 @@ 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)
|
||||
@ -160,20 +160,44 @@ Event PUB_ON_HOLD.CLICK()
|
||||
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$
|
||||
Transition = False$
|
||||
HoldEntity = 'WM_OUT'
|
||||
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
|
||||
Hold_Services('EnableMultipleHolds', WOMatKeys, HoldEntity, WMOutKeys, 'NDW_WM_OUT_QUICK_QUERY', '', HoldData)
|
||||
IF Error_Services("HasError") THEN
|
||||
ErrCode = Error_Services("GetMessage")
|
||||
ErrMsg(errCode)
|
||||
end else
|
||||
MsgInfo = ''
|
||||
MsgInfo<MTYPE$> = 'BNY'
|
||||
MsgInfo<MTEXT$> = 'Hold Successful. Would you like to print label(s)?'
|
||||
MsgInfo<MICON$> = '!'
|
||||
PrintLabel = Msg(@WINDOW,MsgInfo,'')
|
||||
HoldBy = HoldData<1>
|
||||
Reason = HoldData<2>
|
||||
Stage = HoldData<4>
|
||||
Interrupted = HoldData<5>
|
||||
DTM = Datetime()
|
||||
If PrintLabel EQ True$ then
|
||||
PrinterId = Printer_Select(PrinterID)
|
||||
end
|
||||
Reactor = 'EPP'
|
||||
For L = 1 to SelCount
|
||||
ThisPos = SelPos<L>
|
||||
Set_Property(@Window : '.OLE_RPT_WM_OUT_LIST', 'OLE.ItemValue[8;' : ThisPos : ']', 'On Hold')
|
||||
PSN = Xlate('WM_OUT', WMOutKeys<L>, 'PS_NO', 'X')
|
||||
If PrintLabel EQ True$ then
|
||||
Labeling_Services('PrintHoldLabel', HoldEntity, WMOutKeys<L>, Stage, Reason, HoldBy, DTM, PSN, Reactor, Interrupted, PrinterID)
|
||||
end
|
||||
Next L
|
||||
|
||||
HoldOffFlag = True$
|
||||
HoldOnFlag = False$
|
||||
Gosub CheckSelectedForHolds
|
||||
end
|
||||
end
|
||||
|
||||
end event
|
||||
@ -183,8 +207,6 @@ 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)
|
||||
@ -201,7 +223,6 @@ Event PUB_OFF_HOLD.CLICK()
|
||||
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 = ''
|
||||
@ -433,6 +454,7 @@ RefreshRowColors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
CheckSelectedForHolds:
|
||||
|
||||
If Unassigned(HoldOnFlag) then HoldOnFlag = False$
|
||||
@ -440,17 +462,11 @@ CheckSelectedForHolds:
|
||||
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$
|
||||
|
Reference in New Issue
Block a user