Publicado el Dejar un comentario

VENTASCOLECTOR Recupera ventas de un colector

'----**** 
'----**** MyBusiness POS V20
'----**** Version del script: 1.0
'----**** 19/02/2020
'----**** 
Sub Main()
    Dim SymbolCS1504

    Set SymbolCS1504 = NewCS1504()

    ' El puerto serial donde se va a conectar 0 = 1, 1 = 2 etc..
    SymbolCS1504.PortComm = 3
    SymbolCS1504.Init

    If SymbolCS1504.Result <> 0 Then
       MsgBox "Error al abrir puerto de comunicaciones", vbInformation
       Exit Sub
    End If

    SymbolCS1504.ReadData

    For n = 0 To SymbolCS1504.Barcodes - 1
        SymbolCS1504.NumberOfBarCode = n  
        SymbolCS1504.GetPacket

        Set rstProd = CreaRecordSet( _
        "SELECT articulo FROM prods WHERE articulo = '" & _
        SymbolCS1504.Barcode & "'", Ambiente.Connection )
 
        If Not rstProd.EOF Then
           LlenaPartida SymbolCS1504.Barcode
        End If
    Next
    
    SymbolCS1504.SetDefaults
    SymbolCS1504.ClearData
    SymbolCS1504.Restore

End Sub



Sub LeeArchivo()
    Dim cArhivo 
    Dim cGuion

    cArchivo = Ambiente.Path & "\guion.txt"

    If Not ExisteArchivo( cArchivo ) Then
       Exit Sub
    End If    

    cGuion = ""

    CloseFile 1
 
    OpenFile ( cArchivo ), 1
  
    While Not FileEof( 1 )
          cGuion = cGuion & ReadLine( 1 ) & vbCrLf
    Wend 
 
    CloseFile 1

    RichTextBox3.Text = cGuion

End Sub
Deja un comentario