Final changes post UAT.
This commit is contained in:
parent
b334574cac
commit
5d31e6f84c
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ COMPILE FUNCTION Calib_List(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window, Post_Event, Set_List_Box_Data
|
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, Center_Window, Post_Event, Set_List_Box_Data
|
||||||
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow
|
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Labeling_Services
|
||||||
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note
|
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note
|
||||||
|
|
||||||
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals
|
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals
|
||||||
@ -21,6 +21,7 @@ $INSERT LSL_USERS_EQU
|
|||||||
$INSERT SECURITY_RIGHTS_EQU
|
$INSERT SECURITY_RIGHTS_EQU
|
||||||
$INSERT CALIB_LIST_EQUATES
|
$INSERT CALIB_LIST_EQUATES
|
||||||
$INSERT POPUP_EQUATES
|
$INSERT POPUP_EQUATES
|
||||||
|
$Insert Logical
|
||||||
|
|
||||||
EQU CRLF$ TO \0D0A\
|
EQU CRLF$ TO \0D0A\
|
||||||
EQU TAB$ TO \09\
|
EQU TAB$ TO \09\
|
||||||
@ -35,7 +36,6 @@ ErrorMsg = ''
|
|||||||
|
|
||||||
Result = ''
|
Result = ''
|
||||||
|
|
||||||
|
|
||||||
BEGIN CASE
|
BEGIN CASE
|
||||||
CASE EntID = @WINDOW
|
CASE EntID = @WINDOW
|
||||||
BEGIN CASE
|
BEGIN CASE
|
||||||
@ -46,6 +46,7 @@ BEGIN CASE
|
|||||||
CASE Event[1,3] = 'QBF' ; GOSUB Refresh
|
CASE Event[1,3] = 'QBF' ; GOSUB Refresh
|
||||||
END CASE
|
END CASE
|
||||||
|
|
||||||
|
CASE EntID = @WINDOW:'.MENU.PRINT.RE-PRINT_CALIBRATION_LABEL' AND Event = 'MENU'; Gosub PrintMostRecentLabel
|
||||||
CASE EntID = @WINDOW:'.NEW_ITEM' AND Event = 'CLICK' ; GOSUB NewItem
|
CASE EntID = @WINDOW:'.NEW_ITEM' AND Event = 'CLICK' ; GOSUB NewItem
|
||||||
CASE EntID = @WINDOW:'.LU_CL_NO' AND Event = 'CLICK' ; GOSUB LUCalibItem
|
CASE EntID = @WINDOW:'.LU_CL_NO' AND Event = 'CLICK' ; GOSUB LUCalibItem
|
||||||
CASE EntID = @WINDOW:'.LU_CL_TYPE' AND Event = 'CLICK' ; GOSUB LUCalibItemType
|
CASE EntID = @WINDOW:'.LU_CL_TYPE' AND Event = 'CLICK' ; GOSUB LUCalibItemType
|
||||||
@ -82,7 +83,8 @@ END
|
|||||||
obj_Appwindow('Create',@WINDOW)
|
obj_Appwindow('Create',@WINDOW)
|
||||||
|
|
||||||
Set_List_Box_Data( @WINDOW )
|
Set_List_Box_Data( @WINDOW )
|
||||||
|
// Use to determine whether or not the New Calibration label was just clicked
|
||||||
|
Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', False$)
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
@ -139,6 +141,7 @@ FOR I = 1 TO COUNT(ETCtrls,@VM) + (ETCtrls NE '')
|
|||||||
NEXT Line
|
NEXT Line
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
@ -149,18 +152,24 @@ RETURN
|
|||||||
Read:
|
Read:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
|
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
|
||||||
|
|
||||||
IF RowExists('CALIB_LIST',CLNo) ELSE
|
IF RowExists('CALIB_LIST',CLNo) ELSE
|
||||||
IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN
|
IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN
|
||||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH')
|
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH')
|
||||||
Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM)
|
Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM)
|
||||||
|
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
GOSUB Refresh
|
GOSUB Refresh
|
||||||
|
// Use to determine whether or not the New Calibration button was just clicked and print if it was
|
||||||
|
PrintCheck = Get_Property(@Window : '.CALIBRATIONS', '@PrintLabel')
|
||||||
|
If PrintCheck EQ True$ then
|
||||||
|
Gosub PrintMostRecentLabel
|
||||||
|
end
|
||||||
|
// Reset flag after read regardless
|
||||||
|
Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', False$)
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
@ -334,12 +343,31 @@ IF CLNo NE '' THEN
|
|||||||
oaParms := 1:@FM:1
|
oaParms := 1:@FM:1
|
||||||
|
|
||||||
obj_Appwindow('ViewNewDetail', oaParms)
|
obj_Appwindow('ViewNewDetail', oaParms)
|
||||||
|
// New Calibration label was just clicked, set to true
|
||||||
|
Set_Property(@Window : '.CALIBRATIONS', '@PrintLabel', True$)
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
*********************
|
||||||
|
PrintMostRecentLabel:
|
||||||
|
*********************
|
||||||
|
|
||||||
|
CLNo = Get_Property(@WINDOW:'.CL_NO','DEFPROP')
|
||||||
|
|
||||||
|
IF CLNo NE '' THEN
|
||||||
|
TableList = Get_Property(@WINDOW:'.CALIBRATIONS', 'LIST')
|
||||||
|
EquipmentID = Get_Property(@WINDOW:'.EQ_DESC', 'TEXT')
|
||||||
|
LastCalibration = Get_Property(@WINDOW:'.LAST_CAL_DT', 'TEXT')
|
||||||
|
FrequencyVal = Get_Property(@WINDOW:'.CAL_INTERVAL', 'TEXT')
|
||||||
|
FrequencyUnit = 'Months'
|
||||||
|
NextCalibration = Get_Property(@WINDOW:'.NEXT_CAL_DT', 'TEXT')
|
||||||
|
CalibratedBy = TableList<1,2>
|
||||||
|
Labeling_Services('PrintCalibrationLabel', EquipmentID, LastCalibration, NextCalibration, CalibratedBy, FrequencyVal, FrequencyUnit, '')
|
||||||
|
end
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,37 +84,36 @@ Service PrintCalibrationLabel(EquipmentID, LastCalibration, NextCalibration, Cal
|
|||||||
|
|
||||||
If (EquipmentID NE '') AND (LastCalibration NE '') AND (NextCalibration NE '') AND (CalibratedBy NE '') AND (FrequencyVal NE '') AND (FrequencyUnit NE '') then
|
If (EquipmentID NE '') AND (LastCalibration NE '') AND (NextCalibration NE '') AND (CalibratedBy NE '') AND (FrequencyVal NE '') AND (FrequencyUnit NE '') then
|
||||||
ZPLString = ''
|
ZPLString = ''
|
||||||
// Print Params
|
|
||||||
|
// Print Params 1x2
|
||||||
ZPLString := '^XA'
|
ZPLString := '^XA'
|
||||||
ZPLString := '^LH0,0'
|
ZPLString := '^LH0,0'
|
||||||
ZPLString := '^PR1'
|
ZPLString := '^PR1'
|
||||||
ZPLString := '^LL406'
|
ZPLString := '^LL406'
|
||||||
ZPLString := '^PW900'
|
ZPLString := '^PW406'
|
||||||
ZPLString := '^MD22'
|
ZPLString := '^MD22'
|
||||||
ZPLString := '^MMT'
|
ZPLString := '^MMT'
|
||||||
// Calibration Header
|
|
||||||
ZPLString := '^FO280,24,2^FWN^A050,50^FDCalibration^FS'
|
ZPLString := '^FO125,15^A025,25^FDCalibration^FS'
|
||||||
// Equipment ID
|
|
||||||
ZPLString := '^FO40,90,2^FWN^A035,35^FDEquipment ID:^FS'
|
ZPLString := '^FO30,50^FW^A020,20^FDEquip ID:^FS'
|
||||||
ZPLString := '^FO280,90,2^FWN^A035,35^FD<EquipmentID>^FS'
|
ZPLString := '^FO125,50,2^FW^A020,20^FD<EquipmentID>^FS'
|
||||||
// Last calibration
|
|
||||||
ZPLString := '^FO40,150,2^FWN^A035,35^FDLast Calibration:^FS'
|
ZPLString := '^FO30,80,2^FW^A020,20^FDLast Cal:^FS'
|
||||||
ZPLString := '^FO280,150,2^FWN^A035,35^FD<LastCalibration>^FS'
|
ZPLString := '^FO125,80^FW^A020,20^FD<LastCalibration>^FS'
|
||||||
// Next calibration
|
|
||||||
ZPLString := '^FO40,210,2^FWN^A035,35^FDNext Calibration:^FS'
|
ZPLString := '^FO30,110^FW^A020,20^FDNext Cal:^FS'
|
||||||
ZPLString := '^FO280,210,2^FWN^A035,35^FD<NextCalibration>^FS'
|
ZPLString := '^FO125,110^FW^A020,20^FD<NextCalibration>^FS'
|
||||||
// Calibrated by
|
|
||||||
ZPLString := '^FO40,270,2^FWN^A035,35^FDCalibrated By:^FS'
|
ZPLString := '^FO30,140^FW^A020,20^FDCal By:^FS'
|
||||||
ZPLString := '^FO280,270,2^FWN^A035,35^FD<CalibratedBy>^FS'
|
ZPLString := '^FO125,140^FW^A020,20^FD<CalibratedBy>^FS'
|
||||||
// Calibration frequency
|
|
||||||
ZPLString := '^FO40,330,2^FWN^A035,35^FDCalibration Freq:^FS'
|
ZPLString := '^FO30,170^FW^A020,20^FDCal Freq:^FS'
|
||||||
ZPLString := '^FO280,330,2^FWN^A035,35^FD<FreqVal>^FS'
|
ZPLString := '^FO125,170^FW^A020,20^FD<FreqVal>^FS'
|
||||||
ZPLString := '^FO460,330,2^FWN^A035,35^FD<FreqUnit>^FS'
|
ZPLString := '^FO145,170,2^FW^A020,20^FD<FreqUnit>^FS'
|
||||||
// End
|
|
||||||
ZPLString := '^XZ'
|
ZPLString := '^XZ'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Swap '<EquipmentID>' With EquipmentID in ZPLString
|
Swap '<EquipmentID>' With EquipmentID in ZPLString
|
||||||
Swap '<LastCalibration>' With LastCalibration in ZPLString
|
Swap '<LastCalibration>' With LastCalibration in ZPLString
|
||||||
Swap '<NextCalibration>' With NextCalibration in ZPLString
|
Swap '<NextCalibration>' With NextCalibration in ZPLString
|
||||||
@ -122,6 +121,7 @@ Service PrintCalibrationLabel(EquipmentID, LastCalibration, NextCalibration, Cal
|
|||||||
Swap '<FreqVal>' With FrequencyVal in ZPLString
|
Swap '<FreqVal>' With FrequencyVal in ZPLString
|
||||||
Swap '<FreqUnit>' With FrequencyUnit in ZPLString
|
Swap '<FreqUnit>' With FrequencyUnit in ZPLString
|
||||||
|
|
||||||
|
* SRP_Set_Clipboard(ZPLString)
|
||||||
|
|
||||||
If PrinterSelect NE '' then
|
If PrinterSelect NE '' then
|
||||||
Labeling_Services('PrintLabel', ZPLString, PrinterSelect)
|
Labeling_Services('PrintLabel', ZPLString, PrinterSelect)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user