VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.UserControl ctr_cashdrop 
   ClientHeight    =   390
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   11085
   ScaleHeight     =   390
   ScaleWidth      =   11085
   Begin VB.TextBox txt_batnbr 
      Alignment       =   1  'Right Justify
      Height          =   315
      Left            =   5400
      MaxLength       =   11
      TabIndex        =   8
      TabStop         =   0   'False
      Top             =   480
      Width           =   1215
   End
   Begin VB.TextBox txt_site 
      Alignment       =   1  'Right Justify
      Height          =   315
      Left            =   4080
      MaxLength       =   11
      TabIndex        =   7
      TabStop         =   0   'False
      Top             =   480
      Width           =   1215
   End
   Begin VB.TextBox ctrl_monto 
      Alignment       =   1  'Right Justify
      Height          =   315
      Left            =   9840
      MaxLength       =   11
      TabIndex        =   5
      Top             =   0
      Width           =   1215
   End
   Begin VB.TextBox TXT_SEQ 
      Alignment       =   1  'Right Justify
      Enabled         =   0   'False
      Height          =   315
      Left            =   0
      MaxLength       =   11
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   480
      Width           =   375
   End
   Begin MSDataListLib.DataCombo DTC_TARJETA 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   1560
      TabIndex        =   1
      Top             =   0
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo DTC_MONEDA 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   8640
      TabIndex        =   4
      Top             =   0
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo dtc_cliente 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   4800
      TabIndex        =   3
      Top             =   0
      Width           =   3855
      _ExtentX        =   6800
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo dtc_tdeposito 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo dtc_idcliente 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   3360
      TabIndex        =   2
      Top             =   0
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
End
Attribute VB_Name = "ctr_cashdrop"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Dim STRSQL_T As String
Dim STRSQL_M As String
Dim STRSQL_d As String
Dim STRSQL_C As String
Dim STRSQL_idC As String
Dim rs_comboT As ADODB.Recordset
Dim rs_comboM As ADODB.Recordset
Dim rs_combod As ADODB.Recordset
Dim rs_comboC As ADODB.Recordset
Dim rs_comboIC As ADODB.Recordset

Dim LS_CAMPOID, LS_CAMPODESCR As String

Private Sub dtc_cliente_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
    DTC_MONEDA.SetFocus
End If
End Sub

Private Sub dtc_idcliente_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
    DTC_MONEDA.SetFocus
End If
End Sub

Private Sub DTC_MONEDA_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
    ctrl_monto.SetFocus
End If
End Sub

Private Sub DTC_TARJETA_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
    DTC_MONEDA.SetFocus
End If
End Sub

Private Sub dtc_tdeposito_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
    If dtc_tdeposito.BoundText = "V" Then
        DTC_TARJETA.Text = ""
        dtc_idcliente.SetFocus
    End If
    If dtc_tdeposito.BoundText = "E" Then
        DTC_TARJETA.Text = ""
        dtc_idcliente.Text = ""
        dtc_cliente.Text = ""
        DTC_MONEDA.SetFocus
    End If
    If dtc_tdeposito.BoundText = "T" Then
        dtc_idcliente.Text = ""
        dtc_cliente.Text = ""
        DTC_TARJETA.SetFocus
    End If
End If
End Sub
Private Sub UserControl_GotFocus()
dtc_tdeposito.SetFocus
End Sub

Private Sub UserControl_Initialize()
Set rs_comboT = New ADODB.Recordset
Set rs_comboM = New ADODB.Recordset
Set rs_combod = New ADODB.Recordset
Set rs_comboC = New ADODB.Recordset
Set rs_comboIC = New ADODB.Recordset

STRSQL_T = "SELECT CARDid,descr FROM Op_CARD"
rs_comboT.CursorLocation = adUseClient
rs_comboT.Open STRSQL_T, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic
Set DTC_TARJETA.RowSource = rs_comboT
DTC_TARJETA.ListField = "DESCR"
DTC_TARJETA.BoundColumn = "CARDID"

STRSQL_M = "SELECT CURYID,descr FROM CURRENCY"
rs_comboM.CursorLocation = adUseClient
rs_comboM.Open STRSQL_M, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic
Set DTC_MONEDA.RowSource = rs_comboM
DTC_MONEDA.ListField = "DESCR"
DTC_MONEDA.BoundColumn = "CURYID"

STRSQL_d = "select DEPOSITTYPEID,DESCRDEPOSTITYPE from op_deposittype"
rs_combod.CursorLocation = adUseClient
rs_combod.Open STRSQL_d, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic
Set dtc_tdeposito.RowSource = rs_combod
dtc_tdeposito.ListField = "DESCRDEPOSTITYPE"
dtc_tdeposito.BoundColumn = "DEPOSITTYPEID"

rs_comboC.CursorLocation = adUseClient
STRSQL_C = "select CUSTIDSS,CUSTNAME  from customer ORDER BY CUSTNAME"
rs_comboC.Open STRSQL_C, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic

Set dtc_cliente.RowSource = rs_comboC
dtc_cliente.ListField = "CUSTNAME"
dtc_cliente.BoundColumn = "CUSTIDSS"

rs_comboIC.CursorLocation = adUseClient
STRSQL_C = "select CUSTIDSS,CUSTNAME  from customer ORDER BY CUSTIDSS"
rs_comboIC.Open STRSQL_C, "DATA SOURCE=SIES;USER ID=SA;PWD=", adOpenDynamic, adLockBatchOptimistic
Set dtc_idcliente.RowSource = rs_comboIC
dtc_idcliente.ListField = "CUSTIDSS"
dtc_idcliente.BoundColumn = "CUSTIDSS"

End Sub
Private Sub DTC_TARJETA_Change()
PropertyChanged "P_TARJETA"
'DTC_MONEDA.SetFocus
End Sub
Public Property Get P_TARJETA() As String
Attribute P_TARJETA.VB_MemberFlags = "14"
P_TARJETA = DTC_TARJETA.BoundText
End Property
Public Property Let P_TARJETA(ByVal NEWPTARJETA As String)
    DTC_TARJETA.BoundText = NEWPTARJETA
End Property
Private Sub DTC_MONEDA_Change()
PropertyChanged "P_MONEDA"
End Sub
Public Property Get P_MONEDA() As String
Attribute P_MONEDA.VB_MemberFlags = "14"
P_MONEDA = DTC_MONEDA.BoundText
End Property
Public Property Let P_MONEDA(ByVal NEWPMONEDA As String)
    DTC_MONEDA.BoundText = NEWPMONEDA
End Property
Public Property Get P_MONTO() As String
Attribute P_MONTO.VB_MemberFlags = "14"
P_MONTO = ctrl_monto.Text
End Property
Public Property Let P_MONTO(ByVal NEWPMONTO As String)
    ctrl_monto.Text = NEWPMONTO
End Property
Private Sub CTRL_MONTO_Change()
'If Len(ctrl_monto) = 0 Then
'    ctrl_monto.Text = "0"
'End If
PropertyChanged "P_MONTO"
End Sub
Private Sub TXT_SEQ_Change()
PropertyChanged "P_SEQ"
End Sub
Public Property Get P_SEQ() As String
Attribute P_SEQ.VB_MemberFlags = "14"
P_SEQ = TXT_SEQ.Text
End Property
Public Property Let P_SEQ(ByVal NEWPSEQ As String)
    TXT_SEQ.Text = NEWPSEQ
End Property
Private Sub DTC_cliente_Change()
'If dtc_tdeposito.BoundText <> "V" And Len(Trim(dtc_cliente.Text)) > 0 Then
'    dtc_idcliente.Text = ""
'    dtc_cliente.Text = ""
'    MsgBox "Tipo Deposito Incorrecto"
'   Exit Sub
'End If
PropertyChanged "P_cliente"
dtc_idcliente.BoundText = dtc_cliente.BoundText
'DTC_MONEDA.SetFocus
End Sub
Public Property Get P_cliente() As String
Attribute P_cliente.VB_MemberFlags = "14"
P_cliente = dtc_cliente.BoundText
End Property
Public Property Let P_cliente(ByVal NEWPcliente As String)
    dtc_cliente.BoundText = NEWPcliente
End Property
Private Sub DTC_tdeposito_Change()
PropertyChanged "P_tdeposito"
End Sub
Public Property Get P_tdeposito() As String
Attribute P_tdeposito.VB_MemberFlags = "14"
P_tdeposito = dtc_tdeposito.BoundText
End Property
Public Property Let P_tdeposito(ByVal NEWPtdeposito As String)
    dtc_tdeposito.BoundText = NEWPtdeposito
End Property
Private Sub ctrl_monto_KeyPress(KeyAscii As Integer)
If ((KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Or _
    Chr(KeyAscii) = "." Or _
    KeyAscii = vbKeyClear Or _
    KeyAscii = vbKeyTab Or _
    KeyAscii = vbKeyBack) And _
    (Chr(KeyAscii) = "." And InStr(ctrl_monto.Text, ".")) = 0 Then
    
    If Len(ctrl_monto) >= 7 And InStr(ctrl_monto, ".") = 0 And IsNumeric(Chr(KeyAscii)) Then
        KeyAscii = 0
    End If
    If Len(ctrl_monto) = 1 And Trim(ctrl_monto.Text) = "0" Then
        ctrl_monto.Text = ""
        
    End If
 Else
     KeyAscii = 0
End If
If (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete) And Len(Trim(ctrl_monto.Text)) = 1 Then
    ctrl_monto.Text = "0"
End If

End Sub

Private Sub ctrl_monto_Validate(Cancel As Boolean)
If ctrl_monto.Text = "" Or Len(ctrl_monto.Text) = 0 Then
    ctrl_monto.Text = "0"
End If
End Sub
Private Sub DTC_idcliente_Change()
'If dtc_tdeposito.BoundText <> "V" And Len(Trim(dtc_idcliente.Text)) > 0 Then
'    dtc_idcliente.Text = ""
'    dtc_cliente.Text = ""
'    MsgBox "Tipo Deposito Incorrecto"
'   Exit Sub
'End If
PropertyChanged "P_idcliente"
dtc_cliente.BoundText = dtc_idcliente.BoundText
End Sub
Public Property Get P_idcliente() As String
Attribute P_idcliente.VB_MemberFlags = "14"
P_idcliente = dtc_idcliente.BoundText
End Property
Public Property Let P_idcliente(ByVal NEWPidcliente As String)
    dtc_idcliente.BoundText = NEWPidcliente
End Property
Private Sub TXT_site_Change()
PropertyChanged "P_SITE"
End Sub
Public Property Get P_SITE() As String
Attribute P_SITE.VB_MemberFlags = "14"
P_SITE = txt_site.Text
End Property
Public Property Let P_SITE(ByVal NEWPSITE As String)
    txt_site.Text = NEWPSITE
End Property
Private Sub TXT_BATNBR_Change()
PropertyChanged "P_BATNBR"
End Sub
Public Property Get P_BATNBR() As String
Attribute P_BATNBR.VB_MemberFlags = "14"
P_BATNBR = txt_batnbr.Text
End Property
Public Property Let P_BATNBR(ByVal NEWPBATNBR As String)
    txt_batnbr.Text = NEWPBATNBR
End Property

Public Sub NUEVO()
dtc_tdeposito.SetFocus
End Sub

Public Sub BORRAR()
dtc_tdeposito.Text = ""
DTC_TARJETA.Text = ""
dtc_idcliente.Text = ""
dtc_cliente.Text = ""
DTC_MONEDA.Text = ""
ctrl_monto.Text = ""
ctrl_monto.SetFocus
End Sub
