Modified WM_IN ZPL label generation to include a 2D datamatrix

barcode. Implemented 2D barcode verification in PTI and FQA Label Check
Operations.

Bug fixes

Changed WMI 2D barcode to have 8 fields to keep code base simpler

minor changes to error message verbiage

Refactored code to use post log. Refactored code to not use multiple returns. Modfield input form fields to force upper case only.

changed LSL password verification to be case insensitive to avoid barcode scanning issues when caps lock is on

temporary change to allow 1D WMI scans at PTI while we exhaust current supply
This commit is contained in:
Infineon\Mitchem
2025-05-28 12:58:56 -07:00
committed by Stieber Daniel (CSC FI SPS MESLEO)
parent 2f6b376ece
commit b2c9e500f8
16 changed files with 5621 additions and 2639 deletions

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

View File

@ -572,7 +572,7 @@
"<3,8>": "28",
"<3,9>": "",
"<3,10>": {
"<3,10,1>": "0x5E000080",
"<3,10,1>": "0x5E000088",
"<3,10,2>": "0x200"
},
"<3,11>": {
@ -739,7 +739,7 @@
"<4,8>": "28",
"<4,9>": "",
"<4,10>": {
"<4,10,1>": "0x5E000080",
"<4,10,1>": "0x5E000088",
"<4,10,2>": "0x200"
},
"<4,11>": {

View File

@ -9,7 +9,7 @@
"<2>": "-2",
"<3>": "-1",
"<4>": "-1",
"<5>": "16777215",
"<5>": "-2",
"<6>": {
"<6,1>": {
"<6,1,1>": "Tahoma",
@ -76,11 +76,21 @@
"<28>": "",
"<29>": "0",
"<30>": "0",
"<31>": "0",
"<31>": "1",
"<32>": "0",
"<33>": "0",
"<34>": "16777215",
"<35>": "16777215"
"<34>": "-2",
"<35>": "-2",
"<36>": "",
"<37>": "",
"<38>": "",
"<39>": "",
"<40>": "-2",
"<41>": "1000",
"<42>": "",
"<43>": "",
"<44>": "",
"<45>": ""
}
}
}

View File

@ -9,7 +9,7 @@
"<2>": "-2",
"<3>": "-1",
"<4>": "-1",
"<5>": "16777215",
"<5>": "-2",
"<6>": {
"<6,1>": {
"<6,1,1>": "Tahoma",
@ -84,11 +84,21 @@
"<28>": "",
"<29>": "0",
"<30>": "0",
"<31>": "0",
"<31>": "1",
"<32>": "0",
"<33>": "0",
"<34>": "16777215",
"<35>": "16777215"
"<34>": "-2",
"<35>": "-2",
"<36>": "",
"<37>": "",
"<38>": "",
"<39>": "",
"<40>": "-2",
"<41>": "1000",
"<42>": "",
"<43>": "",
"<44>": "",
"<45>": ""
}
}
}

View File

@ -9,7 +9,7 @@
"<2>": "-2",
"<3>": "-1",
"<4>": "-1",
"<5>": "16777215",
"<5>": "-2",
"<6>": {
"<6,1>": {
"<6,1,1>": "MS Sans Serif",
@ -93,8 +93,21 @@
"<28>": "",
"<29>": "0",
"<30>": "0",
"<31>": "0",
"<32>": "0"
"<31>": "1",
"<32>": "0",
"<33>": "0",
"<34>": "-2",
"<35>": "-2",
"<36>": "",
"<37>": "",
"<38>": "",
"<39>": "",
"<40>": "-2",
"<41>": "1000",
"<42>": "",
"<43>": "",
"<44>": "",
"<45>": ""
}
}
}

View File

@ -62,117 +62,161 @@ Options SCAN_TYPES_PTO = 'LABEL1', 'LABEL2'
//----------------------------------------------------------------------------------------------------------------------
Service ProcessFQAScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
ErrorMsg = ''
If (ScanData NE '') then
// Code 3of9 encodes the asterisk and underscore characters. These need to be decoded.
//ScanData = Scan_Services('DecodeScanData', ScanData)
If Error_Services('NoError') then
ColumnIndex = ''
ColumnValue = ''
// Identify the scan data based on the data identifier prefix (if any). Otherwise, assume this is a
// type of cassette ID (i.e., RDS or WMO).
Begin Case
Case ScanType EQ 'SUPPLIER'
ValidLot = False$
If ScanData[1, 2] EQ '2T' OR ScanData[1,2] EQ '1T' then ScanData[1, 2] = ''
ScanSubLot = ScanData
CassetteID = Param1
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidLot = Rds_Services('IsValidSubLot', CassetteID, RDSType, ScanSubLot)
If ValidLot NE True$ then
// Add error to error stack
ErrorMessage = 'Invalid Supplier Lot: ':ScanData
Error_Services('Add', ErrorMessage)
end
If Error_Services('NoError') then
Response = ScanSubLot
end
Case ScanType EQ 'CASSETTE1'
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
// non-existent carrier will the scan data be considered invalid.
// Strip '1T', 'I', and 'O' prefixes.
If ScanData[1, 2] EQ '1T' then
ScanData[1, 2] = ''
end else If ScanData[1,1] EQ 'I' OR ScanData[1,1] EQ 'O' then
ScanData[1,1] = ''
end
CassetteID = ScanData
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
WOMatKey = Field(CassetteID, '.', 1):'*':Field(CassetteID, '.', 3)
end else
RDSType = 'SIC'
WOMatKey = Xlate('RDS', CassetteID, 'WO_MAT_KEY', 'X')
end
ValidCassetteID = False$ ; // Assume Cassette ID is not valid for now.
ValidCassetteID = Rds_Services('IsValidRDS', CassetteID, RDSType )
If RDSType EQ 'EPP' then
LotDesc = 'EPP Lot '
end else
LotDesc = 'RDS Number '
ColumnIndex = ''
ColumnValue = ''
// Identify the scan data based on the data identifier prefix (if any). Otherwise, assume this is a
// type of cassette ID (i.e., RDS or WMO).
Begin Case
Case ScanType EQ 'SUPPLIER'
ValidLot = False$
If ScanData[1, 2] EQ '2T' OR ScanData[1,2] EQ '1T' then ScanData[1, 2] = ''
ScanSubLot = ScanData
CassetteID = Param1
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidLot = Rds_Services('IsValidSubLot', CassetteID, RDSType, ScanSubLot)
If ValidLot NE True$ then
// Add error to error stack
ErrorMsg = 'Invalid Supplier Lot: ':ScanData
end
If ErrorMsg EQ '' then Response = ScanSubLot
Case ScanType EQ 'CASSETTE1'
DelimCount = DCount(ScanData, '|')
Begin Case
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') )
ErrorMsg = '1D Lot Label Scanned. 2D Lot Label Required.'
Case (DelimCount NE 8)
ErrorMsg = 'Invalid Lot Label Scan.'
Case Otherwise$
CassetteID = Field(ScanData, '|', 3)
SeqNo = Field(ScanData, '|', 8)
End Case
If ErrorMsg EQ '' then
If CassetteID[1, 2] EQ '1T' then
CassetteID[1, 2] = ''
end else If CassetteID[1,1] EQ 'I' OR CassetteID[1,1] EQ 'O' then
CassetteID[1,1] = ''
end
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
WOMatKey = Field(CassetteID, '.', 1):'*':Field(CassetteID, '.', 3)
end else
RDSType = 'SIC'
WOMatKey = Xlate('RDS', CassetteID, 'WO_MAT_KEY', 'X')
end
ValidCassetteID = Rds_Services('IsValidRDS', CassetteID, RDSType )
If ValidCassetteID EQ True$ then
If Param1 NE '' AND ScanData NE Param1 then ;*Cassette2 Scan
Error_Services('Add', LotDesc:'Mismatch: ':CassetteID: ' does not match ': Param1)
end
// Check if FQA is signed
FQASigned = ''
WorkOrdNo = Field(WOMatKey, '*', 1)
ReactorType = XLATE('WO_LOG', WorkOrdNo, 'REACT_TYPE', 'X')
QAStage = ''
Begin Case
Case RDSType EQ 'EPP'
QAStage = 'MO_QA'
Case Otherwise$
QAStage = 'QA'
End Case
If Param1 NE '' AND ScanData NE Param1 then ;*Cassette2 Scan
ErrorMsg = 'Lot Label Mismatch: ':CassetteID: ' does not match ': Param1
end
If ErrorMsg EQ '' then
// Check if FQA is signed
FQASigned = ''
WorkOrdNo = Field(WOMatKey, '*', 1)
ReactorType = XLATE('WO_LOG', WorkOrdNo, 'REACT_TYPE', 'X')
QAStage = ''
Begin Case
Case RDSType EQ 'EPP'
QAStage = 'MO_QA'
Case Otherwise$
QAStage = 'QA'
End Case
FQASigned = Signature_Services('CheckSignature', WOMatKey, QAStage)
IF NOT(FQASigned) THEN
Error_Services('Add', 'FQA not signed for ':LotDesc:CassetteID: '!')
END
end else
Error_Services('Add', 'Invalid ':LotDesc:CassetteID)
end
If Error_Services('NoError') then
Response = CassetteID
end
Case ScanType EQ 'CASSETTE2'
Response = Material_Movement_Services('ProcessPTIScanData', ScanData, 'CASSETTE1', Param1)
Response = ScanData
End Case
end
FQASigned = Signature_Services('CheckSignature', WOMatKey, QAStage)
If NOT(FQASigned) then ErrorMsg = 'FQA not signed for ':CassetteID:'!'
end
end else
ErrorMsg = 'Invalid Lot ID ':CassetteID
end
If ErrorMsg EQ '' then
Response = ''
Response<1> = CassetteID
Response<2> = SeqNo
end
end
Case ScanType EQ 'CASSETTE2'
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
// non-existent carrier will the scan data be considered invalid.
// Strip '1T', 'I', and 'O' prefixes.
ValidCassetteID = False$ ; // Assume Cassette ID is not valid for now.
Cassette1ID = Param1
Seq1No = Param2
DelimCount = DCount(ScanData, '|')
Begin Case
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') )
ErrorMsg = '1D Lot Label Scanned. 2D Lot Label Required.'
Case (DelimCount NE 8)
ErrorMsg = 'Invalid Lot Label Scan.'
Case Otherwise$
CassetteID = Field(ScanData, '|', 3)
Seq2No = Field(ScanData, '|', 8)
End Case
If ErrorMsg EQ '' then
If CassetteID[1, 2] EQ '1T' then
CassetteID[1, 2] = ''
end else If CassetteID[1,1] EQ 'I' OR CassetteID[1,1] EQ 'O' then
CassetteID[1,1] = ''
end
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidCassetteID = Rds_Services('IsValidRDS', CassetteID, RDSType )
If ValidCassetteID EQ True$ then
If Cassette1ID NE '' AND (CassetteID NE Cassette1ID) then ;*Cassette2 Scan
ErrorMsg = 'Lot Label Mismatch: ':CassetteID: ' does not match ': Cassette1ID
end
If Seq1No EQ Seq2No then
ErrorMsg = 'FQA Label verification failed due':CRLF$:'to operator double-scanning barcode.'
end
end else
ErrorMsg = 'Invalid RDS Number: ':CassetteID
end
If ErrorMsg EQ '' then Response = CassetteID
end
End Case
end else
Error_Services('Add', 'ScanData argument was missing in the ' : Service : ' service.')
ErrorMsg = 'ScanData argument was missing in the ' : Service : ' service.'
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
//----------------------------------------------------------------------------------------------------------------------
// ProcessPTIScanData
//
@ -183,92 +227,148 @@ end service
//----------------------------------------------------------------------------------------------------------------------
Service ProcessPTIScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Param3)
ErrorMsg = ''
If (ScanData NE '') then
// Code 3of9 encodes the asterisk and underscore characters. These need to be decoded.
//ScanData = Scan_Services('DecodeScanData', ScanData)
If Error_Services('NoError') then
ColumnIndex = ''
ColumnValue = ''
// Identify the scan data based on the data identifier prefix (if any). Otherwise, assume this is a
// type of cassette ID (i.e., RDS or WMO).
Begin Case
Case ScanType EQ 'SUPPLIER'
ValidLot = False$
If ScanData[1, 2] EQ '2T' OR ScanData[1,2] EQ '1T' then ScanData[1, 2] = ''
ScanSubLot = ScanData
CassetteID = Param1
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidLot = Rds_Services('IsValidSubLot', CassetteID, RDSType, ScanSubLot)
If ValidLot NE True$ then ErrorMsg = 'Invalid Supplier Lot: ':ScanData
If ErrorMsg EQ '' then Response = ScanSubLot
Case ScanType EQ 'CASSETTE1'
debug
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
// non-existent carrier will the scan data be considered invalid.
// Strip '1T', 'I', and 'O' prefixes.
ValidCassetteID = False$ ; // Assume Cassette ID is not valid for now.
DelimCount = DCount(ScanData, '|')
Begin Case
Case (ScanData[1, 1] EQ 'I')
! Temporary exception while we exhaust current WMI inventory on KIT racks that
! do not have a 2D barcode.
CassetteID = ScanData
SeqNo = 'SEQ1'
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') )
ErrorMsg = '1D Lot Label Scanned. 2D Lot Label Required.'
Case (DelimCount NE 8)
ErrorMsg = 'Invalid Lot Label Scan.'
Case Otherwise$
CassetteID = Field(ScanData, '|', 3)
SeqNo = Field(ScanData, '|', 8)
End Case
If ErrorMsg EQ '' then
If CassetteID[1, 2] EQ '1T' then
CassetteID[1, 2] = ''
end else If CassetteID[1,1] EQ 'I' OR CassetteID[1,1] EQ 'O' then
CassetteID[1,1] = ''
end
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidCassetteID = Rds_Services('IsValidRDS', CassetteID, RDSType)
If ValidCassetteID EQ True$ then
If Param1 NE '' AND (ScanData NE Param1) then ;*Cassette2 Scan
ErrorMsg = 'Lot Label Mismatch: ':CassetteID: ' does not match ': Param1
end
end else
ErrorMsg = 'Invalid Cassette Number: ':CassetteID
end
If ErrorMsg EQ '' then
Response = ''
Response<1> = CassetteID
Response<2> = SeqNo
end
end
Case ScanType EQ 'CASSETTE2'
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
// non-existent carrier will the scan data be considered invalid.
// Strip '1T', 'I', and 'O' prefixes.
ValidCassetteID = False$ ; // Assume Cassette ID is not valid for now.
Cassette1ID = Param1
Seq1No = Param2
DelimCount = DCount(ScanData, '|')
Begin Case
Case (ScanData[1, 1] EQ 'I')
! Temporary exception while we exhaust current WMI inventory on KIT racks that
! do not have a 2D barcode.
CassetteID = ScanData
Seq2No = 'SEQ2'
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') )
ErrorMsg = '1D Lot Label Scanned. 2D Lot Label Required.'
Case (DelimCount NE 8)
ErrorMsg = 'Invalid Lot Label Scan.'
Case Otherwise$
CassetteID = Field(ScanData, '|', 3)
Seq2No = Field(ScanData, '|', 8)
End Case
If ErrorMsg EQ '' then
If CassetteID[1, 2] EQ '1T' then
CassetteID[1, 2] = ''
end else If CassetteID[1,1] EQ 'I' OR CassetteID[1,1] EQ 'O' then
CassetteID[1,1] = ''
end
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidCassetteID = Rds_Services('IsValidRDS', CassetteID, RDSType)
If ValidCassetteID EQ True$ then
If Cassette1ID NE '' AND (CassetteID NE Cassette1ID) then ;*Cassette2 Scan
ErrorMsg = 'Lot Label Mismatch: ':CassetteID: ' does not match ': Cassette1ID
end
If Seq1No EQ Seq2No then
ErrorMsg = 'PTI Label verification failed due':CRLF$:'to operator double-scanning barcode.'
end
end else
ErrorMsg = 'Invalid Cassette Number: ':CassetteID
end
If ErrorMsg EQ '' then Response = CassetteID
end
End Case
ColumnIndex = ''
ColumnValue = ''
// Identify the scan data based on the data identifier prefix (if any). Otherwise, assume this is a
// type of cassette ID (i.e., RDS or WMO).
Begin Case
Case ScanType EQ 'SUPPLIER'
ValidLot = False$
If ScanData[1, 2] EQ '2T' OR ScanData[1,2] EQ '1T' then ScanData[1, 2] = ''
ScanSubLot = ScanData
CassetteID = Param1
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidLot = Rds_Services('IsValidSubLot', CassetteID, RDSType, ScanSubLot)
If ValidLot NE True$ then
// Add error to error stack
ErrorMessage = 'Invalid Supplier Lot: ':ScanData
Error_Services('Add', ErrorMessage)
end
If Error_Services('NoError') then
Response = ScanSubLot
end
Case ScanType EQ 'CASSETTE1'
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
// non-existent carrier will the scan data be considered invalid.
// Strip '1T', 'I', and 'O' prefixes.
If ScanData[1, 2] EQ '1T' then
ScanData[1, 2] = ''
end else If ScanData[1,1] EQ 'I' OR ScanData[1,1] EQ 'O' then
ScanData[1,1] = ''
end
CassetteID = ScanData
If INDEX(CassetteID,'.',2) then
RDSType = 'EPP'
end else
RDSType = 'SIC'
end
ValidCassetteID = False$ ; // Assume Cassette ID is not valid for now.
ValidCassetteID = Rds_Services('IsValidRDS', CassetteID, RDSType )
If ValidCassetteID EQ True$ then
If Param1 NE '' AND ScanData NE Param1 then ;*Cassette2 Scan
Error_Services('Add', 'RDS Mismatch: ':CassetteID: ' does not match ': Param1)
end
end else
Error_Services('Add', 'Invalid RDS Number: ':CassetteID)
end
If Error_Services('NoError') then
Response = CassetteID
end
Case ScanType EQ 'CASSETTE2'
Response = Material_Movement_Services('ProcessPTIScanData', ScanData, 'CASSETTE1', Param1)
Response = ScanData
End Case
end
end else
Error_Services('Add', 'ScanData argument was missing in the ' : Service : ' service.')
ErrorMsg = 'ScanData argument was missing in the ' : Service : ' service.'
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
//to do before release of ProcessPTOScanData
//1. prerequisite - waiting on newly printed (on/after 10/18/21) labels to make their way through warehouse, though not critical
//2. showstopper - need barcode scanners to be able to scan 2D barcodes - currently only 1 such scanner (purchased for shipping but not deployed, given to Cheryl)
//3. fix prod print routine to use SRP GetPrinter methods similar to what the Test_Print_SAP_Cass_Ship_Label does
//----------------------------------------------------------------------------------------------------------------------
// ProcessPTOScanData
//
@ -282,174 +382,165 @@ end service
//----------------------------------------------------------------------------------------------------------------------
Service ProcessPTOScanData(ScanData, ScanType = SCAN_TYPES_PTO, Param1, Param2)
ErrorMsg = ''
Location = 'PTO Mat'
If (ScanData NE '') then
If Error_Services('NoError') then
ColumnIndex = ''
ColumnValue = ''
Cassette1 = ''
Cassette2 = ''
Begin Case
Case ScanType EQ 'LABEL1'
//determine whether regular NEPP or EPP label scan
//NEPP should be data matrix scan and have 7 parts, RDS_No is the 3rd
//EPP is 1D scan and will have the WMO number (e.g. 170369*1*48)
// This should be a multi-part 2D datamatrix scan, so there should be a long string separated by pipe symbols.
// Validate the 1. it is multi-part string and 2. that the RDS number from the string is a) valid RDS number
// and b) is currently is the proper state to do PTO transaction.
// Strip any standardized prefixes (e.g. '1T', '2T', etc.) as necessary
// data from Label1 should have 8 parts (no matter type - Si or EPP), we're looking for the 3rd
cnt = DCount(ScanData, '|')
if cnt NE 8 then
Cassette1 = 0
Error_Services('Add', 'Invalid Lot Label Scan.')
return
end else
//RDS should be 3rd position
Cassette1 = Field(ScanData, '|', 3)
end
//strip the prefix encoding
If Cassette1[1, 2] EQ '1T' OR Cassette1[1, 2] EQ '2T' then
Cassette1[1, 2] = ''
end else If Cassette1[1,1] EQ 'I' OR ScanData[1,1] EQ 'O' then
Cassette1[1,1] = ''
end
WOMatKey = ''
RdsRec = ''
WONo = ''
CassNo = ''
ColumnIndex = ''
ColumnValue = ''
Cassette1 = ''
Cassette2 = ''
Begin Case
Case ScanType EQ 'LABEL1'
// Determine whether regular NEPP or EPP label scan
// NEPP should be data matrix scan and have 7 parts, RDS_No is the 3rd
// EPP is 1D scan and will have the WMO number (e.g. 170369*1*48)
// This should be a multi-part 2D datamatrix scan, so there should be a long string separated by pipe symbols.
// Validate the 1. it is multi-part string and 2. that the RDS number from the string is a) valid RDS number
// and b) is currently is the proper state to do PTO transaction.
// Strip any standardized prefixes (e.g. '1T', '2T', etc.) as necessary
// Data from Label1 should have 8 parts (no matter type - Si or EPP), we're looking for the 3rd
cnt = DCount(ScanData, '|')
if cnt NE 8 then
ErrorMsg = 'Invalid Lot Label Scan.'
end else
Cassette1 = Field(ScanData, '|', 3)
end
If ErrorMsg EQ '' then
// Strip the prefix encoding
If Cassette1[1, 2] EQ '1T' OR Cassette1[1, 2] EQ '2T' then
Cassette1[1, 2] = ''
end else If Cassette1[1,1] EQ 'I' OR ScanData[1,1] EQ 'O' then
Cassette1[1,1] = ''
end
WOMatKey = ''
RdsRec = ''
WONo = ''
CassNo = ''
If INDEX(Cassette1,'.',2) then
RDSType = 'EPP'
WMOKey = Cassette1
If INDEX(Cassette1,'.',2) then
RDSType = 'EPP'
WMOKey = Cassette1
Convert '.' to '*' in WMOKey
If RowExists('WM_OUT', WMOKey) then
If RowExists('WM_OUT', WMOKey) then
WONo = Field(WMOKey, '*', 1, 1)
CassNo = Field(WMOKey, '*', 3, 1)
WOMatKey = WONo:'*':CassNo
end
end else
RDSType = 'SIC'
WOMatKey = XLATE('RDS', Cassette1, 'WO_MAT_KEY', 'X')
RdsRec = Database_Services('ReadDataRow','RDS', Cassette1)
WONo = RdsRec<RDS_WO$>
CassNo = RdsRec<RDS_CASS_NO$>
end
end else
RDSType = 'SIC'
WOMatKey = XLATE('RDS', Cassette1, 'WO_MAT_KEY', 'X')
RdsRec = Database_Services('ReadDataRow','RDS', Cassette1)
WONo = RdsRec<RDS_WO$>
CassNo = RdsRec<RDS_CASS_NO$>
end
ValidCassette1 = False$ ; // Assume Cassette ID is not valid for now.
testCass1 = Cassette1
ValidCassette1 = False$ ; // Assume Cassette ID is not valid for now.
testCass1 = Cassette1
Convert '*' to '.' in testCass1
If Rds_Services('IsValidRDS', Cassette1, RDSType) then
If Rds_Services('GetHoldStatus', Cassette1, RDSType) EQ False$ then
If Rds_Services('IsPackaged', Cassette1, RDSType) EQ True$ then
ValidCassette1 = True$
end else
Error_Services('Add', RDSType: ' RDS ':testCass1: ' has not completed packaging.')
return
end
end else
Error_Services('Add', RDSType: ' RDS ':testCass1: ' is currently on hold.')
return
end
end else
Error_Services('Add', RDSType: ' RDS ' : testCass1 : ' is an invalid RDS number.')
return
end
Convert '*' to '.' in testCass1
If Rds_Services('IsValidRDS', Cassette1, RDSType) then
If Rds_Services('GetHoldStatus', Cassette1, RDSType) EQ False$ then
If Rds_Services('IsPackaged', Cassette1, RDSType) EQ True$ then
ValidCassette1 = True$
end else
ErrorMsg = RDSType: ' RDS ':testCass1: ' has not completed packaging.'
end
end else
ErrorMsg = RDSType: ' RDS ':testCass1: ' is currently on hold.'
end
end else
ErrorMsg = RDSType: ' RDS ' : testCass1 : ' is an invalid RDS number.'
end
LastPTO = obj_WO_Mat('OutofPTO',WOMatKey)
StepNo = 1
IF LastPTO THEN
MsgHead = 'Cassette previously scanned through PTO'
MsgText = 'Scanned at ':LastPTO<2>:' by ':LastPTO<1>:CRLF$
MsgText := 'Are you sure you wish to rescan and reprint the shipping label?'
If ErrorMsg EQ '' then
LastPTO = obj_WO_Mat('OutofPTO',WOMatKey)
StepNo = 1
IF LastPTO THEN
MsgHead = 'Cassette previously scanned through PTO'
MsgText = 'Scanned at ':LastPTO<2>:' by ':LastPTO<1>:CRLF$
MsgText := 'Are you sure you wish to rescan and reprint the shipping label?'
OK = Msg(@WINDOW, '','YESNO','',MsgHead:@FM:MsgText)
OK = Msg(@WINDOW, '','YESNO','',MsgHead:@FM:MsgText)
IF NOT(OK) THEN
Error_Services('Add', 'Scan Cancelled')
RETURN
END else
Print_SAP_Cass_Ship_Label(WONo,StepNo,CassNo,Cassette1, RDSType)
end
end else
Print_SAP_Cass_Ship_Label(WONo,StepNo,CassNo,Cassette1, RDSType)
END
If ValidCassette1 EQ True$ then
If Param1 NE '' AND ScanData NE Param1 then ;*Cassette2 Scan
Error_Services('Add', 'RDS Mismatch: ':Cassette1: ' does not match ': Param1)
return
end
end else
Error_Services('Add', 'Invalid RDS Number: ':Cassette1)
return
end
If Error_Services('NoError') then
Response = Cassette1
end
Case ScanType EQ 'LABEL2'
cnt = DCount(ScanData, ';')
if cnt EQ 9 then
//Tower is customer and RDS should be 2nd position
Cassette2 = Field(ScanData, ';', 2)
end else if cnt EQ 10 then
//all other customers and RDS should be 3rd position
Cassette2 = Field(ScanData, ';', 3)
end else
Error_Services('Add', 'Invalid Shipping Label Scan.')
return
end
//strip the prefix encoding
If Cassette2[1, 2] EQ '1T' OR Cassette2[1, 2] EQ '2T' then
Cassette2[1, 2] = ''
end else If Cassette2[1,1] EQ 'I' OR ScanData[1,1] EQ 'O' then
Cassette2[1,1] = ''
end
testCass1 = Param3
testCass2 = Cassette2
convert '*' to '.' in testCass1
convert '*' to '.' in testCass2
If testCass1 NE testCass2 then
ErrorMsg = 'Scan Mismatch - RDS values do not match. Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.':CRLF$ |
IF NOT(OK) THEN
ErrorMsg = 'Scan Cancelled'
END else
Print_SAP_Cass_Ship_Label(WONo,StepNo,CassNo,Cassette1, RDSType)
end
end else
Print_SAP_Cass_Ship_Label(WONo,StepNo,CassNo,Cassette1, RDSType)
end
If ErrorMsg EQ '' then
If ValidCassette1 EQ True$ then
If Param1 NE '' AND ScanData NE Param1 then ;*Cassette2 Scan
ErrorMsg = 'RDS Mismatch: ':Cassette1: ' does not match ': Param1
end
end else
ErrorMsg = 'Invalid RDS Number: ':Cassette1
end
If ErrorMsg EQ '' then Response = Cassette1
end
end
end
Case ScanType EQ 'LABEL2'
cnt = DCount(ScanData, ';')
if cnt EQ 9 then
// Tower is customer and RDS should be 2nd position
Cassette2 = Field(ScanData, ';', 2)
end else if cnt EQ 10 then
// All other customers and RDS should be 3rd position
Cassette2 = Field(ScanData, ';', 3)
end else
ErrorMsg = 'Invalid Shipping Label Scan.'
end
If ErrorMsg EQ '' then
// Strip the prefix encoding
If Cassette2[1, 2] EQ '1T' OR Cassette2[1, 2] EQ '2T' then
Cassette2[1, 2] = ''
end else If Cassette2[1,1] EQ 'I' OR ScanData[1,1] EQ 'O' then
Cassette2[1,1] = ''
end
testCass1 = Param3
testCass2 = Cassette2
convert '*' to '.' in testCass1
convert '*' to '.' in testCass2
If testCass1 NE testCass2 then
ErrorMsg = 'Scan Mismatch - RDS values do not match. Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.':CRLF$ |
: 'RDS Label #1: ':testCass1:CRLF$ |
: 'RDS Label #2: ':testCass2:CRLF$
ScanMismatch = True$
gosub ToggleLotHold
Error_Services('Add', ErrorMsg)
return
end
If Error_Services('NoError') then
Response = Cassette2
end
End Case
end
ScanMismatch = True$
GoSub ToggleLotHold
end
If ErrorMsg EQ '' then Response = Cassette2
end
End Case
end else
Error_Services('Add', 'ScanData argument was missing in the ' : Service : ' service.')
ErrorMsg = 'ScanData argument was missing in the ' : Service : ' service.'
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service SaveRecord(CassetteID, Warehouse, Location, OperatorID)
* Write success record in Material Log
// Write success record in Material Log
RDSKey = CassetteID
WMOKey = CassetteID
Convert '.' to '*' in WMOKey
@ -504,20 +595,12 @@ Service SaveRecord(CassetteID, Warehouse, Location, OperatorID)
errCode = ''
obj_WO_Mat_Log('Create',WOMLParms)
* aiParms = 'WO_MAT':@RM:WONo:@RM:CassNo:@RM:WhCd:'*':LocCd:@RM:Action:@RM:InvDTM:@RM:UserID:@RM:Tag:@RM:ToolID
* obj_WO_Mat('AddInvTrans', aiParms)
IF Get_Status(errCode) THEN
swap @SVM with CRLF$ in errCode
ErrorMsg = 'Errors calling obj_WO_Mat_Log("Create"). Error code: ':errCode:', Len(errCode)=':Len(errCode):'. FI has been notified.'
If Get_Status(errCode) then
Swap @SVM with CRLF$ in errCode
ErrorMsg = 'Errors calling obj_WO_Mat_Log("Create"). Error code: ':errCode
Error_Services('Add', ErrorMsg)
if LEN(errCode) > 5 then
Gosub SendErrorNotification
end
Gosub SendErrorNotification
end
end
end service
@ -525,19 +608,20 @@ end service
SendErrorNotification:
Recipients = XLATE('NOTIFICATION','FI_SUPPORT',NOTIFICATION_USER_ID$,'X')
SentFrom = 'MATERIAL_MOVEMENT_SERVICES'
Subject = 'ERROR CALLING OBJ_WO_MAT '
Message = 'Error occured while attempting to write WO_MAT_LOG at ':Location:' Scan':CRLF$:ErrorMsg
AttachKey = WoMatKey
AttachWindow = ''
SendToGroup = ''
Recipients = ''
SentFrom = 'MATERIAL_MOVEMENT_SERVICES'
Subject = 'ERROR CALLING OBJ_WO_MAT '
Message = 'Error occured while attempting to write WO_MAT_LOG at ':Location:' Scan':CRLF$:ErrorMsg
AttachKey = WoMatKey
AttachWindow = ''
SendToGroup = 'FI_SUPPORT'
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
obj_Notes('Create',Parms)
return
ToggleLotHold:
If ScanMismatch EQ True$ then
@ -578,22 +662,26 @@ ToggleLotHold:
// To do: Throw Error
End Case
Convert '*' to '.' in Cassette1
HoldEntityID = Cassette1
// Manually add work order material log entry
WOMatKey = WONo:'*':CassNo
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
NumTimestamps = Dcount(WOMatRec<WO_MAT_INV_WH$>, @VM)
NewEntryPos = NumTimestamps + 1
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_WH$, NewEntryPos, 0, WhCd)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_LOCATION$, NewEntryPos, 0, LocCd)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_ACTION$, NewEntryPos, 0, Action)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_DTM$, NewEntryPos, 0, LogDTM)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_USER$, NewEntryPos, 0, UserID)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_TAG$, NewEntryPos, 0, Tags)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_TOOL_ID$, NewEntryPos, 0, ToolID)
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$)
WOMLParms = LogFile:@RM
WOMLParms := LogDTM:@RM
WOMLParms := Action:@RM
WOMLParms := WhCd:@RM
WOMLParms := LocCd:@RM
WOMLParms := WONo:@RM
WOMLParms := CassNo:@RM
WOMLParms := UserID:@RM
WOMLParms := Tags:@RM
WOMLParms := ToolID
Set_Status(0)
errCode = ''
obj_WO_Mat_Log('Create',WOMLParms)
If Get_Status(errCode) then
Swap @SVM with CRLF$ in errCode
ErrorMsg = 'Error calling obj_WO_Mat_Log("Create"). Error code: ':errCode
Gosub SendErrorNotification
end
// Place first cassette on hold
WOMatKey = WONo:'*':CassNo
@ -637,24 +725,26 @@ ToggleLotHold:
ToolID = ''
HoldEntityID = Cassette2
// Manually add work order material log entry
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
NumTimestamps = Dcount(WOMatRec<WO_MAT_INV_WH$>, @VM)
NewEntryPos = NumTimestamps + 1
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_WH$, NewEntryPos, 0, WhCd)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_LOCATION$, NewEntryPos, 0, LocCd)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_ACTION$, NewEntryPos, 0, Action)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_DTM$, NewEntryPos, 0, LogDTM)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_USER$, NewEntryPos, 0, UserID)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_TAG$, NewEntryPos, 0, Tags)
WOMatRec = INSERT(WOMatRec, WO_MAT_INV_TOOL_ID$, NewEntryPos, 0, ToolID)
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$)
WOMLParms = LogFile:@RM
WOMLParms := LogDTM:@RM
WOMLParms := Action:@RM
WOMLParms := WhCd:@RM
WOMLParms := LocCd:@RM
WOMLParms := WONo:@RM
WOMLParms := CassNo:@RM
WOMLParms := UserID:@RM
WOMLParms := Tags:@RM
WOMLParms := ToolID
Set_Status(0)
errCode = ''
obj_WO_Mat_Log('Create',WOMLParms)
If Get_Status(errCode) then
Swap @SVM with CRLF$ in errCode
ErrorMsg = 'Error calling obj_WO_Mat_Log("Create"). Error code: ':errCode
Gosub SendErrorNotification
end
//pause before putting second cassette on hold
// Place second cassette on hold
WOMatKey = WONo:'*':CassNo
CtrlEntID = False$ ;* Control checked/unchecked
OriginFlag = 'PTO' ;* Flag to indicate a hold initiated from the packaging form
@ -662,7 +752,8 @@ ToggleLotHold:
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEntID, OriginFlag, '', OperatorID)
end
gosub SendPTOMismatchNotification
GoSub SendPTOMismatchNotification
errCode = ''
IF Get_Status(errCode) THEN Error_Services('Add', 'Error code ':errCode:' in ':Service:' service.')
Error_Services('Add', 'Cassette scans did not match! Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.')
@ -671,6 +762,7 @@ ToggleLotHold:
return
SendPTOMismatchNotification:
// Send scan mismatch notification

View File

@ -36,40 +36,37 @@ $insert WO_MAT_EQUATES
$insert APPCOLORS
$insert MESSAGE_BOX_EQUATES
Equ CRLF$ to \0D0A\
Equ CRLF$ to \0D0A\
Equ MSG_WIDTH$ to 600
Equ EditTable$ to @Window:'.OLE_EDT_SCANDATA'
Equ Cassette1$ to @Window:'.EDL_CASSETTE1_SCAN'
Equ Cassette2$ to @Window:'.EDL_CASSETTE2_SCAN'
Equ Supplier$ to @Window:'.EDL_SUPPLIER_SCAN'
Equ Supplier$ to @Window:'.EDL_SUPPLIER_SCAN'
Declare subroutine Set_Property, Send_Event, Post_Event, Send_Message, SendMessage, Error_Services
Declare subroutine Obj_Wo_Mat_Log, Errmsg, Utility, SRP_Show_Window, Material_Movement_Services, Set_Status
Declare function Get_Property, Send_Message, SendMessage, Material_Movement_Services, Error_Services,
Declare function Popup, obj_WO_Mat, Database_Services, Utility, Rds_Services, Message_Box
*Subclass = @Window : '.OLE_SUBCLASS'
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntId else
// Event not implemented
// Event not implemented
end
Return EventFlow or 1
*global
ScanField = ''
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -77,33 +74,24 @@ ScanField = ''
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Event WINDOW.CREATE(CreateParam)
* CurrVer = Xlate('APP_INFO', 'LSL2_VERSION', '', 'X')
* UserVer = Xlate('LSL_USERS', @User4, 'LSL2_VERSION', 'X')
* If UserVer NE CurrVer then
* // Error message and close form
* ErrMsg = 'OpenInsight Version Error':@FM:'You are running an outdated version of OpenInsight and cannot release material until you restart your session.'
* Msg(@Window, '', 'OK', '', ErrMsg)
* Post_Event(@Window, 'CLOSE')
* end else
GoSub SetupOLEControls
GoSub ResetForm
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
* end
GoSub SetupOLEControls
GoSub ResetForm
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
end event
Event OLE_BTN_CLEAR.OnClick(Point, Button, Shift, Ctrl)
*get count of unprocessed records
allCompleted = True$
resp = ''
Data = Get_Property(EditTable$, "OLE.ARRAY")
cnt = count(Data<1>, @VM) + (Data<1># '')
for i = 1 to cnt while allCompleted EQ True$
cntProc = 0
status = Data<4,i>
@ -120,105 +108,117 @@ Event OLE_BTN_CLEAR.OnClick(Point, Button, Shift, Ctrl)
GoSub ResetForm
end
end
end event
Event OLE_BTN_SAVE.OnClick(Point, Button, Shift, Ctrl)
*check for unfinished scan
F1 = Get_Property(Cassette1$, 'TEXT')
F2 = Get_Property(Cassette2$, 'TEXT')
F3 = Get_Property(Supplier$, 'TEXT')
resp = True$
If F1 NE '' OR F2 NE '' OR F3 NE '' then
If F1 NE '' OR F2 NE '' OR F3 NE '' then
resp = Message_Box(@Window, 'You have an unfinished scan (not in grid) - continue?', 'Confirm Save', MSG_BTN_OKCAN$ + MSG_DEFAULT2$)
end
if resp EQ True$ Then
end
if resp EQ True$ Then
Warehouse = '1K'
Location = 'PTI'
Gosub SaveRecords
end
end event
Event EDL_CASSETTE1_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Cassette1'
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE1')
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(Cassette2$, 'ENABLED', True$)
Set_Property(Cassette2$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE1')
If Error_Services('NoError') then
RDSNo = ScanData<1>
SeqNo = ScanData<2>
Set_Property(Cassette1$, '@SEQNO', SeqNo)
Set_Property(CtrlEntID, 'TEXT', RDSNo)
Set_Property(Cassette2$, 'ENABLED', True$)
Set_Property(Cassette2$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end event
Event EDL_CASSETTE2_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Cassette2'
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
Cass1 = Get_Property(Cassette1$, 'TEXT')
retVal = Set_Property(@window, '@IsEpp', False$)
If ScanData[1,1] = 'O' OR ScanData[1,3] = '1TO' then
retVal = Set_Property(@window, '@IsEpp', True$)
end
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE2', Cass1)
If Error_Services('NoError') then
* IF EPP, prepopulate lot and just validate
If Get_Property(@window, '@IsEpp') EQ True$ then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(Supplier$, 'TEXT', 'EpiPRO')
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
Cass1 = Get_Property(Cassette1$, 'TEXT')
Seq1No = Get_Property(Cassette1$, '@SEQNO')
retVal = Set_Property(@window, '@IsEpp', False$)
If Index(ScanData, '.', 1) then
retVal = Set_Property(@window, '@IsEpp', True$)
end
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE2', Cass1, Seq1No)
If Error_Services('NoError') then
* IF EPP, prepopulate lot and just validate
If Get_Property(@window, '@IsEpp') EQ True$ then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(Supplier$, 'TEXT', 'EpiPRO')
Gosub ValidateGrid
Set_Property(Supplier$, 'ENABLED', False$)
Set_Property(Cassette1$, 'FOCUS', True$)
Gosub ValidateGrid
end else
end else
Set_Property(CtrlEntID, 'TEXT', ScanData)
Gosub ValidateGrid
Set_Property(Supplier$, 'ENABLED', True$)
Set_Property(Supplier$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end event
Event EDL_SUPPLIER_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Lot'
If Flag EQ 1 then
Cassette1 = Get_Property(Cassette1$, 'TEXT')
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'SUPPLIER', Cassette1)
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
If Flag EQ 1 then
Cassette1 = Get_Property(Cassette1$, 'TEXT')
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'SUPPLIER', Cassette1)
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end event
@ -227,6 +227,7 @@ end event
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SaveRecords:
*iterate thround all records in the grid, saving them and updating the status and location
Data = Get_Property(EditTable$, "OLE.ARRAY")
cnt = count(Data<1>, @VM) + (Data<1># '')
@ -243,12 +244,12 @@ SaveRecords:
Loc = '1K*PTI'
Set_Property(EditTable$, 'OLE.CellColors[ALL;':i:']', 'Auto':@FM:'Auto')
cntProc += 1
end else
Status = 'Error'
end else
Status = 'Error'
Set_Property(EditTable$, 'OLE.CellColors[ALL;':i:']', 'Auto':@FM:'Red')
end
Set_Property(EditTable$, 'OLE.CELLTEXT[4;':i:']', Status)
end
Set_Property(EditTable$, 'OLE.CELLTEXT[4;':i:']', Status)
Set_Property(EditTable$, 'OLE.CELLTEXT[5;':i:']', Loc)
end
Next i
@ -269,11 +270,12 @@ SaveRecords:
end
Gosub DisableFormControls
return
ValidateGrid:
F1 = Get_Property(Cassette1$, 'TEXT')
F2 = Get_Property(Cassette2$, 'TEXT')
F3 = Get_Property(Supplier$, 'TEXT')
@ -285,11 +287,6 @@ ValidateGrid:
result = 1
end
end
* if ScanField = 'Lot' then ; * do not look for duplicates
* result = 0
* end else
* result = InList(Data, ScanData, @VM) OR InList(Data, ScanData, @FM)
* end
If INDEX(F1,'.',2) then
RDSType = 'EPP'
@ -308,76 +305,78 @@ ValidateGrid:
Case RDSType EQ 'EPP'
WOMatKey = FIELD(F1,'*',1):'*':FIELD(F1,'*',3)
Location = XLATE('WO_MAT', WOMatKey, 'CURR_LOCATION', '', '')
End Case
if result EQ 1 then
ErrorMessage = 'Value already exists in grid: ':ScanData
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
Gosub ResetForm
end else if F1 NE '' AND F2 NE '' AND F3 NE '' then
// Add Material Log Entry
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
UserID = @USER4
LogFile = 'WO_MAT' ;* Changed so all scans are logged in the WO_MAT table 12/3/2006
Action = 'LBLCHK' ;* Final label check for same top and bottom and correct Lot Number on WO_MAT record
WHCd = 'CR' ;* Clean room @ final QA
LocCd = 'PKO' ;* QA wants this to "place" the cassette into the outbound passthrough
WONo = Field(WOMatKey, '*', 1)
CassNo = Field(WOMatKey, '*', 2)
Set_Status(0)
obj_WO_Mat_Log('Create',LogFile:@RM:CurrDTM:@RM:Action:@RM:WhCd:@RM:LocCd:@RM:WONo:@RM:CassNo:@RM:UserID:@RM:'Match')
IF Get_Status(errCode) THEN
Errmsg(errCode)
END else
// Insert row into OLE edit table to provide user feedback.
Data = ''
Data<1> = F1:@VM:F2:@VM:F3:@VM:'Completed':@VM:Location:@VM
Send_Message(EditTable$, 'OLE.INSERT', 1, Data)
GoSub ResetForm
end
// Add Material Log Entry
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
UserID = @USER4
LogFile = 'WO_MAT' ;* Changed so all scans are logged in the WO_MAT table 12/3/2006
Action = 'LBLCHK' ;* Final label check for same top and bottom and correct Lot Number on WO_MAT record
WHCd = 'CR' ;* Clean room @ final QA
LocCd = 'PKO' ;* QA wants this to "place" the cassette into the outbound passthrough
WONo = Field(WOMatKey, '*', 1)
CassNo = Field(WOMatKey, '*', 2)
Set_Status(0)
obj_WO_Mat_Log('Create',LogFile:@RM:CurrDTM:@RM:Action:@RM:WhCd:@RM:LocCd:@RM:WONo:@RM:CassNo:@RM:UserID:@RM:'Match')
IF Get_Status(errCode) THEN
Errmsg(errCode)
END else
// Insert row into OLE edit table to provide user feedback.
Data = ''
Data<1> = F1:@VM:F2:@VM:F3:@VM:'Completed':@VM:Location:@VM
Send_Message(EditTable$, 'OLE.INSERT', 1, Data)
GoSub ResetForm
end
end
return
DisableFormControls:
Set_Property(@Window:'.EDL_CASSETTE1_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_CASSETTE2_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_SUPPLIER_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_CASSETTE1_SCAN', 'ENABLED', False$)
Set_Property(@Window:'.EDL_CASSETTE2_SCAN', 'ENABLED', False$)
Set_Property(@Window:'.EDL_SUPPLIER_SCAN', 'ENABLED', False$)
return
SetupOLEControls:
// Qualify OLE events that we want to intercept
Qualifier = ''
Qualifier<1> = 1
Qualifier<3> = ''
Qualifier<4> = 0 ; * process synchronously
NumCols = 4
NumRows = 150
Ctrl = @Window:'.OLE_BTN_CLEAR'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
Ctrl = @Window:'.OLE_BTN_SAVE'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
DimensionArray = NumCols:@FM:NumRows
Set_Property(EditTable$, "OLE.Dimension", DimensionArray)
Titles = "Top Label":@VM:"Bottom Label":@VM:"Sub Lot":@VM:"Scan Status"
Set_Property(EditTable$, "OLE.TitleList", Titles)
Set_Property(EditTable$, "OLE.DataColumn[1-2]", '85')
Set_Property(EditTable$, "OLE.DataColumn[3]", '80')
Set_Property(EditTable$, "OLE.DataColumn[4]", '90')
// Qualify OLE events that we want to intercept
Qualifier = ''
Qualifier<1> = 1
Qualifier<3> = ''
Qualifier<4> = 0 ; * process synchronously
NumCols = 4
NumRows = 150
Ctrl = @Window:'.OLE_BTN_CLEAR'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
Ctrl = @Window:'.OLE_BTN_SAVE'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
DimensionArray = NumCols:@FM:NumRows
Set_Property(EditTable$, "OLE.Dimension", DimensionArray)
Titles = "Top Label":@VM:"Bottom Label":@VM:"Sub Lot":@VM:"Scan Status"
Set_Property(EditTable$, "OLE.TitleList", Titles)
Set_Property(EditTable$, "OLE.DataColumn[1-2]", '85')
Set_Property(EditTable$, "OLE.DataColumn[3]", '80')
Set_Property(EditTable$, "OLE.DataColumn[4]", '90')
AlignArray = 'C':@FM:'C':@FM:'L'
Set_Property(EditTable$, "OLE.CellAlignment[All; All]", AlignArray)
@ -391,11 +390,13 @@ SetupOLEControls:
AutoNumArray<1, 1> = 'I' ; // Integers
AutoNumArray<1, 2> = 1 ; // Starting integer
Set_Property(EditTable$, "OLE.AutoNumbers", AutoNumArray)
Set_Property(EditTable$, "OLE.CellProtection[All; All]", 'SEL')
SelStyleArray = 'Black' : @VM : OI_HOT_BLUE$ : ' L=70' : @FM : 'Black' : @VM : OI_HOT_BLUE$
Set_Property(EditTable$, 'OLE.SelectionStyle', SelStyleArray) ; // Automatically highlight the current row with one color and highlight the current row with another color.
Set_Property(@Window:'.OLE_BTN_CLEAR', 'OLE.Style', 'STD')
return
@ -414,5 +415,7 @@ ResetForm:
cnt = count(Data<1>, @VM) + (Data<1># '')
Set_Property(@Window:'.OLE_BTN_SAVE', 'ENABLED', cnt GE 1)
Set_Property(EditTable$, 'OLE.CellColors[ALL;All]', 'Auto':@FM:'Auto')
Set_Property(Cassette1$, '@SEQNO', '')
return

View File

@ -36,20 +36,18 @@ $insert WO_MAT_EQUATES
$insert APPCOLORS
$insert MESSAGE_BOX_EQUATES
Equ CRLF$ to \0D0A\
Equ CRLF$ to \0D0A\
Equ MSG_WIDTH$ to 600
Equ EditTable$ to @Window:'.OLE_EDT_SCANDATA'
Equ Cassette1$ to @Window:'.EDL_CASSETTE1_SCAN'
Equ Cassette2$ to @Window:'.EDL_CASSETTE2_SCAN'
Equ Supplier$ to @Window:'.EDL_SUPPLIER_SCAN'
Equ Supplier$ to @Window:'.EDL_SUPPLIER_SCAN'
Declare subroutine Set_Property, Send_Event, Post_Event, Send_Message, SendMessage, Error_Services
Declare subroutine Obj_Wo_Mat_Log, Errmsg, Utility, SRP_Show_Window, Material_Movement_Services, PlaceDialog
Declare function Get_Property, Send_Message, SendMessage, Material_Movement_Services, Error_Services,
Declare function Popup, obj_WO_Mat, Database_Services, Utility, Rds_Services, Message_Box
*Subclass = @Window : '.OLE_SUBCLASS'
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then
Transfer Event to OIEvent
@ -69,7 +67,6 @@ end
Return EventFlow or 1
*global
ScanField = ''
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -151,7 +148,10 @@ Event EDL_CASSETTE1_SCAN.LOSTFOCUS(Flag, FocusID)
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessPTIScanData', ScanData, 'CASSETTE1')
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
RDSNo = ScanData<1>
SeqNo = ScanData<2>
Set_Property(Cassette1$, '@SEQNO', SeqNo)
Set_Property(CtrlEntID, 'TEXT', RDSNo)
Set_Property(Cassette2$, 'ENABLED', True$)
Set_Property(Cassette2$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
@ -171,11 +171,12 @@ end event
Event EDL_CASSETTE2_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Cassette2'
If Flag EQ 1 then
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
Cass1 = Get_Property(Cassette1$, 'TEXT')
Seq1No = Get_Property(Cassette1$, '@SEQNO')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessPTIScanData', ScanData, 'CASSETTE2', Cass1)
ScanData = Material_Movement_Services('ProcessPTIScanData', ScanData, 'CASSETTE2', Cass1, Seq1No)
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Gosub ValidateGrid
@ -379,6 +380,9 @@ SetupOLEControls:
SelStyleArray = 'Black' : @VM : OI_HOT_BLUE$ : ' L=70' : @FM : 'Black' : @VM : OI_HOT_BLUE$
Set_Property(EditTable$, 'OLE.SelectionStyle', SelStyleArray) ; // Automatically highlight the current row with one color and highlight the current row with another color.
Set_Property(@Window:'.OLE_BTN_CLEAR', 'OLE.Style', 'STD')
Set_Property(@Window:'.OLE_BTN_SAVE', 'OLE.Style', 'STD')
return

View File

@ -15,6 +15,7 @@ $INSERT EPI_PART_EQUATES
$INSERT COMPANY_EQUATES
$INSERT CUST_EPI_PART_EQUATES
$INSERT PRS_STAGE_EQUATES
$INSERT UNIT_EQUATES
DECLARE FUNCTION FIELDCOUNT, MSG, Key_Sort, Get_Printer, SRP_Math, Set_Printer, Utility, obj_Install, Printer_Select, obj_Vendor_Code, Direct_Print, Environment_Services
DECLARE SUBROUTINE Extract_Si_Keys, Update_Index, ErrMsg
@ -48,129 +49,139 @@ EQU PS$RECIPE TO 3
EQU PS$FREQ TO 4
EQU PS$PATTERN TO 11
IF NOT(ASSIGNED(RdsIds)) THEN RdsIds = '' ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
IF NOT(ASSIGNED(MultiStep)) THEN MultiStep = '' ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
Main:
IF RdsIds = '' THEN RETURN 0 ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
IF MultiStep = '' THEN MultiStep = 0 ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
IF NOT(ASSIGNED(RdsIds)) THEN RdsIds = '' ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
IF NOT(ASSIGNED(MultiStep)) THEN MultiStep = '' ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
FileName = "Printing Label"
Title = "Printing Label"
IF RdsIds = '' THEN RETURN 0 ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
IF MultiStep = '' THEN MultiStep = 0 ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
PageInfo = ''
PageInfo<PI$LEFT> = 0.1
PageInfo<PI$TOP> = 0.1
PageInfo<PI$RIGHT> = 0.1
PageInfo<PI$BOTTOM> = 0.1
FileName = "Printing Label"
Title = "Printing Label"
PageSetup = '1' ;* Landscape
PrintSetup = '' ;* Preview
PageInfo = ''
PageInfo<PI$LEFT> = 0.1
PageInfo<PI$TOP> = 0.1
PageInfo<PI$RIGHT> = 0.1
PageInfo<PI$BOTTOM> = 0.1
PrinterID = ''
PrintPath = Printer_Select(PrinterID) ;* Popup is skipped IF Printer ID is passed
PageSetup = '1' ;* Landscape
PrintSetup = '' ;* Preview
If PrintPath NE '' then
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath)
end else
stat = Direct_Print('START', PrintPath<1>, '', '')
end
IF stat < 0 THEN GOTO OIPrint_Error
EQU DosPath$ TO 'C:\WINDOWS\OIZPL.TXT' ;* remove jch
CLOrientation = '' ;* used for printing on cleanroom labels
IF RdsIds THEN
Update_Index ("RDS", "WO", "")
Void = utility( 'CURSOR', 'H' )
IdCnt = fieldcount( RdsIds, @FM )
* sort by run order number
IF IdCnt > 1 THEN
RdsIds = key_sort( RdsIds, 'RDS', 'WO':@FM:'RUN_ORDER_NUM', 1, '', '' )
END
PrinterID = ''
PrintPath = Printer_Select(PrinterID) ;* Popup is skipped IF Printer ID is passed
If PrintPath NE '' then
// To work around the design flaws in the label printing logic regarding multiple RDS Key IDs
// while still preserving the variable names, the RdsIds values will be transferred to AllRdsIds
// and then each RDS Key ID will be parsed in a loop and passed into the RdsIds variable.
Transfer RdsIds to AllRdsIds
For Each RdsIds in AllRdsIds using @FM
IdCnt = fieldcount( RdsIds, @FM )
GOSUB PrintCleanRoomLabels
Next RdsIds
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath)
end else
stat = Direct_Print('START', PrintPath<1>, '', '')
end
// Restore RdsIds variable for other processes that need it to be intact.
Transfer AllRdsIds to RdsIds
IF stat GE 0 THEN
UniqueWOs = ''
CustNos = ''
CompositeKeys = ''
IdCnt = fieldcount( RdsIds, @FM )
IF MultiStep > 0 THEN
EQU DosPath$ TO 'C:\WINDOWS\OIZPL.TXT' ;* remove jch
WOStepKeys = XLATE('RDS',RdsIds,RDS_WO_STEP_KEY$,'X') ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
FOR I = 1 TO IdCnt
ThisWO = WOStepKeys<I>
CONVERT '*' TO '.' IN ThisWO
CassNo = XLATE('RDS',RdsIds<I>,'CASS_NO','X')
WOMatRec = XLATE('WO_MAT',ThisWO:'*':CassNo,'','X')
ReShipCustNo = WOMatRec<WO_MAT_RESHIP_CUST_NO$>
If ReShipCustNo EQ '' then
CustNo = XLATE( 'WO_LOG', ThisWO, wo_log_cust_no$, 'X' )
end else
CustNo = ReShipCustNo
end
LOCATE ThisWO : '*' : CustNo IN CompositeKeys USING @VM SETTING FPos ELSE
UniqueWOs<1,-1> = ThisWO
CustNos<1,-1> = CustNo
CompositeKeys<1,-1> = ThisWO : '*' : CustNo
CLOrientation = '' ;* used for printing on cleanroom labels
IF RdsIds THEN
Update_Index ("RDS", "WO", "")
Void = utility( 'CURSOR', 'H' )
IdCnt = fieldcount( RdsIds, @FM )
* sort by run order number
IF IdCnt > 1 THEN
RdsIds = key_sort( RdsIds, 'RDS', 'WO':@FM:'RUN_ORDER_NUM', 1, '', '' )
END
NEXT I
END ELSE
AllWOs = XLATE( 'RDS', RdsIds, rds_wo$, 'X' )
FOR I = 1 TO IdCnt
ThisWO = AllWOs<I>
CassNo = XLATE('RDS',RdsIds<I>,'CASS_NO','X')
WOMatRec = XLATE('WO_MAT',ThisWO:'*':CassNo,'','X')
ReShipCustNo = WOMatRec<WO_MAT_RESHIP_CUST_NO$>
If ReShipCustNo EQ '' then
CustNo = XLATE( 'WO_LOG', ThisWO, wo_log_cust_no$, 'X' )
end else
CustNo = ReShipCustNo
end
LOCATE ThisWO : '*' : CustNo IN CompositeKeys USING @VM SETTING Fpos ELSE
UniqueWOs<1,-1> = ThisWO
CustNos<1,-1> = CustNo
CompositeKeys<1,-1> = ThisWO : '*' : CustNo
END
NEXT I
END
// To work around the design flaws in the label printing logic regarding multiple RDS Key IDs
// while still preserving the variable names, the RdsIds values will be transferred to AllRdsIds
// and then each RDS Key ID will be parsed in a loop and passed into the RdsIds variable.
Transfer RdsIds to AllRdsIds
For Each RdsIds in AllRdsIds using @FM
IdCnt = fieldcount( RdsIds, @FM )
GOSUB PrintCleanRoomLabels
Next RdsIds
// Restore RdsIds variable for other processes that need it to be intact.
Transfer AllRdsIds to RdsIds
UniqueWOs = ''
CustNos = ''
CompositeKeys = ''
IdCnt = fieldcount( RdsIds, @FM )
IF MultiStep > 0 THEN
WOStepKeys = XLATE('RDS',RdsIds,RDS_WO_STEP_KEY$,'X') ;* 5/21/2005 - JCH - Added for Order Entry/Vision upgrade
FOR I = 1 TO IdCnt
ThisWO = WOStepKeys<I>
CONVERT '*' TO '.' IN ThisWO
CassNo = XLATE('RDS',RdsIds<I>,'CASS_NO','X')
WOMatRec = XLATE('WO_MAT',ThisWO:'*':CassNo,'','X')
ReShipCustNo = WOMatRec<WO_MAT_RESHIP_CUST_NO$>
If ReShipCustNo EQ '' then
CustNo = XLATE( 'WO_LOG', ThisWO, wo_log_cust_no$, 'X' )
end else
CustNo = ReShipCustNo
end
LOCATE ThisWO : '*' : CustNo IN CompositeKeys USING @VM SETTING FPos ELSE
UniqueWOs<1,-1> = ThisWO
CustNos<1,-1> = CustNo
CompositeKeys<1,-1> = ThisWO : '*' : CustNo
END
NEXT I
END ELSE
AllWOs = XLATE( 'RDS', RdsIds, rds_wo$, 'X' )
FOR I = 1 TO IdCnt
ThisWO = AllWOs<I>
CassNo = XLATE('RDS',RdsIds<I>,'CASS_NO','X')
WOMatRec = XLATE('WO_MAT',ThisWO:'*':CassNo,'','X')
ReShipCustNo = WOMatRec<WO_MAT_RESHIP_CUST_NO$>
If ReShipCustNo EQ '' then
CustNo = XLATE( 'WO_LOG', ThisWO, wo_log_cust_no$, 'X' )
end else
CustNo = ReShipCustNo
end
LOCATE ThisWO : '*' : CustNo IN CompositeKeys USING @VM SETTING Fpos ELSE
UniqueWOs<1,-1> = ThisWO
CustNos<1,-1> = CustNo
CompositeKeys<1,-1> = ThisWO : '*' : CustNo
END
NEXT I
END
GOSUB PrintWOLabels ;* Activated WO label printing again -dkk 12/3/14
WONo = XLATE('RDS',RdsIds<1>,RDS_WO$,'X')
CustNo = XLATE('WO_LOG',WONo,WO_LOG_CUST_NO$,'X')
Void = UTILITY( 'CURSOR', 'A' )
END
end
GOSUB PrintWOLabels ;* Activated WO label printing again -dkk 12/3/14
GoSub EndPrint
WONo = XLATE('RDS',RdsIds<1>,RDS_WO$,'X')
CustNo = XLATE('WO_LOG',WONo,WO_LOG_CUST_NO$,'X')
Void = UTILITY( 'CURSOR', 'A' )
END
* * * * * *
OIPrint_Error:
* * * * * *
end
RETURN
* * * * * *
EndPrint:
* * * * * *
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("TERM")
end else
stat = Direct_Print('STOP')
end
end
RETURN
return
* * * * * * * * * * * * Local Subroutines * * * * * * * * * * * *
@ -246,9 +257,7 @@ PrintCleanRoomLabels:
PSNIds = XLATE( 'RDS', RdsIds, rds_prod_spec_id$, 'X' )
SpecType = OCONV( XLATE( 'RDS', RdsIds, 'SPEC_TYPE', 'X' ), '[SPEC_TYPE_CONV]' )
SubPartNum = XLATE( 'RDS', RdsIds, 'SUB_PART_NUM', 'X' )
RecipeInfo = XLATE( 'RECIPE', RecipeIDS, 'RECIPE_NAME_NO', 'X' )
ThickVar = XLATE( 'PROD_SPEC', PSNIds, 'THICK_MEASURE_L1', 'X' )
ResVar = XLATE( 'PROD_SPEC', PSNIds, 'RES_MEASURE_L1', 'X' )
ConVar = XLATE( 'PROD_SPEC', PSNIds, 'CON_MEASURE_L1', 'X' )
@ -618,16 +627,16 @@ PrintCleanRoomLabels:
END
swap '~' with fmt( ' ', 'L#2' ) in PrintThickPrintVar
swap 'æm' with 'um' in PrintThickTargets
swap 'ê-cm' with 'ohm.cm' in PrintThickTargets
swap 'ê/Ü' with 'ohm/sq' in PrintThickTargets
swap '' with 'A' in PrintThickTargets
swap UNIT_MICROMETER$ with 'um' in PrintThickTargets
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintThickTargets
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintThickTargets
swap UNIT_A$ with 'A' in PrintThickTargets
swap '~' with fmt( ' ', 'L#2' ) in PrintResPrintVar
swap 'æm' with 'um' in PrintResTargets
swap 'ê-cm' with 'ohm.cm' in PrintResTargets
swap 'ê/Ü' with 'ohm/sq' in PrintResTargets
swap '' with 'A' in PrintResTargets
swap UNIT_MICROMETER$ with 'um' in PrintResTargets
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintResTargets
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintResTargets
swap UNIT_A$ with 'A' in PrintResTargets
//only print cheat sheet label on cassette #1
IF CassNo EQ 1 then
@ -644,6 +653,7 @@ RETURN
* * * * * * *
PrintLabel:
* * * * * * *
* Standard RDS Label print method
IF PrintSpecType EQ 'Production' THEN PrintSpecType = 'Prod'
IF PrintSpecType EQ 'Pre-Production' THEN PrintSpecType = 'Pre'
@ -659,71 +669,71 @@ PrintLabel:
PrintQARecipe = FIELD(PrintRecipe, @VM, 1)
PrintCompany = PrintCompany[1,32]
//looping instead of using ^PQ2 since I have to set sequential key in 2D barcode
// Looping instead of using ^PQ2 since I have to set sequential key in 2D barcode
Str = ''
For cnt = 1 to 2
Str := '^XA'
Str := '^LH0,0'
Str := '^PR1' ;* Print speed 2 inches per second
Str := '^LL406' ;* Label length @203 dpi
Str := '^PW900'
Str := '^MD0' ;* Media darkness
Str := '^MMT' ;* Media mode t=tear off mode
*Str := '^PQ2' ;* Print 2 labels for each pass through here
For cnt = 1 to 2
Str := '^XA'
Str := '^LH0,0'
Str := '^PR1' ;* Print speed 2 inches per second
Str := '^LL406' ;* Label length @203 dpi
Str := '^PW900'
Str := '^MD5' ;* Media darkness
Str := '^MMT' ;* Media mode t=tear off mode
*Str := '^PQ2' ;* Print 2 labels for each pass through here
****** First Line, Cust, WO and RO
Str := '^FO25,25^AC,18^FDCust: ^FS':CRLF$
Str := '^FO95,14^A045,35^FD':PrintCompany:'^FS':CRLF$
Str := '^FO570,25^AC18^FDWO: ^FS':CRLF$
Str := '^FO610,14^A045,35^FD':PrintWO:'^FS':CRLF$
Str := '^FO730,25^AC18^FDRO: ^FS':CRLF$
Str := '^FO770,14^A045,35^FD':PrintRONum:'^FS':CRLF$
****** Second Line, Cust Spec, PSN and Type
Str := '^FO25,75^AC18^FD(P)Cust Spec: ^FS':CRLF$
Str := '^FO185,65^A045,35^FD':CustEpiPartSpecNo:'^FS':CRLF$
Str := '^FO25,95^BY2,2.0^B3,,50,N^FDP':CustEpiPartSpecNo:'^FS':CRLF$
Str := '^FO640,75^AC18^FDPSN:^FS':CRLF$
Str := '^FO690,65^A045,35^FD':PrintPSN:'^FS':CRLF$
Str := '^FO630,125^AC18^FDType:^FS':CRLF$
Str := '^FO690,115^A045,30^FD':PrintSpecType:'^FS':CRLF$
****** Third Line, Sub Lot, Qty and RDS
Str := '^FO25,175^AC18^FD(2T)Sub Lot:^FS':CRLF$
Str := '^FO175,165^A045,35^FD':PrintLotNum:'^FS':CRLF$
Str := '^FO25,195^BY1,3.0^B3,,50,N^FD2T':PrintLotNum:'^FS':CRLF$
Str := '^FO400,175^AC18^FD(Q)Qty:^FS':CRLF$
Str := '^FO500,165^A045,35^FD':PrintQty:'^FS':CRLF$
Str := '^FO400,195^B3,,50,N^FDQ':PrintQty:'^FS':CRLF$
Str := '^FO590,175^AC18^FD(1T)RDS: ^FS':CRLF$
Str := '^FO690,165^A045,35^FD':PrintRDSId:'^FS':CRLF$
Str := '^FO630,195^B3,,50,N^FD1T':PrintRDSId:'^FS':CRLF$
****** Fourth Line, SubPN, Vendor and QA Metrology recipe
Str := '^FO25,275^AC18^FD(S)Sub PN:^FS':CRLF$
Str := '^FO145,265^A045,35^FD':PrintSubPartNum:'^FS':CRLF$
Str := '^FO25,295^B3,,50,N^FDS':PrintSubPartNum:'^FS':CRLF$
Str := '^FO400,275^AC18^FD(1V)Vend:^FS':CRLF$
Str := '^FO510,265^A045,35^FD':PrintSuppCd:'^FS':CRLF$
Str := '^FO400,295^B3,,50,N^FD1V':PrintSuppCd:'^FS':CRLF$
Str := '^FO590,275^AC18^FD':PrintQARecipe:'^FS':CRLF$
****** Fifth Line, Motto and Data Matrix barcode
Str := '^FO25,370^A045,28':CRLF$
Str := "^FDWe do what we promise. That's quality made by Infineon.^FS":CRLF$
Str := '^FO725,320^CI28':CRLF$
Str := '^BXN,2,200^FDP':CustEpiPartSpecNo:'|S':PrintSubPartNum:'|1T':PrintRDSId:'|2T':PrintLotNum:'|':PrintPSN:'|Q':PrintQty:'|1V':PrintSuppCd:'|SEQ':cnt:'^FS':CRLF$
****** End the print job (ZPL script)
Str:= '^XZ'
Next
****** First Line, Cust, WO and RO
Str := '^FO25,25^AC,18^FDCust: ^FS':CRLF$
Str := '^FO95,14^A045,35^FD':PrintCompany:'^FS':CRLF$
Str := '^FO570,25^AC18^FDWO: ^FS':CRLF$
Str := '^FO610,14^A045,35^FD':PrintWO:'^FS':CRLF$
Str := '^FO730,25^AC18^FDRO: ^FS':CRLF$
Str := '^FO770,14^A045,35^FD':PrintRONum:'^FS':CRLF$
****** Second Line, Cust Spec, PSN and Type
Str := '^FO25,75^AC18^FD(P)Cust Spec: ^FS':CRLF$
Str := '^FO185,65^A045,35^FD':CustEpiPartSpecNo:'^FS':CRLF$
Str := '^FO25,95^BY2,2.0^B3,,50,N^FDP':CustEpiPartSpecNo:'^FS':CRLF$
Str := '^FO640,75^AC18^FDPSN:^FS':CRLF$
Str := '^FO690,65^A045,35^FD':PrintPSN:'^FS':CRLF$
Str := '^FO630,125^AC18^FDType:^FS':CRLF$
Str := '^FO690,115^A045,30^FD':PrintSpecType:'^FS':CRLF$
****** Third Line, Sub Lot, Qty and RDS
Str := '^FO25,175^AC18^FD(2T)Sub Lot:^FS':CRLF$
Str := '^FO175,165^A045,35^FD':PrintLotNum:'^FS':CRLF$
Str := '^FO25,195^BY1,3.0^B3,,50,N^FD2T':PrintLotNum:'^FS':CRLF$
Str := '^FO400,175^AC18^FD(Q)Qty:^FS':CRLF$
Str := '^FO500,165^A045,35^FD':PrintQty:'^FS':CRLF$
Str := '^FO400,195^B3,,50,N^FDQ':PrintQty:'^FS':CRLF$
Str := '^FO590,175^AC18^FD(1T)RDS: ^FS':CRLF$
Str := '^FO690,165^A045,35^FD':PrintRDSId:'^FS':CRLF$
Str := '^FO630,195^B3,,50,N^FD1T':PrintRDSId:'^FS':CRLF$
****** Fourth Line, SubPN, Vendor and QA Metrology recipe
Str := '^FO25,275^AC18^FD(S)Sub PN:^FS':CRLF$
Str := '^FO145,265^A045,35^FD':PrintSubPartNum:'^FS':CRLF$
Str := '^FO25,295^B3,,50,N^FDS':PrintSubPartNum:'^FS':CRLF$
Str := '^FO400,275^AC18^FD(1V)Vend:^FS':CRLF$
Str := '^FO510,265^A045,35^FD':PrintSuppCd:'^FS':CRLF$
Str := '^FO400,295^B3,,50,N^FD1V':PrintSuppCd:'^FS':CRLF$
Str := '^FO590,275^AC18^FD':PrintQARecipe:'^FS':CRLF$
****** Fifth Line, Motto and Data Matrix barcode
Str := '^FO25,370^A045,28':CRLF$
Str := "^FDWe do what we promise. That's quality made by Infineon.^FS":CRLF$
Str := '^FO725,320^CI28':CRLF$
Str := '^BXN,2,200^FDP':CustEpiPartSpecNo:'|S':PrintSubPartNum:'|1T':PrintRDSId:'|2T':PrintLotNum:'|':PrintPSN:'|Q':PrintQty:'|1V':PrintSuppCd:'|SEQ':cnt:'^FS':CRLF$
****** End the print job (ZPL script)
Str:= '^XZ'
Next
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',Str)
end else
stat = Direct_Print('PRINT', Str)
end
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',Str)
end else
stat = Direct_Print('PRINT', Str)
end
RETURN
@ -783,7 +793,6 @@ PrintWOLabel:
END ELSE
Str:= '^FO70,30^A0220,210^FD':PrintUniqueWO:'^FS':CRLF$
END
CustName = XLATE( 'COMPANY', CustNo, 'ABBREV_OR_CO_NAME', 'X' )
@ -801,6 +810,7 @@ PrintWOLabel:
end else
stat = Direct_Print('PRINT', Str)
end
RETURN
@ -826,10 +836,10 @@ PrintCheatSheetLabel:
WaferSize = XLATE('EPI_PART', CustPart, EPI_PART_SUB_WAFER_SIZE$, 'X')
*Field(SpecSub, @VM, QSSubWafersize$)
convert char(248) to @fm in SpecEpi ;* char(248) is used to separate layers
layerCount = fieldcount( SpecEpi, @fm )
layerInfo = SpecEpi<layerCount>
//if this is just 1 layer, we're returning that info, if 3 layers, we're returning layer 3 (combo)
convert char(248) to @fm in SpecEpi ;* char(248) is used to separate layers
layerCount = fieldcount( SpecEpi, @fm )
layerInfo = SpecEpi<layerCount>
//if this is just 1 layer, we're returning that info, if 3 layers, we're returning layer 3 (combo)
ThkData = Field(layerInfo, @VM, QSEpiThickMeasure$)
ResData = Field(layerInfo, @VM, QSEpiResMeasure$)

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@ $INSERT WM_OUT_EQUATES
$INSERT EPI_PART_EQUATES
$INSERT CUST_EPI_PART_EQUATES
$INSERT PRS_STAGE_EQUATES
$insert UNIT_EQUATES
DECLARE FUNCTION Msg, Get_Printer, Set_Printer, Utility, obj_Install, Printer_Select, FieldCount, Popup
DECLARE FUNCTION MemberOf, Direct_Print, Environment_Services
@ -41,192 +42,200 @@ EQU PI$WIDTH TO 5
EQU PI$HEIGHT TO 6
EQU PI$SIZE TO 7
IF NOT(ASSIGNED(WONo)) THEN RETURN
IF WONo = '' THEN RETURN
IF NOT(ASSIGNED(WOStep)) THEN WOStep = 1
FileName = "Printing Label"
Title = "Printing Label"
PageInfo = ''
PageInfo<PI$LEFT> = 0.1
PageInfo<PI$TOP> = 0.1
PageInfo<PI$RIGHT> = 0.1
PageInfo<PI$BOTTOM> = 0.1
PageSetup = '1' ;* Landscape
PrintSetup = '' ;* Preview
PrinterID = ''
PrintPath = Printer_Select(PrinterID) ;* Popup is skipped IF Printer ID is passed
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath)
end else
stat = Direct_Print('START', PrintPath<1>, '', '')
end
IF stat < 0 THEN GOTO OIPrint_Error
CLOrientation = '' ;* used for printing on cleanroom labels
WMOutKeys = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_WM_OUT_KEYS$,'X')
TypeOver = ''
TypeOver<PDISPLAY$> = WMOutKeys
TypeOver<PTITLE$> = 'WM_OUT - Outbound Cassettes'
WMoutKeys = Popup(@WINDOW,TypeOver,'PRINT_WM_LABELS')
CONVERT '.' TO '*' IN WMOutKeys
IF WMOutKeys = '' THEN RETURN
Void = Utility( 'CURSOR', 'H' )
WOStepKeys = XLATE('WO_LOG',WONo,WO_LOG_WO_STEP_KEY$,'X')
IF INDEX(WOStepKeys,@VM,1) THEN
PrintWONo = WONo:'.':WOStep
END ELSE
PrintWONo = WONo
END
WORec = XLATE('WO_LOG',WONo,'','X')
ReqShipDate = OCONV(WORec<WO_LOG_PROMISE_SHIP_DT$>,'D2/')
CustNo = WORec<WO_LOG_CUST_NO$>
CustName = XLATE('COMPANY',CustNo,'ABBREV_OR_CO_NAME','X')
Captive = XLATE('COMPANY',CustNo,'CAPTIVE','X')
PONo = WORec<WO_LOG_CUST_PO_NO$>
PSNo = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X')
PSRec = XLATE('PROD_SPEC',PSNo,'','X')
CustSpecNo = ''
IF Captive THEN
CustSpecNos = PSRec<PROD_SPEC_SPEC_NUM$>
CustSpecDescs = PSRec<PROD_SPEC_SPEC_DESC$>
CustSpecRevNos = PSRec<PROD_SPEC_REV_NUM$>
CustSpecRevDts = PSRec<PROD_SPEC_REV_DATE$>
Main:
SpecCnt = COUNT(CustSpecNos,@VM) + (CustSpecNos NE '')
FOR I = 1 TO SpecCnt
IF CustSpecDescs<1,I> _EQC 'GENERAL' THEN
CustSpecNo = CustSpecNos<1,I>
CustSpecDesc = CustSpecDescS<1,I>
CustSpecRevNo = CustSpecRevNos<1,I>
CustSpecRevDt = OCONV(CustSpecRevDts<1,I>,'D4/')
IF NOT(ASSIGNED(WONo)) THEN RETURN
IF WONo = '' THEN RETURN
IF NOT(ASSIGNED(WOStep)) THEN WOStep = 1
FileName = "Printing Label"
Title = "Printing Label"
PageInfo = ''
PageInfo<PI$LEFT> = 0.1
PageInfo<PI$TOP> = 0.1
PageInfo<PI$RIGHT> = 0.1
PageInfo<PI$BOTTOM> = 0.1
PageSetup = '1' ;* Landscape
PrintSetup = '' ;* Preview
PrinterID = ''
PrintPath = Printer_Select(PrinterID) ;* Popup is skipped IF Printer ID is passed
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath)
end else
stat = Direct_Print('START', PrintPath<1>, '', '')
end
IF stat GE 0 THEN
CLOrientation = '' ;* used for printing on cleanroom labels
WMOutKeys = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_WM_OUT_KEYS$,'X')
TypeOver = ''
TypeOver<PDISPLAY$> = WMOutKeys
TypeOver<PTITLE$> = 'WM_OUT - Outbound Cassettes'
TypeOver<PSHOWGAUGE$> = True$
WMoutKeys = Popup(@WINDOW,TypeOver,'PRINT_WM_LABELS')
CONVERT '.' TO '*' IN WMOutKeys
IF WMOutKeys = '' THEN RETURN
Void = Utility( 'CURSOR', 'H' )
WOStepKeys = XLATE('WO_LOG',WONo,WO_LOG_WO_STEP_KEY$,'X')
IF INDEX(WOStepKeys,@VM,1) THEN
PrintWONo = WONo:'.':WOStep
END ELSE
PrintWONo = WONo
END
UNTIL CustSpecNo NE ''
WORec = XLATE('WO_LOG',WONo,'','X')
ReqShipDate = OCONV(WORec<WO_LOG_PROMISE_SHIP_DT$>,'D2/')
CustNo = WORec<WO_LOG_CUST_NO$>
CustName = XLATE('COMPANY',CustNo,'ABBREV_OR_CO_NAME','X')
Captive = XLATE('COMPANY',CustNo,'CAPTIVE','X')
PONo = WORec<WO_LOG_CUST_PO_NO$>
PSNo = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X')
PSRec = XLATE('PROD_SPEC',PSNo,'','X')
CustSpecNo = ''
IF Captive THEN
CustSpecNos = PSRec<PROD_SPEC_SPEC_NUM$>
CustSpecDescs = PSRec<PROD_SPEC_SPEC_DESC$>
CustSpecRevNos = PSRec<PROD_SPEC_REV_NUM$>
CustSpecRevDts = PSRec<PROD_SPEC_REV_DATE$>
SpecCnt = COUNT(CustSpecNos,@VM) + (CustSpecNos NE '')
FOR I = 1 TO SpecCnt
IF CustSpecDescs<1,I> _EQC 'GENERAL' THEN
CustSpecNo = CustSpecNos<1,I>
CustSpecDesc = CustSpecDescS<1,I>
CustSpecRevNo = CustSpecRevNos<1,I>
CustSpecRevDt = OCONV(CustSpecRevDts<1,I>,'D4/')
END
UNTIL CustSpecNo NE ''
NEXT I
END
EpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
CustEpiPartRec = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,'','X')
ShipBagReq = CustEpiPartRec<CUST_EPI_PART_SHIP_BAG_REQ$>
PreSurfscan = XLATE('PRS_STAGE',PSNo:'*PRE',PRS_STAGE_SURFSCAN_SIG_REQ$,'X')
FirstSurfscan = XLATE('PRS_STAGE',PSNo:'*WFR',PRS_STAGE_SURFSCAN_SIG_REQ$,'X')
PostCleanSurfScan = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURFSCAN_SIG_REQ$,'X')
PostCleanSSSampleQty = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SS_SAMP_QTY$, 'X' )
PostCleanSurfscanRecipe = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURFSCAN_RECIPE$,'X')
PostCleanSurfDefects = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURF_DEFECTS$,'X')
PostCleanSurfHaze = OCONV(XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURF_HAZE$,'X'),'MD2')
SubPreClean = XLATE('PRS_STAGE',PSNo:'*PRE','TOOL_DISPLAY','X')
SubPostClean = XLATE('PRS_STAGE',PSNo:'*POST','TOOL_DISPLAY','X')
PreCleanTool = XLATE('PRS_STAGE',PSNo:'*PRE','TOOL_DISPLAY','X')
PostCleanTool = XLATE('PRS_STAGE',PSNo:'*POST','TOOL_DISPLAY','X')
PreAkrionRecipe = XLATE('PRS_STAGE',PSNo:'*PRE',PRS_STAGE_CLEAN_RECIPE$,'X')
PostAkrionRecipe = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_CLEAN_RECIPE$,'X')
* * * * * * * * Following needs update to point to the PRS_LAYER & PRS_STAGE tables as required.
* * * * * * * * It's the required part that needs sorted out JCH 1/28/2014
RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO_L1', 'X' )
RecipeName = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NAME_L1', 'X' )
SpecType = OCONV( XLATE( 'PROD_SPEC', PSNo, 'SPEC_TYPE', 'X' ), '[SPEC_TYPE_CONV]' )
SubOxide = OCONV( XLATE( 'PROD_SPEC', PSNo, 'SUB_OXIDE_STRIP', 'X' ), 'B' )
ThickTarget = OCONV( XLATE( 'PROD_SPEC', PSNo, 'THICK_TARGET_ALL', 'X' ), 'MD3' )
ResTarget = OCONV( XLATE( 'PROD_SPEC', PSNo, 'RES_TARGET_ALL', 'X' ), 'MD3' )
ThickUnit = XLATE( 'PROD_SPEC', PSNo, 'THICK_UNITS_ALL', 'X' )
ResUnit = XLATE( 'PROD_SPEC', PSNo , 'RES_UNITS_ALL', 'X' )
Dopant = XLATE( 'PROD_SPEC', PSNo, 'DOPANT_L1', 'X' )
RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO', 'X' )
RecipeInfo = XLATE( 'RECIPE', RecipeNo, 'RECIPE_NAME_NO', 'X' )
CleaningReqs = ''
ThickCnt = FIELDCOUNT( ThickTarget<1>, @VM )
PrintThickTargets = ''
FOR J = 1 TO ThickCnt
PrintThickTargets<1,J> = ThickTarget<1,J>:ThickUnit<1,J>
NEXT J
ResCnt = FIELDCOUNT( ResTarget<1>, @VM )
PrintResTargets = ''
FOR J = 1 TO ResCnt
IF ResTarget<1,J>[1,1] = '.' THEN
TargetVal = '0':ResTarget<1,J>
END ELSE
TargetVal = ResTarget<1,J>
END
PrintResTargets<1,J> = TargetVal:ResUnit<1,J>
NEXT J
APreRec = ''
APostRec = ''
IF ( PreAkrionRecipe<1> <> '' ) THEN
APreRec = ' ':PreAkrionRecipe:' '
SubOxide = 'No' ;* If Akrion then no oxide strip
END
IF ( PostAkrionRecipe<1> <> '' ) THEN
APostRec = ' ':PostAkrionRecipe
END
PrintCleaningReqs = TRIM( 'Strip:':SubOxide:' Pre:':SubPreClean:APreRec:' Post:':SubPostClean:APostRec )
swap UNIT_MICROMETER$ with 'um' in PrintThickTargets
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintThickTargets
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintThickTargets
swap UNIT_A$ with 'A' in PrintThickTargets
swap UNIT_MICROMETER$ with 'um' in PrintResTargets
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintResTargets
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintResTargets
swap UNIT_A$ with 'A' in PrintResTargets
WMOBoxCnt = COUNT( WMOutKeys, @VM ) + (WMOutKeys NE '')
GOSUB PrintCleanRoomLabels
GOSUB PrintWOLabels ;* Activated WO label printing again -dkk 12/3/14
Void = UTILITY( 'CURSOR', 'A' )
end
NEXT I
END
GoSub EndPrint
EpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
CustEpiPartRec = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,'','X')
return
ShipBagReq = CustEpiPartRec<CUST_EPI_PART_SHIP_BAG_REQ$>
PreSurfscan = XLATE('PRS_STAGE',PSNo:'*PRE',PRS_STAGE_SURFSCAN_SIG_REQ$,'X')
FirstSurfscan = XLATE('PRS_STAGE',PSNo:'*WFR',PRS_STAGE_SURFSCAN_SIG_REQ$,'X')
PostCleanSurfScan = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURFSCAN_SIG_REQ$,'X')
PostCleanSSSampleQty = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SS_SAMP_QTY$, 'X' )
PostCleanSurfscanRecipe = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURFSCAN_RECIPE$,'X')
PostCleanSurfDefects = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURF_DEFECTS$,'X')
PostCleanSurfHaze = OCONV(XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_SURF_HAZE$,'X'),'MD2')
SubPreClean = XLATE('PRS_STAGE',PSNo:'*PRE','TOOL_DISPLAY','X')
SubPostClean = XLATE('PRS_STAGE',PSNo:'*POST','TOOL_DISPLAY','X')
PreCleanTool = XLATE('PRS_STAGE',PSNo:'*PRE','TOOL_DISPLAY','X')
PostCleanTool = XLATE('PRS_STAGE',PSNo:'*POST','TOOL_DISPLAY','X')
PreAkrionRecipe = XLATE('PRS_STAGE',PSNo:'*PRE',PRS_STAGE_CLEAN_RECIPE$,'X')
PostAkrionRecipe = XLATE('PRS_STAGE',PSNo:'*POST',PRS_STAGE_CLEAN_RECIPE$,'X')
* * * * * * * * Following needs update to point to the PRS_LAYER & PRS_STAGE tables as required.
* * * * * * * * It's the required part that needs sorted out JCH 1/28/2014
RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO_L1', 'X' )
RecipeName = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NAME_L1', 'X' )
SpecType = OCONV( XLATE( 'PROD_SPEC', PSNo, 'SPEC_TYPE', 'X' ), '[SPEC_TYPE_CONV]' )
SubOxide = OCONV( XLATE( 'PROD_SPEC', PSNo, 'SUB_OXIDE_STRIP', 'X' ), 'B' )
ThickTarget = OCONV( XLATE( 'PROD_SPEC', PSNo, 'THICK_TARGET_ALL', 'X' ), 'MD3' )
ResTarget = OCONV( XLATE( 'PROD_SPEC', PSNo, 'RES_TARGET_ALL', 'X' ), 'MD3' )
ThickUnit = XLATE( 'PROD_SPEC', PSNo, 'THICK_UNITS_ALL', 'X' )
ResUnit = XLATE( 'PROD_SPEC', PSNo , 'RES_UNITS_ALL', 'X' )
Dopant = XLATE( 'PROD_SPEC', PSNo, 'DOPANT_L1', 'X' )
RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO', 'X' )
RecipeInfo = XLATE( 'RECIPE', RecipeNo, 'RECIPE_NAME_NO', 'X' )
CleaningReqs = ''
ThickCnt = FIELDCOUNT( ThickTarget<1>, @VM )
PrintThickTargets = ''
FOR J = 1 TO ThickCnt
PrintThickTargets<1,J> = ThickTarget<1,J>:ThickUnit<1,J>
NEXT J
ResCnt = FIELDCOUNT( ResTarget<1>, @VM )
PrintResTargets = ''
FOR J = 1 TO ResCnt
IF ResTarget<1,J>[1,1] = '.' THEN
TargetVal = '0':ResTarget<1,J>
END ELSE
TargetVal = ResTarget<1,J>
END
PrintResTargets<1,J> = TargetVal:ResUnit<1,J>
NEXT J
APreRec = ''
APostRec = ''
IF ( PreAkrionRecipe<1> <> '' ) THEN
APreRec = ' ':PreAkrionRecipe:' '
SubOxide = 'No' ;* If Akrion then no oxide strip
END
IF ( PostAkrionRecipe<1> <> '' ) THEN
APostRec = ' ':PostAkrionRecipe
END
PrintCleaningReqs = TRIM( 'Strip:':SubOxide:' Pre:':SubPreClean:APreRec:' Post:':SubPostClean:APostRec )
swap 'æm' with 'um' in PrintThickTargets
swap 'ê-cm' with 'ohm.cm' in PrintThickTargets
swap 'ê/Ü' with 'ohm/sq' in PrintThickTargets
swap '' with 'A' in PrintThickTargets
swap 'æm' with 'um' in PrintResTargets
swap 'ê-cm' with 'ohm.cm' in PrintResTargets
swap 'ê/Ü' with 'ohm/sq' in PrintResTargets
swap '' with 'A' in PrintResTargets
WMOBoxCnt = COUNT( WMOutKeys, @VM ) + (WMOutKeys NE '')
GOSUB PrintCleanRoomLabels
GOSUB PrintWOLabels ;* Activated WO label printing again -dkk 12/3/14
Void = UTILITY( 'CURSOR', 'A' )
* * * * * *
OIPrint_Error:
EndPrint:
* * * * * *
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("TERM")
end else
stat = Direct_Print('STOP')
end
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("TERM")
end else
stat = Direct_Print('STOP')
end
RETURN
@ -235,237 +244,238 @@ RETURN
* * * * * * *
PrintCleanRoomLabels:
* * * * * * *
FOR I = 1 TO WMOBoxCnt
WMOutKey = WMOutKeys<1,I>
MakeupBox = XLATE('WM_OUT',WMOutKey,WM_OUT_MAKEUP_BOX$ ,'X')
PrintWMOutKey = WMOutKey
CONVERT '*' TO '.' IN PrintWMOutKey
CassNo = FIELD(WMOutKey,'*',3)
LotNo = 'Multiple'
WfrQty = XLATE('WM_OUT',WMOutKey,'WFRS_SCHED','X')
SubPartNo = WORec<WO_LOG_ORD_SUB_PART_NO$>
CustPartNo = WORec<WO_LOG_CUST_PART_NO$>
EpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
CustPartDesc = XLATE('EPI_PART',EpiPartNo,EPI_PART_EPI_PART_DESC$,'X')
PartNo = CustPartNo ;* Temporary for 4x2 to 4x4 conversion
PartDesc = CustPartDesc ;* Temporary for 4x2 to 4x4 conversion
SubVendCode = WORec<WO_LOG_EXP_VEND_CD$>
Vendor = XLATE('SEMI_VEND_CODE', SubVendCode, 'EPI_VEND_CD', 'X')
FOR I = 1 TO WMOBoxCnt
SuppCd = TRIM(SubPartNo[-1,'B-'])
IF LEN(SuppCd) NE '2' THEN SuppCd =''
WMOutKey = WMOutKeys<1,I>
MakeupBox = XLATE('WM_OUT',WMOutKey,WM_OUT_MAKEUP_BOX$ ,'X')
PrintWMOutKey = WMOutKey
CONVERT '*' TO '.' IN PrintWMOutKey
CassNo = FIELD(WMOutKey,'*',3)
LotNo = 'Multiple'
WfrQty = XLATE('WM_OUT',WMOutKey,'WFRS_SCHED','X')
SubPartNo = WORec<WO_LOG_ORD_SUB_PART_NO$>
CustPartNo = WORec<WO_LOG_CUST_PART_NO$>
EpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
CustPartDesc = XLATE('EPI_PART',EpiPartNo,EPI_PART_EPI_PART_DESC$,'X')
PartNo = CustPartNo ;* Temporary for 4x2 to 4x4 conversion
PartDesc = CustPartDesc ;* Temporary for 4x2 to 4x4 conversion
SubVendCode = WORec<WO_LOG_EXP_VEND_CD$>
Vendor = XLATE('SEMI_VEND_CODE', SubVendCode, 'EPI_VEND_CD', 'X')
SuppCd = TRIM(SubPartNo[-1,'B-'])
IF LEN(SuppCd) NE '2' THEN SuppCd =''
GOSUB PrintLabel
NEXT I
GOSUB PrintLabel
NEXT I
RETURN
* * * * * * *
PrintLabel:
* * * * * * *
Str = ''
For cnt = 1 to 2
***** Start of label ZPL
Str := '^XA'
***** Label setup
Str := '^LH0,0'
Str := '^PR2' ;* Print speed 2 inches per second
Str := '^LL406' ;* Label length 203 dpi
Str := '^PW900' ;* Print width 900 dpi
Str := '^MD2' ;* Media darkness
Str := '^MMT':CRLF$ ;* Media mode t=tear off mode
//Str := '^PQ2' ;* Print 2 labels for each pass through here
***** Border
Str := '^FO10,5^GB795,398,3,B^FS':CRLF$
****** First Line
Company = 'IFX Epi Services'
Str := '^FO30,20^A0,45,36^FD':Company:'^FS':CRLF$
Str := '^FO290,25^AC,18^FDWO No:^FS':CRLF$
Str := '^FO370,20^A045,36^FD':PrintWONo:'^FS':CRLF$
Str = ''
For cnt = 1 to 2
***** Start of label ZPL
Str := '^XA'
***** Label setup
Str := '^LH0,0'
Str := '^PR2' ;* Print speed 2 inches per second
Str := '^LL406' ;* Label length 203 dpi
Str := '^PW900' ;* Print width 900 dpi
Str := '^MD2' ;* Media darkness
Str := '^MMT':CRLF$ ;* Media mode t=tear off mode
//Str := '^PQ2' ;* Print 2 labels for each pass through here
***** Border
Str := '^FO10,5^GB795,398,3,B^FS':CRLF$
****** First Line
Company = 'IFX Epi Services'
Str := '^FO30,20^A0,45,36^FD':Company:'^FS':CRLF$
Str := '^FO290,25^AC,18^FDWO No:^FS':CRLF$
Str := '^FO370,20^A045,36^FD':PrintWONo:'^FS':CRLF$
IF CassNo = 1 THEN
Str := '^FO535,15^GB120,40,40,,3^FS':CRLF$
Str := '^FO540,25^AC,18^FR^FDCass:^FS':CRLF$
Str := '^FO600,20^A045,36^FR^FD':CassNo:'^FS':CRLF$
END ELSE
Str := '^FO540,25^AC,18^FDCass:^FS':CRLF$
Str := '^FO600,20^A045,36^FD':CassNo:'^FS':CRLF$
END
Str:= '^FO665,20^A045,36^FDWM Out^FS':CRLF$
****** Second Line
Str:= '^FO30,70^AC,18^FDWM Out:^FS':CRLF$
Str:= '^FO120,65^A050,30^FD':PrintWMOutKey:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO300,58^B3,,37,N^FD':'O':PrintWMOutKey:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
Str:= '^FO700,60^AC,18^FDQty:^FS':CRLF$
Str:= '^FO760,60^A045,25^FD':WfrQty:'^FS':CRLF$
****** Third Line
Str:= '^FO30,100^AC,18^FDShip Dt:^FS':CRLF$
Str:= '^FO140,100^A0,,25^FD':ReqShipDate:'^FS':CRLF$
Str:= '^FO250,100^AC,18^FDCust:^FS':CRLF$
Str:= '^FO320,100^A045,25^FD':CustName:'^FS':CRLF$
Str:= '^FO560,100^AC,18^FDPO:^FS':CRLF$
Str:= '^FO600,100^A045,25^FD':PONo:'^FS':CRLF$
****** Separator bar
Str:= '^FO15,125^GB790,1^FS':CRLF$
****** Fourth Line
Str := '^FO30,130^AC,18^FDLot No:^FS':CRLF$
Str := '^FO120,130^A0,20^FD':LotNo:'^FS':CRLF$
Str := '^FO410,130^AC,18^FDPart No:^FS':CRLF$
Str := '^FO510,130^A0,20^FD':PartNo:'^FS':CRLF$
****** Fifth Line
Str := '^FO30,155^AC,18^FDSub PN:^FS':CRLF$
Str := '^FO120,155^A0,20^FD':SubPartNo:'^FS':CRLF$
IF SuppCd NE '' THEN
Str := '^FO410,155^AC,18^FDSupp Cd:^FS':CRLF$
Str := '^FO510,155^A0,20^FD':SuppCd:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO610,155^A040,20^B3,,23,N^FD':SuppCd:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
END
****** Separator bar
Str := '^FO15,180^GB790,1^FS':CRLF$
IF MakeupBox THEN
Str := '^FO410,190^A050,30^FD* * * M a k e u p B o x * * *^FS':CRLF$
END ELSE
Str := '^FO410,190^AC,18^FDReact Type:^FS':CRLF$
Str := '^FO560,190^A0,20^FDEpiPro^FS':CRLF$
END
****** Seventh Line
Str := '^FO30,190^AC,18^FDPre:^FS':CRLF$
Str := '^FO90,190^A0,20^FD':SubPreClean:'^FS':CRLF$
IF PreAkrionRecipe NE '' THEN
Str := '^FO210,190^AC,18^FDAkrion:^FS':CRLF$
Str := '^FO300,190^A0,20^FD':PreAkrionRecipe:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO450,190^A040,20^B3,,23,N^FD':PreAkrionRecipe:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
END
****** Eighth Line
Str := '^FO30,225^AC,18^FDRecipe:^FS':CRLF$
Str := '^FO120,225^A0,20^FD':RecipeInfo:'^FS':CRLF$
Str := '^FO410,225^AC,18^FDEpi Dopant:^FS':CRLF$
Str := '^FO560,225^A040,20^FD':Dopant:'^FS':CRLF$
****** Ninth, Tenth and Eleventh Lines
Str := '^FO30,260^AC,18^FDThk Spec:^FS':CRLF$
FOR M = 1 TO COUNT(PrintThickTargets,@VM) + (PrintThickTargets NE '')
BaseLine = 260 + (M-1)*20
Str := '^FO140,':BaseLine:'^A040,20^FD':PrintThickTargets<1,M>:'^FS':CRLF$
NEXT M
Str := '^FO410,260^AC,18^FDRes Spec:^FS':CRLF$
FOR M = 1 TO COUNT(PrintResTargets,@VM) + (PrintResTargets NE '')
BaseLine = 260 + (M-1)*20
Str := '^FO520,':BaseLine:'^A040,20^FD':PrintResTargets<1,M>:'^FS':CRLF$
NEXT M
IF PostAkrionRecipe NE '' THEN
Str := '^FO30,335^AC,18^FDPost:^FS':CRLF$
Str := '^FO90,335^A0,20^FD':SubPostClean:'^FS':CRLF$
Str := '^FO210,335^AC,18^FDAkrion:^FS':CRLF$
Str := '^FO300,335^A0,20^FD':PostAkrionRecipe:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO450,335^A040,20^B3,,23,N^FD':PostAkrionRecipe:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
END ELSE
Str := '^FO30,335^AC,18^FDPost:^FS':CRLF$
Str := '^FO120,335^A0,20^FD':SubPostClean:'^FS':CRLF$
END
****** Separator bar
Str := '^FO15,365^GB790,1^FS':CRLF$
****** Data Matrix barcode
Str := '^FO720,280^CI28':CRLF$
Str := '^BXN,2,200^FDP':PartNo:'|S':SubPartNo:'|1T':PrintWMOutKey:'|2T':LotNo:'|':PSNo:'|Q':WfrQty:'|1V':Vendor:'|SEQ':Cnt:'^FS':CRLF$
****** Fourteenth Line
Str := '^FO30,375^AC,18^FDProd Spec No:^FS':CRLF$
Str := '^FO190,375^A0,25^FD':PSNo:'^FS':CRLF$
IF SpecType = 'Production' THEN SpecType = 'Prod'
IF SpecType = 'Pre-Production' THEN SpecType = 'Pre'
Str := '^FO275,375^AC,18^FDSpec Type:^FS':CRLF$
Str := '^FO400,375^A0,25^FD':SpecType:'^FS':CRLF$
Str:= '^FO480,375^AC,18^FDBag:^FS':CRLF$
Str:= '^FO530,375^A0,20^FD':ShipBagReq:'^FS':CRLF$
***** End of Label
Str:= '^XZ'
Next
IF CassNo = 1 THEN
Str := '^FO535,15^GB120,40,40,,3^FS':CRLF$
Str := '^FO540,25^AC,18^FR^FDCass:^FS':CRLF$
Str := '^FO600,20^A045,36^FR^FD':CassNo:'^FS':CRLF$
END ELSE
Str := '^FO540,25^AC,18^FDCass:^FS':CRLF$
Str := '^FO600,20^A045,36^FD':CassNo:'^FS':CRLF$
END
Str:= '^FO665,20^A045,36^FDWM Out^FS':CRLF$
****** Second Line
Str:= '^FO30,70^AC,18^FDWM Out:^FS':CRLF$
Str:= '^FO120,65^A050,30^FD':PrintWMOutKey:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO300,58^B3,,37,N^FD':'O':PrintWMOutKey:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
Str:= '^FO700,60^AC,18^FDQty:^FS':CRLF$
Str:= '^FO760,60^A045,25^FD':WfrQty:'^FS':CRLF$
****** Third Line
Str:= '^FO30,100^AC,18^FDShip Dt:^FS':CRLF$
Str:= '^FO140,100^A0,,25^FD':ReqShipDate:'^FS':CRLF$
Str:= '^FO250,100^AC,18^FDCust:^FS':CRLF$
Str:= '^FO320,100^A045,25^FD':CustName:'^FS':CRLF$
Str:= '^FO560,100^AC,18^FDPO:^FS':CRLF$
Str:= '^FO600,100^A045,25^FD':PONo:'^FS':CRLF$
****** Separator bar
Str:= '^FO15,125^GB790,1^FS':CRLF$
****** Fourth Line
Str := '^FO30,130^AC,18^FDLot No:^FS':CRLF$
Str := '^FO120,130^A0,20^FD':LotNo:'^FS':CRLF$
Str := '^FO410,130^AC,18^FDPart No:^FS':CRLF$
Str := '^FO510,130^A0,20^FD':PartNo:'^FS':CRLF$
****** Fifth Line
Str := '^FO30,155^AC,18^FDSub PN:^FS':CRLF$
Str := '^FO120,155^A0,20^FD':SubPartNo:'^FS':CRLF$
IF SuppCd NE '' THEN
Str := '^FO410,155^AC,18^FDSupp Cd:^FS':CRLF$
Str := '^FO510,155^A0,20^FD':SuppCd:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO610,155^A040,20^B3,,23,N^FD':SuppCd:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
END
****** Separator bar
Str := '^FO15,180^GB790,1^FS':CRLF$
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',Str)
end else
stat = Direct_Print('PRINT', Str)
end
IF MakeupBox THEN
Str := '^FO410,190^A050,30^FD* * * M a k e u p B o x * * *^FS':CRLF$
END ELSE
Str := '^FO410,190^AC,18^FDReact Type:^FS':CRLF$
Str := '^FO560,190^A0,20^FDEpiPro^FS':CRLF$
END
****** Seventh Line
Str := '^FO30,190^AC,18^FDPre:^FS':CRLF$
Str := '^FO90,190^A0,20^FD':SubPreClean:'^FS':CRLF$
IF PreAkrionRecipe NE '' THEN
Str := '^FO210,190^AC,18^FDAkrion:^FS':CRLF$
Str := '^FO300,190^A0,20^FD':PreAkrionRecipe:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO450,190^A040,20^B3,,23,N^FD':PreAkrionRecipe:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
END
****** Eighth Line
Str := '^FO30,225^AC,18^FDRecipe:^FS':CRLF$
Str := '^FO120,225^A0,20^FD':RecipeInfo:'^FS':CRLF$
Str := '^FO410,225^AC,18^FDEpi Dopant:^FS':CRLF$
Str := '^FO560,225^A040,20^FD':Dopant:'^FS':CRLF$
****** Ninth, Tenth and Eleventh Lines
Str := '^FO30,260^AC,18^FDThk Spec:^FS':CRLF$
FOR M = 1 TO COUNT(PrintThickTargets,@VM) + (PrintThickTargets NE '')
BaseLine = 260 + (M-1)*20
Str := '^FO140,':BaseLine:'^A040,20^FD':PrintThickTargets<1,M>:'^FS':CRLF$
NEXT M
Str := '^FO410,260^AC,18^FDRes Spec:^FS':CRLF$
FOR M = 1 TO COUNT(PrintResTargets,@VM) + (PrintResTargets NE '')
BaseLine = 260 + (M-1)*20
Str := '^FO520,':BaseLine:'^A040,20^FD':PrintResTargets<1,M>:'^FS':CRLF$
NEXT M
IF PostAkrionRecipe NE '' THEN
Str := '^FO30,335^AC,18^FDPost:^FS':CRLF$
Str := '^FO90,335^A0,20^FD':SubPostClean:'^FS':CRLF$
Str := '^FO210,335^AC,18^FDAkrion:^FS':CRLF$
Str := '^FO300,335^A0,20^FD':PostAkrionRecipe:'^FS':CRLF$
Str := '^BY2,2.0':CRLF$
Str := '^FO450,335^A040,20^B3,,23,N^FD':PostAkrionRecipe:'^FS':CRLF$
Str := '^BY2,3.0':CRLF$
END ELSE
Str := '^FO30,335^AC,18^FDPost:^FS':CRLF$
Str := '^FO120,335^A0,20^FD':SubPostClean:'^FS':CRLF$
END
****** Separator bar
Str := '^FO15,365^GB790,1^FS':CRLF$
****** Data Matrix barcode
Str := '^FO720,280^CI28':CRLF$
Str := '^BXN,2,200^FDP':PartNo:'|S':SubPartNo:'|1T':PrintWMOutKey:'|2T':LotNo:'|':PSNo:'|Q':WfrQty:'|1V':Vendor:'|SEQ':Cnt:'^FS':CRLF$
****** Fourteenth Line
Str := '^FO30,375^AC,18^FDProd Spec No:^FS':CRLF$
Str := '^FO190,375^A0,25^FD':PSNo:'^FS':CRLF$
IF SpecType = 'Production' THEN SpecType = 'Prod'
IF SpecType = 'Pre-Production' THEN SpecType = 'Pre'
Str := '^FO275,375^AC,18^FDSpec Type:^FS':CRLF$
Str := '^FO400,375^A0,25^FD':SpecType:'^FS':CRLF$
Str:= '^FO480,375^AC,18^FDBag:^FS':CRLF$
Str:= '^FO530,375^A0,20^FD':ShipBagReq:'^FS':CRLF$
***** End of Label
Str:= '^XZ'
Next
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',Str)
end else
stat = Direct_Print('PRINT', Str)
end
RETURN
* * * * * * *
PrintWOLabels:
* * * * * * *
* * * * * *
PrintWO:
* * * * * *
Str = '^XA^CFD'
Str := '^LH0,0'
Str := '^PR2' ;* Print speed 2 inches per second
Str := '^LL325' ;* Label length in dots
Str := '^MD2' ;* Media darkness
Str := '^PQ2' ;* Print 2 labels for each pass through here
STR := '^MMT':CRLF$ ;* Media mode t=tear off mode
IF INDEX(PrintWONo,'.',1) THEN
Str:= '^FO10,30^A0,220,210^FD':PrintWONo:'^FS':CRLF$
END ELSE
Str:= '^FO70,30^A0,220,210^FD':PrintWONo:'^FS':CRLF$
END
CharCnt = LEN(CustName)
NameLength = CharCnt*72
WhiteSpace = INT(((2103 - NameLength)/2103) * 806)
StartingXPos = INT(WhiteSpace/2)
Str:= '^FO':StartingXPos:',230^A0,75,72^FD':CustName:'^FS':CRLF$
Str:= '^FO160,320^A080,50^FD':'Commit Date: ':OCONV( XLATE( 'WO_LOG', WONo, WO_LOG_COMMIT_DATE$, 'X' ), 'D2/' ):'^FS':CRLF$
Str:= '^XZ'
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',Str)
end else
stat = Direct_Print('PRINT', Str)
end
Str = '^XA^CFD'
Str := '^LH0,0'
Str := '^PR2' ;* Print speed 2 inches per second
Str := '^LL325' ;* Label length in dots
Str := '^MD2' ;* Media darkness
Str := '^PQ2' ;* Print 2 labels for each pass through here
STR := '^MMT':CRLF$ ;* Media mode t=tear off mode
IF INDEX(PrintWONo,'.',1) THEN
Str:= '^FO10,30^A0,220,210^FD':PrintWONo:'^FS':CRLF$
END ELSE
Str:= '^FO70,30^A0,220,210^FD':PrintWONo:'^FS':CRLF$
END
CharCnt = LEN(CustName)
NameLength = CharCnt*72
WhiteSpace = INT(((2103 - NameLength)/2103) * 806)
StartingXPos = INT(WhiteSpace/2)
Str:= '^FO':StartingXPos:',230^A0,75,72^FD':CustName:'^FS':CRLF$
Str:= '^FO160,320^A080,50^FD':'Commit Date: ':OCONV( XLATE( 'WO_LOG', WONo, WO_LOG_COMMIT_DATE$, 'X' ), 'D2/' ):'^FS':CRLF$
Str:= '^XZ'
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',Str)
end else
stat = Direct_Print('PRINT', Str)
end
RETURN

View File

@ -62,7 +62,8 @@ Service AuthenticateLSLCredentials(LSLUsername, LSLPassword)
Response = False$
If ( (LSLUsername NE '') and (LSLPassword NE '') ) then
Convert @Lower_Case to @Upper.Case in LSLUsername
Convert @Lower_Case to @Upper_Case in LSLUsername
Convert @Lower_Case to @Upper_Case in LSLPassword
If RowExists('LSL_USERS', LSLUsername) then
Password = Xlate('LSL_USERS', LSLUsername, 'PASSWORD', 'X')
If LSLPassword EQ Password then
@ -313,67 +314,3 @@ Service GetLSLUser(Username)
end service
//----------------------------------------------------------------------------------------------------------------------
// VerifyUserSessions
//
//
//----------------------------------------------------------------------------------------------------------------------
Service VerifyUserSessions()
// Use MESSENGER as the recipient. It will process callback procedures.
Messaging_Services('SendMessage', 'GetLoggedInUsers', 'Request', 'MESSENGER', 'All', '', 'Procedure', 'Security_Services,UserSessionsListener,@MESSAGE,@ARGUMENTS')
end service
Service UserSessionsListener()
// Process message
// If user is running an old version of LSL, then send them a popup asking them to restart their session.
Transfer Param2 to SessionInfo
Station = SessionInfo<1, 2>
OIUserName = SessionInfo<2, 2>
SSOUserName = SessionInfo<3, 2>
ProcessID = SessionInfo<4, 2>
LSL2Version = SessionInfo<5, 2>
OCXVersion = SessionInfo<6, 2>
CurrLSL2Version = Database_Services('ReadDataRow', 'APP_INFO', 'LSL2_VERSION')
If ((LSL2Version NE '') and (LSL2Version NE CurrLSL2Version)) then
// Send a message to the user
Message = 'You are running an outdated version of LSL. Restart your application ASAP to pickup the latest code.'
Messaging_Services('SendMessage', 'SetPopupMessage', 'Request', '', Station, Message)
* If OIUserName EQ 'DANIEL_ST' then
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', Station, 'SECURITY_SERVICES,REQUIREREAUTHENTICATION', '', '', '')
* end
end
end service
Service RequireReauthentication()
Authenticated = False$
If MemberOf(@USER4, 'OI_ADMIN') then
ParentForm = 'NDW_MAIN'
end else
ParentForm = 'LSL_MAIN2'
end
Loop
Response = Dialog_Box('NDW_VERIFY_USER', ParentForm, @USER4)
Authenticated = Response<1>
If Not(Authenticated) then
ErrorMessage = 'You must reauthenticate to continue running your old version of OpenInsight.'
rv = Msg('', '', 'OK', '', 'Authentication Required':@FM:ErrorMessage)
end
Until Authenticated
Repeat
end service

View File

@ -792,10 +792,11 @@ Service PrintLabels(WONo)
end
If INDEX(RDSNos,@VM,1) then
TypeOver = ''
TypeOver<PDISPLAY$> = RDSNos
TypeOver<PFIELD$> = 2
TypeOver<PTYPE$> = 'K'
TypeOver = ''
TypeOver<PDISPLAY$> = RDSNos
TypeOver<PFIELD$> = 2
TypeOver<PTYPE$> = 'K'
TypeOver<PSHOWGAUGE$> = True$
RDSKeys = Popup(@WINDOW,TypeOver,'WO_LOG_RTS')
@ -1565,5 +1566,3 @@ ClearCursors:
return

View File

@ -0,0 +1,13 @@
compile insert UNIT_EQUATES
/*----------------------------------------
Author : DJM
Written : 11/6/2025
Description : Insert for unit-hex conversion.
----------------------------------------*/
Equ UNIT_MICROMETER$ To \E66D\
Equ UNIT_OHM_CM$ To \EA2D636D\
Equ UNIT_OHM_PER_SQ$ To \EA2FDC\
Equ UNIT_A$ To ''