VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form_Cuponeras_detalles 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Infomes de Cuponeras Detallados"
   ClientHeight    =   6600
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10200
   Icon            =   "Form_Cuponeras_Detalles.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6600
   ScaleWidth      =   10200
   Begin VB.CheckBox Chk_Detallado 
      Caption         =   "Incluir detalle de cupones"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2400
      TabIndex        =   56
      Top             =   6240
      Width           =   2175
   End
   Begin VB.Frame Frame_cuotas 
      Caption         =   "Cuotas"
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   855
      Left            =   120
      TabIndex        =   50
      Top             =   4680
      Width           =   5535
      Begin VB.ComboBox cmb_cuota_has 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_Cuponeras_Detalles.frx":2A8B2
         Left            =   3960
         List            =   "Form_Cuponeras_Detalles.frx":2A8B4
         TabIndex        =   53
         Top             =   360
         Width           =   1215
      End
      Begin VB.ComboBox cmb_cuota_des 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_Cuponeras_Detalles.frx":2A8B6
         Left            =   1680
         List            =   "Form_Cuponeras_Detalles.frx":2A8B8
         TabIndex        =   51
         Top             =   360
         Width           =   1215
      End
      Begin VB.Label lbl_cuo_has 
         Caption         =   "Hasta"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3120
         TabIndex        =   55
         Top             =   360
         Width           =   495
      End
      Begin VB.Label lbl_cuo_des 
         Caption         =   "De"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1320
         TabIndex        =   54
         Top             =   360
         Width           =   495
      End
      Begin VB.Label lbl_cuota 
         Caption         =   "Cuota"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   52
         Top             =   360
         Width           =   495
      End
   End
   Begin VB.Frame Frame_fechas 
      Caption         =   "Fechas de Generación"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   855
      Left            =   120
      TabIndex        =   44
      Top             =   3720
      Width           =   5535
      Begin VB.ComboBox cmb_fecha_des 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_Cuponeras_Detalles.frx":2A8BA
         Left            =   1680
         List            =   "Form_Cuponeras_Detalles.frx":2A8BC
         TabIndex        =   46
         Top             =   360
         Width           =   1215
      End
      Begin VB.ComboBox cmb_fecha_has 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   3960
         TabIndex        =   45
         Top             =   360
         Width           =   1215
      End
      Begin VB.Label lbl_fecha 
         Caption         =   "Fecha"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   49
         Top             =   360
         Width           =   735
      End
      Begin VB.Label lbl_fec_des 
         Caption         =   "De"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1080
         TabIndex        =   48
         Top             =   360
         Width           =   495
      End
      Begin VB.Label lbl_fec_has 
         Caption         =   "Hasta"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3120
         TabIndex        =   47
         Top             =   360
         Width           =   495
      End
   End
   Begin VB.Frame frame_bancos 
      Caption         =   "Bancos"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   855
      Left            =   120
      TabIndex        =   41
      Top             =   2760
      Width           =   5535
      Begin VB.ComboBox cmb_banco 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "Form_Cuponeras_Detalles.frx":2A8BE
         Left            =   1080
         List            =   "Form_Cuponeras_Detalles.frx":2A8C0
         TabIndex        =   42
         Top             =   360
         Width           =   4095
      End
      Begin VB.Label lbl_banco 
         Caption         =   "Banco"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   43
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.CommandButton Btn_Gen_Reporte 
      Caption         =   "Generar Reporte"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   34
      Top             =   5640
      Width           =   2055
   End
   Begin VB.CommandButton Btn_Can_Cup 
      Caption         =   "Cancelar"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   33
      Top             =   6120
      Width           =   2055
   End
   Begin VB.Frame Frame_Tipo_Bus 
      Caption         =   "Busquedas x"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   975
      Left            =   5760
      TabIndex        =   11
      Top             =   120
      Width           =   4335
      Begin VB.OptionButton Opt_Tipo_Bus 
         Caption         =   "Colegio"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   240
         TabIndex        =   32
         Top             =   360
         Width           =   855
      End
      Begin VB.OptionButton Opt_Tipo_Bus 
         Caption         =   "Personalizado"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   2
         Left            =   2640
         TabIndex        =   13
         Top             =   360
         Width           =   1335
      End
      Begin VB.OptionButton Opt_Tipo_Bus 
         Caption         =   "Curso"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   1440
         TabIndex        =   12
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Frame Frame_Establecimiento 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2535
      Left            =   120
      TabIndex        =   6
      Top             =   120
      Width           =   5535
      Begin VB.TextBox Txt_CuentaCte 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2160
         Locked          =   -1  'True
         TabIndex        =   3
         Top             =   1560
         Width           =   3255
      End
      Begin VB.ComboBox Cmb_Anho_Cup 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   2160
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   2040
         Width           =   975
      End
      Begin VB.CheckBox Chk_Empresa 
         Caption         =   "Empresa Alternativa"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   120
         Style           =   1  'Graphical
         TabIndex        =   9
         TabStop         =   0   'False
         Top             =   720
         Width           =   1935
      End
      Begin VB.TextBox Txt_CodConvBci 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2160
         Locked          =   -1  'True
         TabIndex        =   2
         Top             =   1200
         Width           =   975
      End
      Begin VB.CheckBox Chk_Empresa 
         Caption         =   "Empresa oficial"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   0
         Left            =   120
         Style           =   1  'Graphical
         TabIndex        =   5
         TabStop         =   0   'False
         Top             =   240
         Width           =   1935
      End
      Begin VB.ComboBox Cmb_Part_Cup 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   2160
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   720
         Width           =   3255
      End
      Begin VB.ComboBox Cmb_Colegio_Cup 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   2160
         Style           =   2  'Dropdown List
         TabIndex        =   0
         Top             =   270
         Width           =   3255
      End
      Begin MSComDlg.CommonDialog cd 
         Left            =   4920
         Top             =   1920
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   393216
      End
      Begin VB.Label Label9 
         Caption         =   "Nº Cuenta Corriente"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   1560
         Width           =   1815
      End
      Begin VB.Label Label10 
         Caption         =   "Código Convenio Bci"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1200
         Width           =   1815
      End
      Begin VB.Label Label15 
         Caption         =   "Año Escolar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   2040
         Width           =   1575
      End
   End
   Begin VB.Frame Frame_bus 
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   4575
      Index           =   2
      Left            =   5760
      TabIndex        =   14
      Top             =   960
      Width           =   4335
      Begin VB.Frame Frame_DatosApod 
         Caption         =   "Datos Apoderado"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   1695
         Left            =   0
         TabIndex        =   27
         Top             =   1080
         Visible         =   0   'False
         Width           =   4335
         Begin VB.TextBox Txt_NomApo 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   840
            TabIndex        =   31
            Top             =   720
            Width           =   3375
         End
         Begin VB.TextBox Txt_RutApo 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   840
            TabIndex        =   29
            Top             =   360
            Width           =   1215
         End
         Begin VB.Label Label14 
            Caption         =   "Nombre"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   30
            Top             =   720
            Width           =   855
         End
         Begin VB.Label Label12 
            Caption         =   "Rut"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   28
            Top             =   360
            Width           =   495
         End
      End
      Begin VB.Frame Frame_datos_busqueda 
         Height          =   2655
         Left            =   0
         TabIndex        =   15
         Top             =   1080
         Visible         =   0   'False
         Width           =   4335
         Begin VB.CommandButton btn_can_busqueda 
            Caption         =   "Cancelar"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   2760
            TabIndex        =   20
            Top             =   240
            Width           =   1215
         End
         Begin VB.OptionButton opt_criterio 
            Caption         =   "Apellidos"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   120
            TabIndex        =   19
            Top             =   300
            Width           =   975
         End
         Begin VB.OptionButton opt_criterio 
            Caption         =   "Rut"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   1680
            TabIndex        =   18
            Top             =   300
            Width           =   855
         End
         Begin VB.TextBox txt_crit_busqueda 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Index           =   0
            Left            =   240
            TabIndex        =   17
            Top             =   720
            Width           =   3735
         End
         Begin VB.ListBox lst_busq_caja 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   1320
            Index           =   0
            Left            =   240
            TabIndex        =   16
            Top             =   1080
            Width           =   3855
         End
         Begin VB.TextBox txt_crit_busqueda 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Index           =   1
            Left            =   240
            TabIndex        =   22
            Top             =   720
            Width           =   1095
         End
         Begin VB.TextBox txt_dig_busqueda 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   1440
            TabIndex        =   23
            Top             =   720
            Width           =   255
         End
         Begin VB.ListBox lst_busq_caja 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   1320
            Index           =   1
            Left            =   240
            TabIndex        =   21
            Top             =   1080
            Width           =   1815
         End
      End
      Begin VB.Frame Frame4 
         Caption         =   "Buscar por"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   735
         Left            =   0
         TabIndex        =   24
         Top             =   240
         Width           =   4305
         Begin VB.OptionButton Opt_busqueda_caj 
            Caption         =   "Alumno"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   2400
            TabIndex        =   26
            Top             =   240
            Width           =   1215
         End
         Begin VB.OptionButton Opt_busqueda_caj 
            Caption         =   "Apoderado"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   720
            TabIndex        =   25
            Top             =   240
            Width           =   1215
         End
      End
   End
   Begin VB.Frame Frame_bus 
      BorderStyle     =   0  'None
      Height          =   4575
      Index           =   1
      Left            =   5760
      TabIndex        =   35
      Top             =   960
      Width           =   4335
      Begin VB.Frame Frame_Cursos 
         Caption         =   "Cursos"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   3615
         Left            =   0
         TabIndex        =   38
         Top             =   960
         Width           =   3855
         Begin VB.CheckBox chk_todos_cursos 
            Caption         =   "Todos los cursos"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   240
            TabIndex        =   40
            Top             =   2400
            Width           =   1575
         End
         Begin VB.ListBox lst_cursosinf 
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   1740
            Left            =   240
            Style           =   1  'Checkbox
            TabIndex        =   39
            Top             =   360
            Width           =   1335
         End
      End
      Begin VB.Frame Frame_TipEns 
         Caption         =   "Tipo de enseñanza"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   855
         Left            =   0
         TabIndex        =   36
         Top             =   0
         Width           =   3855
         Begin VB.ComboBox cmb_modalidad 
            Height          =   315
            Left            =   120
            TabIndex        =   37
            Top             =   360
            Width           =   3375
         End
      End
   End
End
Attribute VB_Name = "Form_Cuponeras_detalles"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TipoGen As Integer ' Indica el tipo de generación, por colegio, curso, apoderado.
Dim AColegios(), APartic(), CodEmpresa As String, ACuotas(), Acuotas2()
Dim IndAColegios As Long, IndAPartic As Integer
Dim Particular As Boolean, NomEmpresa As String
Dim ARutBus() As String, Busqueda As Integer
Dim Tipobus As Integer, RutApo As String
Dim Anuevocurso(), SelCursos As String
Dim Criterio As String, CritBanco As String, CritFechas As String, CritCuotas As String, CritEmpresa As String
Dim Abancos As String, bancos As String

Private Sub Btn_Can_Cup_Click()
Unload Me
End Sub

Private Sub btn_gen_reporte_Click()
'If Me.dtp_fec_des.Value <= Me.dtp_fec_has.Value Then
'Else
'    MsgBox ("Error en las fechas")
'End If
Criterio = ""
If Me.Txt_CodConvBci <> "" Then
    Select Case TipoGen
        Case 0
            Criterio = "" ' Trae todos los apoderados del colegio
        Case 1
            Call ArmaCursos ' Arma cadenas de cursos a buscar para consulta sql.
            Criterio = SelCursos ' asigna cadena a variable.
        Case 2
               Criterio = "{apoderados.rut_apo} ='" & Me.txt_RutApo & "'"
    End Select
    
    If Me.Cmb_Banco <> "TODOS" Then
        CritBanco = IIf(Criterio = "", "{fnza_cod_banco.descripcion} ='" & Me.Cmb_Banco & "'", " and {fnza_cod_banco.descripcion} ='" & Me.Cmb_Banco & "'")
    Else
        CritBanco = ""
    End If
    Criterio = Criterio & CritBanco
    
    If Me.cmb_fecha_des <> "TODAS" Then
        CritFechas = IIf(Criterio = "", "{fnza_cuponeras.fecha_gen} >= date(" & Year(Me.cmb_fecha_des) & "," & Month(Me.cmb_fecha_des) & "," & Day(Me.cmb_fecha_des) & ") and {fnza_cuponeras.fecha_gen} <= date(" & Year(Me.cmb_fecha_has) & "," & Month(Me.cmb_fecha_has) & "," & Day(Me.cmb_fecha_has) & ")", " and {fnza_cuponeras.fecha_gen} >= date(" & Year(Me.cmb_fecha_des) & "," & Month(Me.cmb_fecha_des) & "," & Day(Me.cmb_fecha_des) & ") and {fnza_cuponeras.fecha_gen} <= date(" & Year(Me.cmb_fecha_has) & "," & Month(Me.cmb_fecha_has) & "," & Day(Me.cmb_fecha_has) & ")")
    Else
        CritFechas = ""
    End If
    Criterio = Criterio & CritFechas
    
    If Me.Chk_Detallado.Value = 1 Then
        If Me.cmb_cuota_des <> "TODAS" Then
            CritCuotas = IIf(Criterio = "", "{fnza_deta_cupones.numero} >= '" & ACuotas(Me.cmb_cuota_des.ListIndex) & "' And {fnza_deta_cupones.numero} <= '" & Acuotas2(Me.cmb_cuota_has.ListIndex) & "'", "and {fnza_deta_cupones.numero} >= '" & ACuotas(Me.cmb_cuota_des.ListIndex) & "' And {fnza_deta_cupones.numero} <= '" & Acuotas2(Me.cmb_cuota_has.ListIndex) & "'")
        Else
            CritCuotas = ""
        End If
        Criterio = Criterio & CritCuotas
    End If
    CritEmpresa = IIf(Criterio = "", "{fnza_cuponeras.colegio} ='" & CodEmpresa & "'", " and {fnza_cuponeras.colegio} ='" & CodEmpresa & "'")
    Criterio = Criterio & CritEmpresa
    Call Imprimir
Else
    MsgBox ("Faltan opciones por completar")
End If
End Sub

Private Sub Chk_Detallado_Click()
Me.Frame_cuotas.Enabled = True

End Sub

Private Sub Chk_Empresa_Click(Index As Integer)
Select Case Index
    Case 0
        If Me.Chk_Empresa(Index).Value Then
            Me.Chk_Empresa(1).Value = 0
            Particular = False
        Else
            Me.Chk_Empresa(1).Value = 1
            Particular = True
        End If
        'Me.Chk_Empresa(1).Value = IIf(Me.Chk_Empresa(Index).Value = 0, 1, 0)
    
    Case 1
        If Me.Chk_Empresa(Index).Value Then
            Me.Chk_Empresa(0).Value = 0
            Particular = True
        Else
            Me.Chk_Empresa(0).Value = 1
            Particular = False
        End If
        'Me.Chk_Empresa(0).Value = IIf(Me.Chk_Empresa(Index).Value = 0, 1, 0)
End Select
'Particular = IIf(Index = 0, False, True)
Me.Txt_CodConvBci = IIf(Particular, devuelvecampo("hist_cod_colegio", "", "cod_conv_bci", "colegio ='" & APartic(IndAPartic) & "'", conn), devuelvecampo("hist_cod_colegio", "", "cod_conv_bci", "colegio ='" & AColegios(IndAColegios) & "'", conn))
Me.Txt_CuentaCte = IIf(Particular, devuelvecampo("fnza_cod_cta_cte", "", "cta_cte", "colegio ='" & APartic(IndAPartic) & "'", conn), devuelvecampo("fnza_cod_cta_cte", "", "cta_cte", "colegio ='" & AColegios(IndAColegios) & "'", conn))
NomEmpresa = IIf(Particular, Me.Cmb_Part_Cup, Me.Cmb_Colegio_Cup)
CodEmpresa = IIf(Particular, APartic(IndAPartic), AColegios(IndAColegios))
If Particular Then
    Me.Cmb_Colegio_Cup.BackColor = &H80000005
    Me.Cmb_Part_Cup.BackColor = &HC0FFFF
Else
    Me.Cmb_Colegio_Cup.BackColor = &HC0FFFF
    Me.Cmb_Part_Cup.BackColor = &H80000005
End If
End Sub

Private Sub chk_todos_cursos_Click()
If Me.chk_todos_cursos.Value Then
    For t = 0 To Me.lst_cursosinf.ListCount - 1
        Me.lst_cursosinf.Selected(t) = True
    Next t
Else
    For t = 0 To Me.lst_cursosinf.ListCount - 1
        Me.lst_cursosinf.Selected(t) = False
        Me.lst_cursosinf.ListIndex = 0
    Next t
End If
End Sub




Private Sub Cmb_Colegio_Cup_Click()
IndAColegios = Me.Cmb_Colegio_Cup.ListIndex
If IndAColegios >= 0 Then
    Me.Chk_Empresa(0).Enabled = True
Else
    Me.Chk_Empresa(0).Enabled = False
End If

Me.Cmb_Part_Cup.Clear
Call llenacomboconarreglo(Cmb_Part_Cup, "hist_cod_colegio where length(colegio)>6 and left(colegio,6)='" & AColegios(IndAColegios) & "'", "nombre", "colegio", APartic, conn)
If Me.Cmb_Part_Cup.ListCount > 0 Then
    Me.Cmb_Part_Cup.ListIndex = 0
End If
'If Not Me.Chk_Empresa(0).Value Then
'    Call Chk_Empresa_Click(0)
''Else
'   ' Call Chk_Empresa_Click(1)
'End If
End Sub



Private Sub cmb_cuota_des_Click()
Dim largo As Integer
p = Me.cmb_cuota_des.ListIndex
D = 0
Me.cmb_cuota_has.Clear
If Trim(UCase(Me.cmb_cuota_des.Text)) = "TODAS" Then
    Me.cmb_cuota_has.Visible = False
    Me.lbl_cuo_has.Visible = False
 
Else
    Me.cmb_cuota_has.Visible = True
    Me.lbl_cuo_has.Visible = True
    If p >= 0 Then
        largo = (Me.cmb_cuota_des.ListCount - 2) - Val(p)
        ReDim Acuotas2(largo)
        For t = p To Me.cmb_cuota_des.ListCount - 2
            Me.cmb_cuota_has.AddItem Me.cmb_cuota_des.List(t)
            Acuotas2(D) = ACuotas(t)
            D = D + 1
        Next t
    Me.cmb_cuota_has.ListIndex = Me.cmb_cuota_des.ListIndex - p
    End If
End If
End Sub

Private Sub cmb_cuota_des_KeyPress(KeyAscii As Integer)
KeyAscii = 0

End Sub

Private Sub cmb_cuota_has_KeyPress(KeyAscii As Integer)
KeyAscii = 0

End Sub



Private Sub Imprimir()


    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open "select nom_est, dir_est, localidad_est from establecimientos", conn
    If rs.RecordCount > 0 Then
        Nombrecol = rs("Nom_est")
        Direccol = rs("Dir_est")
        ComunaCol = rs("Localidad_est")
    End If
    rs.Close
    Set rs = Nothing
    ' Si esta checkBox de detalle marcado, asigno informe_banco_detallado.rpt
    ' Si no asigno informe_banco.rpt
    
    Form_main.CrystalReport.ReportFileName = IIf(Me.Chk_Detallado.Value, DirAplicacion & "\rpt\informe_banco_detalladop.rpt", DirAplicacion & "\rpt\informe_bancop.rpt")
    Form_main.CrystalReport.WindowTitle = IIf(Me.Chk_Detallado.Value, "LISTADO DE ENVÍOS DETALLADO CUPONERAS", "LISTADO DE ENVÍOS CUPONERAS")
    
    Form_main.CrystalReport.Formulas(0) = "nombrecolegio = '" & Nombrecol & "'"
    Form_main.CrystalReport.Formulas(1) = "direccioncolegio = '" & Direccol & "'"
   'Form_main.CrystalReport.Formulas(2) = "comunacolegio = '" & ComunaCol & "'"
   'Form_main.CrystalReport.Formulas(3) = "titulo= '" & titulo & "'"
    Form_main.CrystalReport.Formulas(3) = "hora = '" & Time & "'"
   ' Form_main.CrystalReport.Formulas(5) = "anhoescolar = '" & Anno & "'"
   'Form_main.CrystalReport.WindowTitle = titulo
    Form_main.CrystalReport.ReplaceSelectionFormula ("")
    Form_main.CrystalReport.ReplaceSelectionFormula (Criterio)
    Form_main.CrystalReport.WindowState = crptMaximized
    Form_main.CrystalReport.Action = 1
    Form_main.CrystalReport.ReplaceSelectionFormula ("")
    Call LimpiaFormulas(Form_main.CrystalReport, 30)
End Sub


Private Sub cmb_fecha_des_Click()
p = Me.cmb_fecha_des.ListIndex
D = 0
Me.cmb_fecha_has.Clear
If Trim(UCase(Me.cmb_fecha_des.Text)) = "TODAS" Then
    Me.cmb_fecha_has.Visible = False
    Me.lbl_fec_has.Visible = False
 
Else
    Me.cmb_fecha_has.Visible = True
    Me.lbl_fec_has.Visible = True
    If p >= 0 Then
        For t = p To Me.cmb_fecha_des.ListCount - 2
            Me.cmb_fecha_has.AddItem Me.cmb_fecha_des.List(t)
            D = D + 1
        Next t
    Me.cmb_fecha_has.ListIndex = Me.cmb_fecha_des.ListIndex - p
    End If
End If

End Sub

Private Sub cmb_modalidad_Click()
Set rs = New ADODB.Recordset
modalidad = devuelvecampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.cmb_modalidad.Text & "'", conn)
rs.CursorLocation = adUseClient
rs.Open "SELECT num_gra, let_cur FROM CURSOS where cod_ens ='" & modalidad & "' ORDER BY NUM_GRA,let_cur", conn
If rs.RecordCount > 0 Then
    ReDim Anuevocurso(rs.RecordCount, 2)
    Me.lst_cursosinf.Clear
    Me.chk_todos_cursos.Value = 0
    c = 0
    While Not rs.EOF
        lst_cursosinf.AddItem rs("num_gra") + " " + rs("LET_CUR")
        Anuevocurso(c, 1) = rs("num_gra")
        Anuevocurso(c, 2) = rs("let_cur")
        rs.MoveNext
        c = c + 1
    Wend
    End If
rs.Close
Set rs = Nothing
End Sub


Private Sub Form_Load()
Call llenacombo(Cmb_Banco, "fnza_cod_banco", "descripcion", "order by descripcion", conn)
Me.Cmb_Banco.AddItem "TODOS": Me.Cmb_Banco.ListIndex = Me.Cmb_Banco.ListCount - 1
Call llenacombo(cmb_fecha_des, "fnza_cuponeras", "distinct fecha_gen", "order by fecha_gen", conn)
Me.cmb_fecha_des.AddItem "TODAS": Me.cmb_fecha_des.ListIndex = Me.cmb_fecha_des.ListCount - 1
Call llenacomboconarreglo(cmb_cuota_des, "fnza_deta_cupones order by cuota asc", "distinct right(numero,2) as cuota", " numero", ACuotas, conn)
Me.cmb_cuota_des.AddItem "TODAS": Me.cmb_cuota_des.ListIndex = Me.cmb_cuota_des.ListCount - 1
Particular = False
Call llenacomboconarreglo(Cmb_Colegio_Cup, "hist_cod_colegio where length(colegio)=6 ", "nombre", "colegio", AColegios, conn)
Me.Cmb_Anho_Cup.AddItem Val(Anno)
Me.Cmb_Anho_Cup.AddItem Val(Anno) + 1
Me.Chk_Empresa(0).Enabled = False: Me.Chk_Empresa(1).Enabled = False
Me.Opt_Tipo_Bus(0).Value = True
Me.lst_busq_caja(0).Visible = False
Me.lst_busq_caja(1).Visible = False
Me.opt_criterio(0).Value = True
Busqueda = 1
End Sub

Private Sub lst_busq_caja_DblClick(Index As Integer)
 
    Frame_DatosApod.Visible = True
    Dim Ind As Integer
    Ind = Me.lst_busq_caja(Index).ListIndex
    Me.lst_busq_caja(Index).Visible = Falseido
    Me.Frame_datos_busqueda.Visible = False
    Me.Opt_busqueda_caj(Tipobus).Value = False

    Ind = Me.lst_busq_caja(Index).ListIndex
    Call Creagrupo(Ind)
End Sub

Private Sub Opt_busqueda_caj_Click(Index As Integer)
 '   Frame_datos_busqueda.Visible = True
    Frame_DatosApod.Visible = False
    Tipobus = Index
    Me.Frame_datos_busqueda.Height = 1095
    Me.Frame_datos_busqueda.Visible = True
    Me.Frame_DatosApod.Enabled = False
    If Me.opt_criterio(0).Value Then
        Call opt_criterio_Click(0)
    Else
        Call opt_criterio_Click(1)
    End If
End Sub

Private Sub opt_criterio_Click(Index As Integer)
Dim Otroindice As Integer
Otroindice = (Index - 1) * -1
Me.txt_crit_busqueda(Otroindice).Visible = False
Me.lst_busq_caja(Otroindice).Visible = False
Me.txt_crit_busqueda(Index).Visible = True
Me.txt_crit_busqueda(Index).Visible = True
'If Me.Frame_datos_busqueda.Visible Then
    Me.txt_crit_busqueda(Index) = ""
    Me.lst_busq_caja(Index) = ""
    Me.txt_dig_busqueda = ""
    'Me.txt_crit_busqueda(Index).SetFocus
'End If
End Sub

Private Sub Opt_Tipo_Bus_Click(Index As Integer)
Call OcultaFramesBus
If Index <> 0 Then
    Me.Frame_bus(Index).Visible = True
End If
TipoGen = Index ' Asigno a tipogen el index de selección.....
Select Case TipoGen
    Case 1
        Me.cmb_modalidad.Clear
        Call llenacombo(cmb_modalidad, "codigos_ensenanza", "des_ens", "order by ord_ens", conn)
    Case 2
        ' Limpiar controles
End Select
End Sub

Private Sub txt_crit_busqueda_Change(Index As Integer)
Dim Tablas As String, campos As String, CampoComp As String, Orden As String
If Tipobus = 0 And Index = 0 Then ' Apoderado por apellido
    campos = "noms_apo, ape1_apo, ape2_apo, rut_apo": Tablas = "apoderados": CampoComp = "ape1_apo": Orden = "ape1_apo, ape2_apo, noms_apo"
ElseIf Tipobus = 0 And Index = 1 Then ' Apoderado por Rut
    campos = "noms_apo, ape1_apo, ape2_apo, rut_apo": Tablas = "apoderados": CampoComp = "rut_apo": Orden = "rut_apo"
ElseIf Tipobus = 1 And Index = 0 Then 'Alumno por apellido
    campos = "nom_alu, ape_pat_alu, ape_mat_alu, ci_alu": Tablas = "postulantes": CampoComp = "ape_pat_alu": Orden = "ape_pat_alu, ape_mat_alu, nom_alu"
ElseIf Tipobus = 1 And Index = 1 Then 'Alumno por rut
    campos = "nom_alu, ape_pat_alu, ape_mat_alu, ci_alu": Tablas = "postulantes": CampoComp = "ci_alu": Orden = "ci_alu"
End If

If Busqueda = 1 Then
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    lst_busq_caja(Index).Clear
    If Not ((Chr(KeyAscii) >= "A" And Chr(KeyAscii) <= "Z") Or (Chr(KeyAscii) >= "a" And Chr(KeyAscii) <= "z")) Then
        KeyAscii = 0
        If Me.txt_crit_busqueda(Index).Text <> "" Then
            Criterio = "'" + Me.txt_crit_busqueda(Index).Text + Consulta + "%'"
            rs.CursorLocation = adUseClient
            rs.Open "SELECT " & campos & " FROM " & Tablas & " where " & CampoComp & " like " & Criterio & " order by " & Orden, conn
            Me.lst_busq_caja(Index).Visible = False
            Me.Frame_datos_busqueda.Height = 1095
            If rs.RecordCount > 0 Then
                
                Me.Frame_datos_busqueda.Height = 2535
                Me.Frame_datos_busqueda.Refresh
                ReDim ARutBus(rs.RecordCount, 4)
                'Indi = 0
                X = 0
                Me.lst_busq_caja(Index).Visible = True
                While Not rs.EOF
                    If Index = 0 Then
                        Me.lst_busq_caja(Index).AddItem rs(1) & " " & rs(2) & " " & rs(0)
                    Else
                        Me.lst_busq_caja(Index).AddItem rs(3)
                    End If
                    ARutBus(X, 0) = IIf(IsNull(rs(0)), "", rs(0))
                    ARutBus(X, 1) = IIf(IsNull(rs(1)), "", rs(1))
                    ARutBus(X, 2) = IIf(IsNull(rs(2)), "", rs(2))
                    ARutBus(X, 3) = IIf(IsNull(rs(3)), "", rs(3))
                    rs.MoveNext
                    X = X + 1
                Wend
            Else
                Me.Frame_datos_busqueda.Height = 1095
                'Indi = 0
            End If
            rs.Close
        Else
            Me.lst_busq_caja(Index).Visible = False
            Me.Frame_datos_busqueda.Height = 1095
        End If
    End If
    Set rs = Nothing
End If
End Sub

Sub OcultaFramesBus()
Me.Frame_bus(1).Visible = False
Me.Frame_bus(2).Visible = False
End Sub

Sub ArmaCursos()
Dim Ngrado As String, Letra As String, modalidad As String, Con As Integer
Con = 0
SelCursos = ""
If Me.lst_cursosinf.SelCount > 0 And Me.cmb_modalidad.Text <> "" Then
    modalidad = devuelvecampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.cmb_modalidad.Text & "'", conn)
    For t = 0 To Me.lst_cursosinf.ListCount - 1
        If Me.lst_cursosinf.Selected(t) Then
            Con = t
        End If
    Next t
    For t = 0 To Me.lst_cursosinf.ListCount - 1
        If Me.lst_cursosinf.Selected(t) Then
            Ngrado = Anuevocurso(t, 1)
            Letra = Anuevocurso(t, 2)
            If t = Con Then
                SelCursos = SelCursos & "({alu_x_cur.num_gra}  = '" & Ngrado & "' and {alu_x_cur.let_cur} = '" & Letra & "' and {alu_x_cur.cod_ens} ='" & modalidad & "')"
            Else
                SelCursos = SelCursos & "({alu_x_cur.num_gra}  = '" & Ngrado & "' and {alu_x_cur.let_cur} = '" & Letra & "' and {alu_x_cur.cod_ens} ='" & modalidad & "')" & " or "
            End If
        End If
    Next
    SelCursos = "(" & SelCursos & ")"
End If
End Sub
Sub Creagrupo(Indice)
Dim APValores() As Long
Me.Opt_busqueda_caj(Tipobus).Value = False
Set rs = New ADODB.Recordset
If Tipobus = 0 Then ' Busca por apoderado
    
    Me.txt_nomapo = ARutBus(Indice, 0) & " " & ARutBus(Indice, 1) & " " & ARutBus(Indice, 2)
    Me.txt_RutApo = ARutBus(Indice, 3)
        
    'Call AluMatenGrilla(ARutBus(Indice, 3)) 'Ordenar Por fecha de ingreso al curso
Else
    RutApo = devuelvecampo("apo_x_alu", "", "rut_apo", "agno=" & Cmb_Anho_Cup.Text & " AND ci_alu ='" & ARutBus(Indice, 3) & "'", conn)
    If RutApo <> "" Then
        rs.CursorLocation = adUseClient
        rs.Open "select * from apoderados where rut_apo ='" & RutApo & "'", conn
        If rs.RecordCount > 0 Then
            Me.txt_nomapo.Text = rs("noms_apo") & " " & rs("ape1_apo") & " " & rs("ape2_apo")
            Me.txt_RutApo.Text = rs("rut_apo")
            'Me.grd_alumat_edim.FixedCols = 0: Me.grd_alumat_edim.FixedRows = 1
            rs.Close
                       'Call AluMatenGrilla(RutApo)
        Else
            MsgBox ("Alumno sin apoderado, complete la ficha")
            rs.Close
        End If
    End If
End If
RutApo = Me.txt_RutApo
End Sub
