Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub FixPrtRS_Dev()
- Dim EJPrinter As String
- Dim DispServiceOjbName As String
- DeleteIfExists("c:\iris\ini\prtrs.ini")
- DeleteIfExists("c:\iris\ini\prtdev.ini")
- Dim PrtRS As New PrivateIniFile("c:\iris\ini\prtrs.ini")
- Dim PrtDev As New PrivateIniFile("c:\iris\ini\prtdev.ini")
- EJPrinter = "rcpt1"
- For xLoop As Integer = 0 To PosMaint.RegisterInformations.Count - 1
- Dim RegInfo As PosMaint10.RegInfo = PosMaint.RegisterInformations(xLoop)
- If RegInfo.HardwareType = eHardwareType.Par7700 Then
- If RegInfo.DefaultConcept = eDefaultConcept.FreshMarket Then
- DispServiceOjbName = "ParPoleDisplayUSB"
- Else
- DispServiceOjbName = "PARLineDisplay"
- End If
- ElseIf RegInfo.HardwareType = eHardwareType.Panasonic Then
- If RegInfo.DefaultConcept = eDefaultConcept.FreshMarket Then
- DispServiceOjbName = "ParPoleDisplayUSB"
- Else
- DispServiceOjbName = "itronLineDisplay"
- End If
- ElseIf RegInfo.HardwareType = eHardwareType.TCx800 Then
- If RegInfo.DefaultConcept = eDefaultConcept.FreshMarket Then
- DispServiceOjbName = "ParPoleDisplayUSB"
- Else
- DispServiceOjbName = "TCLineDisplay"
- End If
- Else
- DispServiceOjbName = "disp" & RegInfo.RegisterNumber.ToString
- End If
- 'If xLoop = 3 Then EJPrinter = "rcpt" & PosMaint.RegisterInfo(xLoop).PrimaryPrinter.ToString
- If RegInfo.PrimaryPrinter > 0 Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "pri", "rcpt" & RegInfo.PrimaryPrinter.ToString)
- If RegInfo.BackUpPrinter > 0 Then PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "rcpt" & RegInfo.PrimaryPrinter.ToString, "rcpt" & RegInfo.BackUpPrinter.ToString & ",")
- End If
- 'Panasonic registers require something different in the prtrs.ini in order for the MSR to function properly.
- If RegInfo.HardwareType = eHardwareType.Panasonic Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "msr", "PanMSR" & RegInfo.RegisterNumber.ToString)
- ElseIf RegInfo.HardwareType = eHardwareType.TCx800 Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "msr", "TCxMSR" & RegInfo.RegisterNumber.ToString)
- Else
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "msr", "msr" & RegInfo.RegisterNumber.ToString)
- End If
- If PosMaint.PrtExpoNumberPriName.Substring(0, 3).ToUpper = "RCPT" Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "reroutegrill1", PosMaint.PrtExpoNumberPriName)
- Else
- If PosMaint.PrtExpoNumberBackupName <> "NONE" Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "grill1", PosMaint.PrtExpoNumberBackupName)
- End If
- End If
- If RegInfo.PrinterType <> ePrinterType.None Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "cash", "cdrw" & RegInfo.RegisterNumber.ToString)
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "cash", "cdrw" & RegInfo.RegisterNumber.ToString)
- If RegInfo.PrinterType = ePrinterType.Old Then
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "cashclosed", "1")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "port", "com1")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "type", "TMT80")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "speed", "19200")
- Else
- 'Added Because the MainLine did something on OPOS printers
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "cashclosed", "0")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "type", RegInfo.PrinterType.ToString.Replace("TM_T88II", "TM-T88III"))
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "connecttype", "OPOS")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "BeforeCut_FeedLinesCount", "0")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "OPOS_BeforeCut_FeedLinesCount", "0")
- 'Added Becuase OPOS needed a CD Defined
- If CIntNull(RegInfo.PrinterType.ToString.Substring(RegInfo.PrinterType.ToString.Length - 1)) > 0 Then
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "cashtype", "Standard" & RegInfo.PrinterType.ToString.Substring(8))
- Else
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "cashtype", "Standard" & RegInfo.PrinterType.ToString.Substring(RegInfo.PrinterType.ToString.Length - 1))
- End If
- End If
- End If
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "desc", "Register" & RegInfo.RegisterNumber.ToString & " Receipt")
- '***********************************************
- 'Added Print Dev logging. For now use file for switch.
- 'keep it?
- If IO.File.Exists("c:\LogSpecPrint.flg") Then
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "Logging", "1")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "Logfilter", "1")
- PrtDev.WriteString("rcpt" & RegInfo.RegisterNumber.ToString, "Logfilename", "c:\iris\log\PrtDevExt_Reg" & RegInfo.RegisterNumber.ToString.PadLeft(2, "0"c) & ".Log")
- End If
- '***********************************************
- '**************************************************
- 'Paul E. 7/12/2018
- 'Setting up the camera for dual lanes
- If RegInfo.DefaultConcept = eDefaultConcept.DualLane1 Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "UseCamera", "1")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "CameraServConnectionRetryTime", "3000")
- ElseIf RegInfo.DefaultConcept = eDefaultConcept.DualLane2 Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "UseCamera", "2")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "CameraServConnectionRetryTime", "3000")
- End If
- '**************************************************
- '**************************************************
- 'Paul E. 7/12/2018
- 'Setting up the OCB for any drive (Single or Dual Lane)
- If (PosMaint.OutSideDisplay1 <> eOutSideDisplayType.None) And (RegInfo.DefaultConcept = eDefaultConcept.DualLane1 OrElse
- RegInfo.DefaultConcept = eDefaultConcept.SplitScreen OrElse
- RegInfo.DefaultConcept = eDefaultConcept.Tender OrElse
- RegInfo.DefaultConcept = eDefaultConcept.TenderBlockReg) Then
- 'ElseIf PosMaint.OutSideDisplay1 = eOutSideDisplayType.SicomOCU Then
- ' SicomOCU1(PrtDev, 1)
- ' SicomOCU1(PrtDev, 2)
- ' 'MDispCurrency=ORDER_TOTAL_FORMATTED|ORDER_TOTAL_SYMBOL|TENDER_FORMATTED|TENDER_SYMBOL
- ' 'MDispCurrency=ORDER_TOTAL_FORMATTED|ORDER_TOTAL_SYMBOL|TENDER_FORMATTED|TENDER_SYMBOL
- ' PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp1", "OCBDisp1")
- ' mdisp = OCBDisp1
- ' mdispdestmask = 4
- ' MDispDesc =Default
- 'MDispVersion = 200
- ' MDispCurrency = ORDER_TOTAL_FORMATTED|ORDER_TOTAL_SYMBOL|TENDER_FORMATTED|TENDER_SYMBOL
- ';mdisp1=OCBDisp1
- ';mdisp2=OCBDisp2
- ';mdispDefault=mdisp1
- 'numgreet = 0
- ' displayraw = 0
- DispThis("OCBDisp1: " & PosMaint.OutSideDisplay1.ToString & NewLine)
- If PosMaint.OutSideDisplay1 = eOutSideDisplayType.SicomDigitalDisplay Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp", "OCBDisp1")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdispdestmask", "4")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "MDispDesc", "Default")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "MDispVersion", "200")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "MDispCurrency", "ORDER_TOTAL_FORMATTED|ORDER_TOTAL_SYMBOL|TENDER_FORMATTED|TENDER_SYMBOL")
- Else
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp1", "OCBDisp1")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp2", "OCBDisp2")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdispDefault", "mdisp1")
- 'Added for the 10 register dual lane configuration so that Reg7 can be another order taker.
- If RegInfo.DefaultConcept = eDefaultConcept.TenderBlockReg AndAlso PosMaint.IsDualLane Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "UseCamera", "1")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "CameraServConnectionRetryTime", "3000")
- End If
- End If
- ElseIf (PosMaint.OutSideDisplay2 <> eOutSideDisplayType.None) And RegInfo.DefaultConcept = eDefaultConcept.DualLane2 Then
- DispThis("OCBDisp2: " & PosMaint.OutSideDisplay2.ToString & NewLine)
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp1", "OCBDisp1")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp2", "OCBDisp2")
- 'PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "MdispCurrency", "ORDER_TOTAL_FORMATTED|TENDER_FORMATTED")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdispDefault", "mdisp2")
- Else
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdisp", "disp" & RegInfo.RegisterNumber.ToString)
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "cdispdesc", "0")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdispversion", "200")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "mdispdestmask", "4294967295")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "MdispCurrency", "ORDER_TOTAL_FORMATTED|TENDER_FORMATTED|TENDER_SYMBOL")
- End If
- '**************************************************
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "numgreet", "0")
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "displayraw", "0")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Type", "OPOSLineDisplay")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "OPOSDeviceName", DispServiceOjbName)
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "MAXCLIENTS", "1")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "RunningTotal", "1")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "DisplayChildItems", "0")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "DisplayPricedChildItems", "1")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "NoOrderActivityTimeout", "200000")
- If IO.File.Exists("c:\LogCdisp.flg") Then
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Logging", "1")
- Else
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Logging", "0")
- End If
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Tracing", "1")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "LogFilter", "127")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "LogFileName", "C:\Iris\log\OCS.log")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Greet", """ Welcome To""")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Greet2", """ Braums""")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Closed", """ WELCOME TO""")
- PrtDev.WriteString("disp" & RegInfo.RegisterNumber.ToString, "Closed2", """ BRAUMS""")
- If RegInfo.ScannerType = eScannerType.PSC Then
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "scanner", RegInfo.ScannerServiceObjectName)
- PrtRS.WriteString("Reg" & RegInfo.RegisterNumber.ToString, "scale", RegInfo.ScaleServiceObjectName)
- Dim tmpFileinfo As New IO.FileInfo("c:\braumsrecovery\bat\psc_sc232.dll")
- If tmpFileinfo.LastWriteTime.Year > 2005 Then
- PrtDev.WriteString(RegInfo.ScaleServiceObjectName, "AsyncMode", "0")
- PrtDev.WriteString(RegInfo.ScaleServiceObjectName, "Logging", "1")
- PrtDev.WriteString(RegInfo.ScaleServiceObjectName, "LogFilter", "127")
- End If
- End If
- Next
- If EJPrinter.Length > 0 Then PrtRS.WriteString("Reg99", "pri", EJPrinter)
- If PosMaint.OutSideDisplay1 = eOutSideDisplayType.AccuviewNG Then
- AccuviewNG(PrtDev, 1)
- AccuviewNG(PrtDev, 2)
- PrtRS.WriteString("OCBDisp1", "MdispCurrency", "ORDER_TOTAL_FORMATTED|TENDER_FORMATTED")
- PrtRS.WriteString("OCBDisp2", "MdispCurrency", "ORDER_TOTAL_FORMATTED|TENDER_FORMATTED")
- ElseIf PosMaint.OutSideDisplay1 = eOutSideDisplayType.SicomOCU Then
- SicomOCU(PrtDev, 1)
- SicomOCU(PrtDev, 2)
- SicomOCU(PrtRS, 1)
- SicomOCU(PrtRS, 2)
- ElseIf PosMaint.OutSideDisplay1 = eOutSideDisplayType.SicomDigitalDisplay Then
- SicomDigitalDisplay(PrtDev, 1)
- SicomDigitalDisplay(PrtDev, 2)
- End If
- 'PrtRS.DeleteSection "General"
- PrtRS.WriteString("General", "Pserve", "-1")
- Select Case PosMaint.PrtExpoNumberPriName.ToUpper
- Case "NONE"
- Case "CHIT"
- PrtDev.WriteString("Grill1", "Port", PosMaint.PrtExpoNumberRegCom.ToString)
- PrtDev.WriteString("Grill1", "Type", "TMT80")
- PrtDev.WriteString("Grill1", "speed", "19200")
- PrtDev.WriteString("Grill1", "Desc", "Chit Printer")
- Case "CHITIP"
- PrtDev.WriteString("Grill1", "Type", "TM-T88IIIE_Chit")
- PrtDev.WriteString("Grill1", "connecttype", "OPOS")
- PrtDev.WriteString("Grill1", "Desc", "Chit Printer")
- PrtDev.WriteString("Grill", "PrtrDelay", "15000")
- Case Else
- PrtDev.WriteString("Grill1", "Desc", "Chit Printer")
- End Select
- PrtDev.WriteString("Grill", "ProcessRefunds", "1")
- '*****************************************************************
- 'Starting with 3.7.14 we need to set postticketlinefeed to 5 else 0
- If PosMaint10.IrisVersion = "3.7.7.1" Then
- PrtDev.WriteString("Grill", "postticketlinefeed", "0")
- Else
- PrtDev.WriteString("Grill", "postticketlinefeed", "5")
- End If
- '*****************************************************************
- '*****************************************************************
- 'PE 12/14/2020
- 'Fixing Online printing receipt
- PrtDev.WriteString("Grill", "receiptdestexclude", "curbside")
- '*****************************************************************
- '*****************************************************************
- 'Added Print serv loging. For now use file for switch.
- 'keep it?
- If IO.File.Exists("c:\LogSpecPrint.flg") Then
- PrtDev.WriteString("Grill", "Logging", "1")
- PrtDev.WriteString("Grill", "Logfilter", "1")
- PrtDev.WriteString("Grill", "Logfilename", "c:\iris\log\PrtServ.Log")
- End If
- '*****************************************************************
- For xLoop As Integer = 0 To PosMaint.RegisterInformations.Count - 1
- Dim RegInfo As RegInfo = PosMaint.RegisterInformations(xLoop)
- IO.File.Copy("c:\iris\ini\prtrs.ini", "c:\iris\reginfo\Reg" & PosMaint.RegisterInformations(xLoop).RegisterNumber.ToString & "\ini\prtrs.ini", True)
- IO.File.Copy("c:\iris\ini\prtdev.ini", "c:\iris\reginfo\Reg" & PosMaint.RegisterInformations(xLoop).RegisterNumber.ToString & "\ini\prtdev.ini", True)
- PrtDev.SetFileName("c:\iris\reginfo\Reg" & PosMaint.RegisterInformations(xLoop).RegisterNumber.ToString & "\ini\prtdev.ini")
- 'PE 7/7/29/2020
- 'When changing to the new multi route scheme, we do not think the different printer scheme are needed aymore.
- ' They are back up and if all works can be delete at some future date
- '*****************************************************************************************************************************
- 'Need to fix Chit by using Dest Instead of mask.
- PrtDev.WriteInteger("Grill", "Grill1", PosMaint.MonitorDef("Expedite").Mask(0))
- PrtDev.WriteString("Grill", "Grill1Dest", PosMaint.MonitorDef("Expedite").DestMaskFlags(0))
- PrtDev.WriteString("Grill", "Count", "4")
- PrtDev.WriteString("Grill", "Parent", "0")
- PrtDev.WriteString("Grill", "separategrillitems", "1")
- '-----------------------------------------------------------------------------------------------------
- ' Backup on 7/29/2020 and this section can be deleted at some future date.
- 'PrtDev.WriteInteger("Grill", "Grill1", PosMaint.MonitorDef("Expedite").Mask)
- 'PrtDev.WriteInteger("Grill<2>", "Grill1", PosMaint.MonitorDef("Expedite").Mask)
- 'PrtDev.WriteInteger("Grill<3>", "Grill1", PosMaint.MonitorDef("Expedite").Mask)
- 'PrtDev.WriteString("Grill", "Grill1Dest", PosMaint.MonitorDef("Expedite").DestMaskFlags)
- 'PrtDev.WriteString("Grill<2>", "Grill1Dest", PosMaint.MonitorDef("Expedite").DestMaskFlags)
- 'PrtDev.WriteString("Grill<3>", "Grill1Dest", PosMaint.MonitorDef("Expedite").DestMaskFlags)
- 'PrtDev.WriteString("Grill", "Count", "4")
- 'PrtDev.WriteString("Grill", "Parent", "0")
- 'PrtDev.WriteString("Grill", "separategrillitems", "1")
- 'PrtDev.WriteString("Grill<2>", "Count", "4")
- 'PrtDev.WriteString("Grill<2>", "Parent", "0")
- 'PrtDev.WriteString("Grill<2>", "separategrillitems", "1")
- 'PrtDev.WriteString("Grill<2>", "postticketlinefeed", "0")
- 'PrtDev.WriteString("Grill<3>", "Count", "4")
- 'PrtDev.WriteString("Grill<3>", "Parent", "0")
- 'PrtDev.WriteString("Grill<3>", "separategrillitems", "1")
- 'PrtDev.WriteString("Grill<3>", "postticketlinefeed", "0")
- '-----------------------------------------------------------------------------------------------------
- '*****************************************************************************************************************************
- Next
- PrtRS = Nothing
- PrtDev = Nothing
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement