VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "Crystl32.OCX"
Object = "{C4DED68B-C40F-11D6-AD1A-000795CA0957}#50.0#0"; "pry_list.ocx"
Begin VB.Form FRegistroVentas 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Registro de Ventas (05.150.00)"
   ClientHeight    =   5190
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10695
   Icon            =   "FRegistroVentas.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   5190
   ScaleWidth      =   10695
   Begin TabDlg.SSTab SSTab1 
      Height          =   5175
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   10695
      _ExtentX        =   18865
      _ExtentY        =   9128
      _Version        =   393216
      Tabs            =   2
      TabsPerRow      =   2
      TabHeight       =   520
      TabCaption(0)   =   "Datos Generales"
      TabPicture(0)   =   "FRegistroVentas.frx":030A
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Line1"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "Shape1"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "lblMoneda"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "Label2"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "Label5"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "Image1"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).Control(6)=   "lstCriterios"
      Tab(0).Control(6).Enabled=   0   'False
      Tab(0).Control(7)=   "dtcMoneda"
      Tab(0).Control(7).Enabled=   0   'False
      Tab(0).Control(8)=   "crRegistroVentas"
      Tab(0).Control(8).Enabled=   0   'False
      Tab(0).Control(9)=   "Frame1"
      Tab(0).Control(9).Enabled=   0   'False
      Tab(0).Control(10)=   "Frame2"
      Tab(0).Control(10).Enabled=   0   'False
      Tab(0).Control(11)=   "cmdGenerar"
      Tab(0).Control(11).Enabled=   0   'False
      Tab(0).Control(12)=   "cmdSalir"
      Tab(0).Control(12).Enabled=   0   'False
      Tab(0).Control(13)=   "TxtSerie"
      Tab(0).Control(13).Enabled=   0   'False
      Tab(0).ControlCount=   14
      TabCaption(1)   =   "Almacenes"
      TabPicture(1)   =   "FRegistroVentas.frx":0326
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "cmdSalir2"
      Tab(1).Control(1)=   "cmdGenerar2"
      Tab(1).Control(2)=   "lstAlmacen"
      Tab(1).Control(3)=   "Label1"
      Tab(1).Control(4)=   "Shape2"
      Tab(1).Control(5)=   "Image2"
      Tab(1).Control(6)=   "Line5"
      Tab(1).Control(7)=   "Line4"
      Tab(1).Control(8)=   "Label6"
      Tab(1).ControlCount=   9
      Begin VB.TextBox TxtSerie 
         Height          =   285
         Left            =   3360
         TabIndex        =   21
         Top             =   1680
         Width           =   615
      End
      Begin VB.CommandButton cmdSalir2 
         Cancel          =   -1  'True
         Caption         =   "&Salir"
         Height          =   855
         Left            =   -66000
         Picture         =   "FRegistroVentas.frx":0342
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   2760
         Width           =   1335
      End
      Begin VB.CommandButton cmdSalir 
         Caption         =   "&Salir"
         Height          =   855
         Left            =   1580
         Picture         =   "FRegistroVentas.frx":064C
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   3960
         Width           =   1335
      End
      Begin VB.CommandButton cmdGenerar 
         Caption         =   "&Generar"
         Height          =   855
         Left            =   240
         Picture         =   "FRegistroVentas.frx":0956
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   3960
         Width           =   1335
      End
      Begin VB.Frame Frame2 
         Caption         =   "Rango de Fechas"
         Height          =   855
         Left            =   240
         TabIndex        =   7
         Top             =   1980
         Width           =   3735
         Begin MSComCtl2.DTPicker dtpFechaFin 
            Height          =   315
            Left            =   2280
            TabIndex        =   8
            Top             =   360
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   556
            _Version        =   393216
            Format          =   17039361
            CurrentDate     =   37533
         End
         Begin MSComCtl2.DTPicker dtpFechaIni 
            Height          =   315
            Left            =   480
            TabIndex        =   9
            Top             =   360
            Width           =   1335
            _ExtentX        =   2355
            _ExtentY        =   556
            _Version        =   393216
            Format          =   17039361
            CurrentDate     =   37533
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "Del"
            Height          =   195
            Left            =   120
            TabIndex        =   11
            Top             =   420
            Width           =   240
         End
         Begin VB.Label Label4 
            AutoSize        =   -1  'True
            Caption         =   "Al"
            Height          =   195
            Left            =   2040
            TabIndex        =   10
            Top             =   420
            Width           =   135
         End
      End
      Begin VB.Frame Frame1 
         Caption         =   "Formato"
         Height          =   855
         Left            =   240
         TabIndex        =   4
         Top             =   2940
         Width           =   3735
         Begin VB.OptionButton optDetallado 
            Caption         =   "Detallado"
            Height          =   255
            Left            =   2040
            TabIndex        =   6
            Top             =   360
            Value           =   -1  'True
            Width           =   1095
         End
         Begin VB.OptionButton optResumido 
            Caption         =   "Resumido"
            Height          =   255
            Left            =   600
            TabIndex        =   5
            Top             =   360
            Width           =   1095
         End
      End
      Begin VB.CommandButton cmdGenerar2 
         Caption         =   "&Generar"
         Height          =   855
         Left            =   -66000
         Picture         =   "FRegistroVentas.frx":0C60
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   1920
         Width           =   1335
      End
      Begin Crystal.CrystalReport crRegistroVentas 
         Left            =   3600
         Top             =   4185
         _ExtentX        =   741
         _ExtentY        =   741
         _Version        =   348160
         PrintFileLinesPerPage=   60
      End
      Begin MSDataListLib.DataCombo dtcMoneda 
         Height          =   315
         Left            =   1320
         TabIndex        =   13
         Top             =   1260
         Width           =   2655
         _ExtentX        =   4683
         _ExtentY        =   556
         _Version        =   393216
         Style           =   2
         Text            =   ""
      End
      Begin pry_list.ctrl_listarray lstCriterios 
         Height          =   2475
         Left            =   4410
         TabIndex        =   14
         Top             =   1800
         Width           =   5775
         _ExtentX        =   10186
         _ExtentY        =   4366
      End
      Begin pry_list.ctrl_listarray lstAlmacen 
         Height          =   2295
         Left            =   -73080
         TabIndex        =   15
         Top             =   1620
         Width           =   6630
         _ExtentX        =   11695
         _ExtentY        =   4048
      End
      Begin VB.Image Image1 
         Height          =   480
         Left            =   240
         Picture         =   "FRegistroVentas.frx":0F6A
         Top             =   480
         Width           =   480
      End
      Begin VB.Label Label5 
         Caption         =   "REGISTRO DE VENTAS"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   765
         TabIndex        =   19
         Top             =   675
         Width           =   2670
      End
      Begin VB.Label Label1 
         Caption         =   "ALMACENES"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   -70545
         TabIndex        =   16
         Top             =   1440
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "TIPOS DE DOCUMENTOS"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   6120
         TabIndex        =   18
         Top             =   1440
         Width           =   2310
      End
      Begin VB.Shape Shape2 
         BackColor       =   &H80000004&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H80000006&
         Height          =   3000
         Left            =   -73380
         Top             =   1215
         Width           =   7185
      End
      Begin VB.Label lblMoneda 
         AutoSize        =   -1  'True
         Caption         =   "Moneda"
         Height          =   195
         Left            =   240
         TabIndex        =   17
         Top             =   1320
         Width           =   585
      End
      Begin VB.Image Image2 
         Height          =   480
         Left            =   -74760
         Picture         =   "FRegistroVentas.frx":1274
         Top             =   480
         Width           =   480
      End
      Begin VB.Line Line5 
         X1              =   -74760
         X2              =   -64560
         Y1              =   4500
         Y2              =   4500
      End
      Begin VB.Line Line4 
         X1              =   -74760
         X2              =   -64560
         Y1              =   960
         Y2              =   960
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H80000004&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H80000006&
         Height          =   3495
         Left            =   4200
         Top             =   1260
         Width           =   6255
      End
      Begin VB.Line Line1 
         X1              =   240
         X2              =   10320
         Y1              =   960
         Y2              =   960
      End
      Begin VB.Label Label6 
         Caption         =   "REGISTRO DE VENTAS"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   -74235
         TabIndex        =   20
         Top             =   675
         Width           =   2670
      End
   End
End
Attribute VB_Name = "FRegistroVentas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Se retiraron los Fuentes de la red el 24/04/2003
'   PROGRAMADOR: EDGAR CANCHO RUIZ
'   REGISTRO DE VENTAS

Option Explicit
Public pb_editar As Boolean
Public pb_agregar As Boolean
Public pb_primerregistro As Boolean
Public pb_ultimoregistro As Boolean

Public pbderecho_agregar As Boolean
Public pbderecho_consultar As Boolean
Public pbderecho_editar As Boolean
Public pbderecho_borrar As Boolean
Public pbderecho_imprimir As Boolean
Public pb_tiposcreen As String

Public GrecibeUbicacion As BookmarkEnum
Public GrecibeColumnaID As String
Public GrecibeColumnaOpcional As String

Public objAlmacen As DB_INV_MANTENIMIENTOS.C_ALMACEN
Public objDocumentos As DB_MA_MANTENIMIENTOS.C_DOCUMENTO
Public objMoneda  As DB_MA_MANTENIMIENTOS.C_MONEDA
Public MobjVentasGeneral As DB_OP_FACTURACION.C_VENTASGENERAL


Dim MstrCadena_Criterios As String
Dim MstrCadena_Almacenes As String
Dim MstrGrupo As String
Dim MintTodos_Alm As Integer
Dim MintTodos_Cri As Integer

Dim MstrFechaIni As String
Dim MstrFechaFin As String

Dim objCorrelativo As DB_CORRELATIVO.C_Correlativos
Dim lngCorrelativo As Long

Function NombreMes(Nro As Integer) As String
Select Case Nro
    Case 1
        NombreMes = "ENERO"
    Case 2
        NombreMes = "FEBRERO"
    Case 3
        NombreMes = "MARZO"
    Case 4
        NombreMes = "ABRIL"
    Case 5
        NombreMes = "MAYO"
    Case 6
        NombreMes = "JUNIO"
    Case 7
        NombreMes = "JULIO"
    Case 8
        NombreMes = "AGOSTO"
    Case 9
        NombreMes = "SETIEMBRE"
    Case 10
        NombreMes = "OCTUBRE"
    Case 11
        NombreMes = "NOVIEMBRE"
    Case 12
        NombreMes = "DICIEMBRE"
    Case Else
        NombreMes = ""
End Select
End Function


Private Sub cmdGenerar_Click()
    lngCorrelativo = objCorrelativo.ObtenerCorrelativo(GCUSERID)
    imprimir
End Sub

Private Sub cmdGenerar2_Click()
    imprimir
End Sub

Private Sub cmdSalir_Click()
Unload Me
End Sub

Public Sub actualizar_registro()

End Sub

Private Sub cmdSalir2_Click()
    Unload Me
End Sub

Private Sub dtcMoneda_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        dtpFechaIni.SetFocus
    End If
End Sub

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

Private Sub Form_Activate()

    Call gactualizaopcion(pbderecho_agregar, pbderecho_editar, pbderecho_borrar, pbderecho_imprimir)
    Call gactualiza_barra(Me)
    'lineas nuevas
    If pbderecho_consultar = False Then
        Unload Me
    End If

End Sub

Private Sub Form_Initialize()
    'Call gHabilitarReg(Me, False)
End Sub

Private Sub Form_Load()
    'seguridad
    Call gseguridad(Me)
    
    If pbderecho_consultar Then
        InstanciaObjetos
        CargaListaCriterios
        CargaListaAlmacen
        Call CargaDataCombo(dtcMoneda, objMoneda.ListarMonedas, "CuryId", "Descr")
        
    Else

        MsgBox ("No tiene Derechos de Consultar en este formulario"), vbCritical + vbDefaultButton1, "Mensaje"
    End If
     
    dtpFechaIni.Value = Date
    dtpFechaFin.Value = Date
    dtcMoneda.BoundText = GstrCodMonedaBase
         
    Me.Top = 200
    Me.Left = (Screen.Width - Me.Width) / 2
     
 
End Sub

Function valida_datos()
   
    If GVDATO(dtcMoneda.Text) = Empty And dtcMoneda.Enabled Then
        valida_datos = False
        MsgBox "Ingrese Moneda", vbExclamation, "Falta Parámetro"
        SSTab1.Tab = 0
        dtcMoneda.SetFocus
        Exit Function
    End If

    If dtpFechaIni.Value > dtpFechaFin.Value Then
        valida_datos = False
        MsgBox "Rango de Fecha Incorrecto", vbExclamation, "Error de ingreso"
        SSTab1.Tab = 0
        dtpFechaIni.SetFocus
        Exit Function
    End If
    
    If lstCriterios.ndisponibles = 0 And lstCriterios.nseleccionados = 0 Then
        valida_datos = False
        MsgBox "No existen registros de Categorias o Sub Categorias", vbExclamation, "Error de ingreso"
        SSTab1.Tab = 0
        Exit Function
    End If
    
    If lstAlmacen.ndisponibles = 0 And lstAlmacen.nseleccionados = 0 Then
        valida_datos = False
        MsgBox "No existen registros de Almacenes", vbExclamation, "Error de ingreso"
        SSTab1.Tab = 0
        Exit Function
    End If
        
    ' PARA LOS CRITERIOS DE TIPOS DE DOCUMENTOS
    If lstCriterios.ndisponibles = 0 Or lstCriterios.nseleccionados = 0 Then
        MintTodos_Cri = 1
        MstrCadena_Criterios = " "
    Else
        MintTodos_Cri = 0
        If Len(lstCriterios.listar_codigos_seleccionados) > 255 Then
            valida_datos = False
            MsgBox "Selecione menos Tipos de Documentos o Seleccione Todos", vbExclamation, "Error de ingreso"
            SSTab1.Tab = 0
            Exit Function
        Else
            MstrCadena_Criterios = lstCriterios.listar_codigos_seleccionados
        End If
    End If
        
    ' PARA LOS ALMACENES
    If lstAlmacen.ndisponibles = 0 Or lstAlmacen.nseleccionados = 0 Then
        MintTodos_Alm = 1
        MstrCadena_Almacenes = " "
    Else
        MintTodos_Alm = 0
        If Len(lstAlmacen.listar_codigos_seleccionados) > 255 Then
            valida_datos = False
            MsgBox "Selecione menos Almacenes o Seleccione Todos", vbExclamation, "Error de ingreso"
            SSTab1.Tab = 1
            Exit Function
        Else
            MstrCadena_Almacenes = lstAlmacen.listar_codigos_seleccionados
        End If
    End If
    

    MstrFechaIni = CStr(Format(dtpFechaIni.Value, "YYYYMMdd"))
    MstrFechaFin = CStr(Format(dtpFechaFin.Value, "YYYYMMdd"))
    valida_datos = True
End Function

Sub salir_formulario()
    ' validar que no haya procesos pendientes
    ' si no hay problemas
    MDIFVENTAS.Toolbar1.Buttons(18).Caption = "Salir"    ' boton salir
    Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
    
    
    Set objAlmacen = Nothing
    Set objDocumentos = Nothing
    Set objMoneda = Nothing
    Set objCorrelativo = Nothing
    
    'Hay que limpiar los Temporales
    
    MobjVentasGeneral.LimpiarTemporalRegVentas
    Set MobjVentasGeneral = Nothing
    
End Sub
Sub imprimir()
Dim Serie As String
Dim sRazonSocial As String
Dim sRuc As String
Dim sPeriodo As String

If Not valida_datos Then
    Exit Sub
End If

Screen.MousePointer = 11

'GstrReportesVta = "k:\sies\fuentes\Ventas\Report\"
        
    If optResumido.Value Then
        crRegistroVentas.ReportFileName = GstrReportesVta + "rpt_Reg_Ventas_Res.rpt"
        crRegistroVentas.WindowTitle = "Registro de Ventas"
        crRegistroVentas.StoredProcParam(0) = lngCorrelativo
        crRegistroVentas.StoredProcParam(1) = MstrFechaIni
        crRegistroVentas.StoredProcParam(2) = MstrFechaFin
        crRegistroVentas.StoredProcParam(3) = dtcMoneda.BoundText
        crRegistroVentas.StoredProcParam(4) = 1
        crRegistroVentas.StoredProcParam(5) = MstrCadena_Almacenes
        crRegistroVentas.StoredProcParam(6) = MintTodos_Alm
        crRegistroVentas.StoredProcParam(7) = MstrCadena_Criterios
        crRegistroVentas.StoredProcParam(8) = MintTodos_Cri
        'crRegistroVentas.StoredProcParam(9) = TxtSerie.Text
    Else
        '@ Jorge: modificado para imprimir reporte de ventas detallado(predtm. del sistema)
        '@ o DETALLADO SOLO CONTADO (NUEVO)-------------------------------------------------
        frmSelRegVentDetals.Show vbModal
        If frmSelRegVentDetals.tipoPago = 0 Then
           'Contado
           crRegistroVentas.ReportFileName = GstrReportesVta + "rpt_Reg_Ventas_Det_2.rpt"
        ElseIf frmSelRegVentDetals.tipoPago = 1 Then
           'Contado y Credito
           crRegistroVentas.ReportFileName = GstrReportesVta + "rpt_Reg_Ventas_Det.rpt"
        ElseIf frmSelRegVentDetals.tipoPago = 2 Then
           'Credito (Ahora Factura Credito)
           crRegistroVentas.ReportFileName = GstrReportesVta + "rpt_Reg_Ventas_Det_3.rpt"
        End If
        '@ ----------------------------------------------------------------------------------
        Serie = TxtSerie.Text
        If IsNull(Serie) Or Serie = "" Then Serie = "0"
        crRegistroVentas.StoredProcParam(0) = MstrFechaIni
        crRegistroVentas.StoredProcParam(1) = MstrFechaFin
        crRegistroVentas.StoredProcParam(2) = dtcMoneda.BoundText
        crRegistroVentas.StoredProcParam(3) = 1
        crRegistroVentas.StoredProcParam(4) = MstrCadena_Almacenes
        crRegistroVentas.StoredProcParam(5) = MintTodos_Alm
        crRegistroVentas.StoredProcParam(6) = MstrCadena_Criterios
        crRegistroVentas.StoredProcParam(7) = MintTodos_Cri
        crRegistroVentas.StoredProcParam(8) = Serie
    End If
    
    If rsSos.State Then Set rsSos = Nothing
    rsSos.Open "Select top 1 head2 as rz,right(rtrim(head3),11) as ruc from op_ticketform (nolock)", MyCon, adOpenStatic, adLockOptimistic
    If Not rsSos.EOF Then
        sRazonSocial = rsSos!rz
        sRuc = rsSos!ruc
    End If
    
    sPeriodo = NombreMes(Month(dtpFechaIni.Value)) & Space(1) & CStr(Year(dtpFechaIni.Value))
     crRegistroVentas.WindowTitle = "Registro de Ventas"
     crRegistroVentas.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & sRazonSocial & "'"
     crRegistroVentas.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.150.00'"
     crRegistroVentas.Formulas(3) = "formMoneda=stringvar strMoneda; strMoneda:='" & Trim(dtcMoneda.Text) & "'"
     'crRegistroVentas.Formulas(4) = "formFechaIni= datevar FechaIni; FechaIni:=date(" & Format(dtpFechaIni.Value, "YYYY,MM,dd") & ")"
     'crRegistroVentas.Formulas(5) = "formFechaFin= datevar FechaFin; FechaFin:=date(" & Format(dtpFechaFin.Value, "YYYY,MM,dd") & ")"
     crRegistroVentas.Formulas(4) = "formFechaIni= stringvar FechaIni; FechaIni:='" & sPeriodo & "'"
     crRegistroVentas.Formulas(5) = "formFechaFin= stringvar FechaFin; FechaFin:='" & sRuc & "'"
    
    '@ JORGE: OBSERVACION SIGUIENTE CODIGO.............................................
     crRegistroVentas.Formulas(6) = "formNDStock=" & GintDecStock
     crRegistroVentas.Formulas(7) = "formNDCosto=" & GintDecCosto
     crRegistroVentas.Formulas(8) = "formNDMonto=" & GintDecResultado
     crRegistroVentas.Formulas(9) = "formNDPrecio=" & GintDecPrecio
     crRegistroVentas.Formulas(10) = "formFactor=" & GFormatodeNumero(CDbl(1 + (GdblIGV / 100)), GintDecResultado)
    
    crRegistroVentas.WindowState = crptMaximized
    crRegistroVentas.WindowShowPrintSetupBtn = True
    
    crRegistroVentas.Connect = "DSN=SIES"
    crRegistroVentas.Action = 1
    
    crRegistroVentas.Reset
    
    MobjVentasGeneral.LimpiarTemporalRegVentas
    
Screen.MousePointer = 0

End Sub

Public Sub CargaDataCombo(objDataCombo As DataCombo, rsSource As Recordset, istrCampo1 As String, istrCampo2 As String)

    Set objDataCombo.DataSource = rsSource
    objDataCombo.DataField = istrCampo2
    Set objDataCombo.RowSource = rsSource
    objDataCombo.ListField = istrCampo2
    objDataCombo.BoundColumn = istrCampo1
    
    If Not rsSource.EOF Then
        objDataCombo.BoundText = rsSource.Fields(istrCampo2)
    End If

End Sub


Private Sub InstanciaObjetos()
    Set objAlmacen = New DB_INV_MANTENIMIENTOS.C_ALMACEN
    Set objDocumentos = New DB_MA_MANTENIMIENTOS.C_DOCUMENTO
    Set objMoneda = New DB_MA_MANTENIMIENTOS.C_MONEDA
    Set objCorrelativo = New DB_CORRELATIVO.C_Correlativos
    Set MobjVentasGeneral = New DB_OP_FACTURACION.C_VENTASGENERAL
End Sub

Private Sub CargaListaCriterios()
        lstCriterios.Size 15, 27
        lstCriterios.llena_lista objDocumentos.ListarDocumentos
End Sub

Private Sub CargaListaAlmacen()
        lstAlmacen.Size 15, 33
        lstAlmacen.llena_lista objAlmacen.ListarAlmacenesPorStatus(1)
End Sub



