Attribute VB_Name = "m_ventascstore"
'Public gidvendedor As String        'codigo del vendedor
Public GstrMonedaLimiteCredito As String


Public Sub Imprimir_Ticketfondocaja(ByVal dat_DATEPROCE As String, ByVal str_SALESPOINT As String, _
                                ByVal str_SALESPERID As String, ByVal dat_DATEDOC As String, _
                                ByVal str_CURYID As String, ByVal dou_TOTAL As Double, ByVal IntAnchoTicket As Integer)
                           
' Los Datos Generales se Debe cargar al Inicio de las Pantallas para no estar Repreguntando
' a cada momento
  Dim LHead1, LHead2, LHead3, LHead4, LHead5, LHead6, LHead7, LHead8, LHead9, LHead10 As String
   Dim I As Integer
' Imprimir la Cabecera
  
  LHead1 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD1)), Trim(GHEAD1))
  LHead2 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD2)), Trim(GHEAD2))
  LHead3 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD3)), Trim(GHEAD3))
  LHead4 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD4)), Trim(GHEAD4))
  LHead5 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD5)), Trim(GHEAD5))
  LHead6 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD6)), Trim(GHEAD6))
  LHead7 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD7)), Trim(GHEAD7))
  LHead8 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD8)), Trim(GHEAD8))
  LHead9 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD9)), Trim(GHEAD9))
  LHead10 = Alineacion("C", IntAnchoTicket, Len(Trim(GHEAD10)), Trim(GHEAD10))
 
   Printer.Print ""  ' El Primer Print no es Tomado en Cuenta
  Printer.Print ""  ' A partir del Primero se toman en cuenta
  Printer.Print ""
  Printer.Print ""
    
  If Trim(LHead1) <> Empty Then
    Printer.Print LHead1
  End If
  If Trim(LHead2) <> Empty Then
    Printer.Print LHead2
  End If
  If Trim(LHead3) <> Empty Then
    Printer.Print LHead3
  End If
  If Trim(LHead4) <> Empty Then
    Printer.Print LHead4
  End If
  If Trim(LHead5) <> Empty Then
    Printer.Print LHead5
  End If
  If Trim(LHead6) <> Empty Then
    Printer.Print LHead6
  End If
  If Trim(LHead7) <> Empty Then
    Printer.Print LHead7
  End If
  If Trim(LHead8) <> Empty Then
    Printer.Print LHead8
  End If
  If Trim(LHead9) <> Empty Then
    Printer.Print LHead9
  End If
  If Trim(LHead10) <> Empty Then
    Printer.Print LHead10
  End If
 
 ' Imprimir la Linea
     
  Dim LLinea1 As String
  
  LLinea1 = Alineacion("C", IntAnchoTicket, Len(Trim(GstrLinea1)), Trim(GstrLinea1))
  
  If Trim(LLinea1) <> Empty Then
    Printer.Print LLinea1
  End If
  
  ' Imprimir Numero de Máquina Registradora
  
  Dim StrMaquinaReg As String
  StrMaquinaReg = Alineacion("I", IntAnchoTicket - 10, Len("Maq.Regist.No: " & GStrMaquinaReg), "Maq.Regist.No: " & GStrMaquinaReg) & Date
  Printer.Print StrMaquinaReg
 
 Dim LLinea2 As String
  
  LLinea2 = Alineacion("C", IntAnchoTicket, Len(Trim(GstrLinea2)), Trim(GstrLinea2))
  
  If Trim(LLinea2) <> Empty Then
    Printer.Print LLinea2
  End If
                               
    
    Strdetalle = Alineacion("I", IntAnchoTicket - 20, Len("Fondo de Caja"), "Fondo de Caja")
    Strdetalle = Strdetalle + Alineacion("D", IntAnchoTicket - 20, Len(dat_DATEDOC), dat_DATEDOC)
    Printer.Print Strdetalle

    Strdetalle = Alineacion("I", 20, Len("***Monto: " & str_CURYID), "***Monto: " & str_CURYID)
    Strdetalle = Strdetalle + Alineacion("D", 20, Len(GFormatodeNumero(dou_TOTAL, 2)), GFormatodeNumero(dou_TOTAL, 2))
    Printer.Print Strdetalle

    Strdetalle = Alineacion("I", 20, Len(str_SALESPOINT), str_SALESPOINT)
    Strdetalle = Strdetalle + Alineacion("I", 20, Len(str_SALESPERID), str_SALESPERID)

    Printer.Print Strdetalle

  ' Imprimir Seguna Línea
  
 
  
   'Imprimir la Línea 3
  
  Dim LLinea3 As String
  
  LLinea3 = Alineacion("C", IntAnchoTicket, Len(Trim(GstrLinea3)), Trim(GstrLinea3))
  
  If Trim(LLinea3) <> Empty Then
    Printer.Print LLinea3
  End If
                      
    For I = 1 To GintSaltaLineas
    Printer.Print Space(10)
  Next
  Printer.EndDoc
End Sub


