VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frm_Pedido_principal 
   Caption         =   "Pedidos - Administración de cuentas"
   ClientHeight    =   10455
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   14910
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   ScaleHeight     =   10455
   ScaleWidth      =   14910
   StartUpPosition =   1  'CenterOwner
   WindowState     =   2  'Maximized
   Begin VB.CommandButton CmdAnularItm 
      Caption         =   "Anular Item "
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   8880
      Picture         =   "frm_Pedido_principal.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   54
      ToolTipText     =   "Anular ticket"
      Top             =   5280
      Width           =   1095
   End
   Begin VB.CommandButton CmdAnularPed 
      Caption         =   "Anular Pedido"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   8880
      Picture         =   "frm_Pedido_principal.frx":00FA
      Style           =   1  'Graphical
      TabIndex        =   53
      ToolTipText     =   "Anular ticket"
      Top             =   6960
      Width           =   1095
   End
   Begin VB.CommandButton cmdAnularCta 
      Caption         =   "Anular Cuenta"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1575
      Left            =   8880
      Picture         =   "frm_Pedido_principal.frx":09C4
      Style           =   1  'Graphical
      TabIndex        =   52
      ToolTipText     =   "Anular ticket"
      Top             =   8640
      Width           =   1095
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   1095
      Index           =   4
      Left            =   7920
      TabIndex        =   15
      Top             =   5280
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   320
      Left            =   120
      TabIndex        =   55
      Text            =   "   Producto                                                              Cant.       P.Unit       SubTotal       Pedido       Itm"
      Top             =   5790
      Width           =   7875
   End
   Begin VB.Frame Fr1 
      Height          =   1215
      Left            =   10320
      TabIndex        =   21
      Top             =   0
      Width           =   4455
      Begin VB.TextBox txtTC 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3120
         TabIndex        =   29
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox txtturno 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1200
         TabIndex        =   27
         Top             =   850
         Width           =   975
      End
      Begin VB.TextBox txtestacion 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1200
         TabIndex        =   26
         Top             =   520
         Width           =   2895
      End
      Begin VB.TextBox txtuser 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1200
         TabIndex        =   25
         Top             =   200
         Width           =   2895
      End
      Begin VB.Label Label6 
         Alignment       =   1  'Right Justify
         Caption         =   "T/C"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   2400
         TabIndex        =   28
         Top             =   840
         Width           =   615
      End
      Begin VB.Label Label5 
         Caption         =   "Turno:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   24
         Top             =   855
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "Estación:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   23
         Top             =   540
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "Usuario:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   22
         Top             =   210
         Width           =   855
      End
   End
   Begin VB.TextBox txtnropag 
      Alignment       =   2  'Center
      BackColor       =   &H8000000F&
      Height          =   615
      Index           =   1
      Left            =   7920
      TabIndex        =   19
      Text            =   "1"
      Top             =   7440
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   1095
      Index           =   7
      Left            =   7920
      TabIndex        =   18
      Top             =   9120
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   1095
      Index           =   6
      Left            =   7920
      TabIndex        =   17
      Top             =   8040
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   1095
      Index           =   5
      Left            =   7920
      TabIndex        =   16
      Top             =   6360
      Width           =   975
   End
   Begin VB.TextBox txtnropag 
      Alignment       =   2  'Center
      BackColor       =   &H8000000F&
      Height          =   975
      Index           =   0
      Left            =   9000
      TabIndex        =   14
      Text            =   "1"
      Top             =   2040
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   975
      Index           =   3
      Left            =   9000
      TabIndex        =   13
      Top             =   3960
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   975
      Index           =   2
      Left            =   9000
      TabIndex        =   12
      Top             =   3000
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   975
      Index           =   1
      Left            =   9000
      TabIndex        =   11
      Top             =   1080
      Width           =   975
   End
   Begin VB.CommandButton cmdpaginado 
      Height          =   975
      Index           =   0
      Left            =   9000
      TabIndex        =   10
      Top             =   120
      Width           =   975
   End
   Begin VB.TextBox txttitulo 
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   520
      Left            =   120
      TabIndex        =   7
      Top             =   5260
      Width           =   7875
   End
   Begin VB.CommandButton Command8 
      Caption         =   "Ultima operación"
      Height          =   255
      Left            =   7440
      TabIndex        =   5
      Top             =   120
      Width           =   1575
   End
   Begin VB.CommandButton Command6 
      Caption         =   " Apertura"
      Height          =   255
      Left            =   5760
      TabIndex        =   4
      Top             =   120
      Width           =   1695
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Estación"
      Height          =   255
      Left            =   4080
      TabIndex        =   3
      Top             =   120
      Width           =   1695
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Server"
      Height          =   255
      Left            =   2280
      TabIndex        =   2
      Top             =   120
      Width           =   2055
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Mesa/Cuenta"
      Height          =   255
      Left            =   0
      TabIndex        =   1
      Top             =   120
      Width           =   2295
   End
   Begin MSComctlLib.ListView lvw_mesa_cta 
      Height          =   4575
      Left            =   0
      TabIndex        =   0
      Top             =   360
      Width           =   9015
      _ExtentX        =   15901
      _ExtentY        =   8070
      View            =   3
      LabelWrap       =   0   'False
      HideSelection   =   0   'False
      HideColumnHeaders=   -1  'True
      FlatScrollBar   =   -1  'True
      FullRowSelect   =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   0
   End
   Begin MSComctlLib.ListView LvwCuenta 
      Height          =   4095
      Left            =   120
      TabIndex        =   6
      Top             =   6120
      Width           =   7785
      _ExtentX        =   13732
      _ExtentY        =   7223
      MultiSelect     =   -1  'True
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      HideColumnHeaders=   -1  'True
      FlatScrollBar   =   -1  'True
      FullRowSelect   =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      Appearance      =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial Narrow"
         Size            =   15.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   0
   End
   Begin VB.Frame Frame1 
      Height          =   3975
      Left            =   10320
      TabIndex        =   20
      Top             =   6240
      Width           =   4455
      Begin VB.CommandButton cmdActualizar 
         Caption         =   "&Refrescar Pantalla"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   120
         Picture         =   "frm_Pedido_principal.frx":0E06
         Style           =   1  'Graphical
         TabIndex        =   56
         ToolTipText     =   "Anular ticket"
         Top             =   2640
         Width           =   1335
      End
      Begin VB.CommandButton cmdAnular 
         Caption         =   "A&nular Ticket"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   1560
         Picture         =   "frm_Pedido_principal.frx":1248
         Style           =   1  'Graphical
         TabIndex        =   51
         ToolTipText     =   "Anular ticket"
         Top             =   2640
         Width           =   1335
      End
      Begin VB.CommandButton CmdSalir 
         Caption         =   "&Salir"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   3000
         Picture         =   "frm_Pedido_principal.frx":1B12
         Style           =   1  'Graphical
         TabIndex        =   50
         ToolTipText     =   "Salir "
         Top             =   2640
         Width           =   1335
      End
      Begin VB.CommandButton cmdPago 
         Caption         =   "&Registrar Pago"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   120
         Picture         =   "frm_Pedido_principal.frx":208E
         Style           =   1  'Graphical
         TabIndex        =   49
         ToolTipText     =   "Registar pago"
         Top             =   1440
         Width           =   1335
      End
      Begin VB.CommandButton cmdReImprimir 
         Caption         =   "&Imprimir Ticket "
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   3000
         Picture         =   "frm_Pedido_principal.frx":2960
         Style           =   1  'Graphical
         TabIndex        =   48
         ToolTipText     =   "Imprmir ticket"
         Top             =   1440
         Width           =   1335
      End
      Begin VB.CommandButton Command1 
         Caption         =   "Im&primir Cuenta"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   1560
         Picture         =   "frm_Pedido_principal.frx":322A
         Style           =   1  'Graphical
         TabIndex        =   47
         ToolTipText     =   "Imprimir cuenta"
         Top             =   1440
         Width           =   1335
      End
      Begin VB.CommandButton cmdOpenmesa 
         Cancel          =   -1  'True
         Caption         =   "&Abrir Mesa"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   120
         Picture         =   "frm_Pedido_principal.frx":3AF4
         Style           =   1  'Graphical
         TabIndex        =   46
         ToolTipText     =   "Abrir Mesa"
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton cmdOpenCta 
         Caption         =   "Abrir &Cuenta"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   1560
         Picture         =   "frm_Pedido_principal.frx":43BE
         Style           =   1  'Graphical
         TabIndex        =   45
         ToolTipText     =   "Abrir Cuenta"
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         Caption         =   "&Llamar Mesa/ Cuenta"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1095
         Left            =   3000
         Picture         =   "frm_Pedido_principal.frx":5400
         Style           =   1  'Graphical
         TabIndex        =   44
         ToolTipText     =   "Llamar mesa/cuenta"
         Top             =   240
         Width           =   1300
      End
   End
   Begin VB.Frame FRM3 
      Caption         =   "Código Mesa/Cuenta"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   4935
      Left            =   10320
      TabIndex        =   30
      Top             =   1320
      Width           =   4455
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "1"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   0
         Left            =   480
         TabIndex        =   43
         Top             =   2800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "2"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   1
         Left            =   1680
         TabIndex        =   42
         Top             =   2800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "3"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   2
         Left            =   2880
         TabIndex        =   41
         Top             =   2800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "4"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   3
         Left            =   480
         TabIndex        =   40
         Top             =   1800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "5"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   4
         Left            =   1680
         TabIndex        =   39
         Top             =   1800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "6"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   5
         Left            =   2880
         TabIndex        =   38
         Top             =   1800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "7"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   6
         Left            =   480
         TabIndex        =   37
         Top             =   800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "8"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   7
         Left            =   1800
         TabIndex        =   36
         Top             =   2760
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "9"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   8
         Left            =   2880
         TabIndex        =   35
         Top             =   800
         Width           =   1095
      End
      Begin VB.TextBox txtmesacta 
         BackColor       =   &H00000000&
         BeginProperty Font 
            Name            =   "Courier New"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   495
         Left            =   480
         TabIndex        =   34
         Top             =   240
         Width           =   3495
      End
      Begin VB.CommandButton cmdletra 
         Caption         =   "Letras"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   0
         Left            =   2880
         TabIndex        =   33
         Top             =   3800
         Width           =   1095
      End
      Begin VB.CommandButton cmddel 
         Caption         =   "Supr"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Left            =   1680
         TabIndex        =   32
         Top             =   3800
         Width           =   1095
      End
      Begin VB.CommandButton cmdNumeros 
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "Arial Black"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Index           =   9
         Left            =   480
         TabIndex        =   31
         Top             =   3800
         Width           =   1095
      End
   End
   Begin VB.Label Label2 
      Caption         =   "(0) Registros"
      ForeColor       =   &H80000002&
      Height          =   255
      Left            =   120
      TabIndex        =   9
      Top             =   4965
      Width           =   3615
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   135
      Left            =   120
      TabIndex        =   8
      Top             =   5160
      Width           =   15
   End
End
Attribute VB_Name = "frm_Pedido_principal"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim iNroPagina As Integer
Dim iTotalPagina As Integer
Dim iTotalRegistro As Integer

Dim iNroPaginaCta As Integer
Dim iTotalPaginaCta As Integer
Dim iTotalRegistroCta As Integer

Private Sub cmddel_Click()
txtmesacta.Text = ""
End Sub

Private Sub cmdNumeros_Click(Index As Integer)
txtmesacta.Text = Trim(txtmesacta.Text) + cmdNumeros(Index).Caption
End Sub

Private Sub cmdsalir_Click()
Unload Me
End Sub
Public Sub Inicio()
Dim sSQL As String
Dim ADORS As ADODB.Recordset
 On Error GoTo LineaError
 Screen.MousePointer = vbHourglass
 iNroPagina = 1
 iTotalPagina = 0
 iTotalRegistro = 0
 iNroPaginaCta = 1
 iTotalPaginaCta = 0
 iTotalRegistroCta = 0
 
 ConfiguraColumnas
 LlenaListas
 txtuser.Text = psUsuario_Descripcion
 txtestacion.Text = kPAR_CAJA
 txtturno.Text = kPAR_TURNO
 'Muestra el Tipo de Cambio para la fecha
 txtTC.Text = nTipoCambio
  If Not oDBAdmin.AbrirBD(ADOCnnSQL, psConnectString) Then GoTo Salir
  'Reglas por punto e importe
  If bolExistenProblemasConexionBDCliente = False Then
    ConectarBDCliente     'Abrimos conexion
  End If
  
  If bolExisteConexionBDCliente = True Then
        sSQL = "SELECT * FROM Regla_Punto"
        If Not oDBAdmin.EjecutarConsulta(ADOCnn2, sSQL, ADORS) Then GoTo Salir
          
        If ADORS.EOF Then
          MsgBox "Reglas en relación a los puntos no han sido establecidos", vbOKOnly + vbInformation
          GoTo Salir
        End If
        lReglaImporteMaximo = LeerCampo(ADORS!nImpoMaxi)
        lReglaPuntoImporte = CLng(LeerCampo(ADORS!nPuntImpo))
        lReglaPuntoCantidad = CLng(LeerCampo(ADORS!nPuntCant))
        oDBAdmin.CerrarBD ADOCnn2     'Cerramos conexion
        bolExisteConexionBDCliente = False
        
        'Actualizamos estos parametros en la BD Local
        sSQL = " UPDATE Regla_Punto" & _
               "    SET nImpoMaxi = " & lReglaImporteMaximo & "," & _
               "        nPuntImpo = " & lReglaPuntoImporte & "," & _
               "        nPuntCant = " & lReglaPuntoCantidad
        If Not oDBAdmin.EjecutarSentencia(ADOCnn, sSQL) Then GoTo Salir
               
  Else
        sSQL = "SELECT * FROM Regla_Punto"
        If Not oDBAdmin.EjecutarConsulta(ADOCnn, sSQL, ADORS) Then GoTo Salir
          
        If ADORS.EOF Then
          MsgBox "Reglas en relación a los puntos no han sido establecidos", vbOKOnly + vbInformation
          GoTo Salir
        End If
        lReglaImporteMaximo = LeerCampo(ADORS!nImpoMaxi)
        lReglaPuntoImporte = CLng(LeerCampo(ADORS!nPuntImpo))
        lReglaPuntoCantidad = CLng(LeerCampo(ADORS!nPuntCant))
  End If
    
  GoTo Salir
  
LineaError:
  MsgBox Err.Description, vbOKOnly + vbInformation

Salir:
  Set ADORS = Nothing
  Screen.MousePointer = vbDefault
End Sub

Private Sub Form_Load()
Inicio
End Sub

Private Sub ConfiguraColumnas()
  Dim i As Integer
  Dim clmX As ColumnHeader
  Dim aColumnTitle(7) As String
  Dim aColumnWidth(7) As Single
  Dim aColumnAlign(7) As Integer
     
  
  aColumnTitle(0) = "codatencion"
  aColumnTitle(1) = "server"
  aColumnTitle(2) = "estacion"
  aColumnTitle(3) = "fapertura"
  aColumnTitle(4) = "fultped"
  aColumnTitle(5) = "cuenta"
      
  aColumnWidth(0) = 0.25
  aColumnWidth(1) = 0.2
  aColumnWidth(2) = 0.2
  aColumnWidth(3) = 0.18
  aColumnWidth(4) = 0.18
  aColumnWidth(5) = 0
  aColumnWidth(6) = 0
  
  aColumnAlign(0) = lvwColumnLeft
  aColumnAlign(1) = lvwColumnLeft
  aColumnAlign(2) = lvwColumnLeft
  aColumnAlign(3) = lvwColumnLeft
  aColumnAlign(4) = lvwColumnLeft
  aColumnAlign(5) = lvwColumnLeft
  
  For i = 0 To (UBound(aColumnTitle) - 1)
    Set clmX = lvw_mesa_cta.ColumnHeaders.Add(, , aColumnTitle(i), _
                                            lvw_mesa_cta.Width * aColumnWidth(i), _
                                            aColumnAlign(i))
  Next
  
  aColumnTitle(0) = "producto"
  aColumnTitle(1) = "cant"
  aColumnTitle(2) = "punit"
  aColumnTitle(3) = "subtot"
  aColumnTitle(4) = "pedido"
  aColumnTitle(5) = "itm"
  aColumnTitle(6) = "ccodprode"
      
  aColumnWidth(0) = 0.1
  aColumnWidth(1) = 0.1
  aColumnWidth(2) = 0.1
  aColumnWidth(3) = 0.1
  aColumnWidth(4) = 0.1
  aColumnWidth(5) = 0.1
  aColumnWidth(6) = 0
  
  aColumnAlign(0) = lvwColumnLeft
  aColumnAlign(1) = lvwColumnLeft
  aColumnAlign(2) = lvwColumnLeft
  aColumnAlign(3) = lvwColumnLeft
  aColumnAlign(4) = lvwColumnLeft
  aColumnAlign(5) = lvwColumnLeft
  
  For i = 0 To (UBound(aColumnTitle) - 1)
    Set clmX = LvwCuenta.ColumnHeaders.Add(, , aColumnTitle(i), _
                                           LvwCuenta.Width * aColumnWidth(i), _
                                            aColumnAlign(i))
  Next
  
End Sub
Public Sub LlenaListas()
Dim sSQL As String
Dim ADORS As ADODB.Recordset
Dim xitm As ListItem
Dim iContRegistro  As Integer

lvw_mesa_cta.ListItems.Clear
LvwCuenta.ListItems.Clear

sSQL = "SELECT * from CTAPedido " & _
      " WHERE nFlagcerrado= 0 " & _
      " and cCodestado='01' and nAmbiente=" & K_Ambiente
      
      
If Not oDBAdmin.EjecutarConsulta(ADOCnnSQL, sSQL, ADORS) Then GoTo Salir

 If ADORS.RecordCount > 0 Then
  
    ADORS.PageSize = 10
    ADORS.AbsolutePage = iNroPagina
    iTotalPagina = ADORS.PageCount
    iTotalRegistro = ADORS.RecordCount
    iContRegistro = ADORS.PageSize
          
    Do While Not ADORS.EOF And iContRegistro > 0
        Set xitm = lvw_mesa_cta.ListItems.Add(, , LeerCampo(ADORS!cCodAtencion))
        xitm.SubItems(1) = LeerCampo(ADORS!cCoduser)
        xitm.SubItems(2) = LeerCampo(ADORS!cCodEstacion)
        xitm.SubItems(3) = FormatDateTime(LeerCampo(ADORS!dtFecApertura), vbShortTime)
        xitm.SubItems(4) = FormatDateTime(LeerCampo(ADORS!dtfecUltmped), vbShortTime)
        xitm.SubItems(5) = LeerCampo(ADORS!cCodcuenta)
        ADORS.MoveNext
        iContRegistro = iContRegistro - 1
    Loop
     Muestra_cuenta lvw_mesa_cta.SelectedItem.SubItems(5)
 End If


Salir:
Set ADORS = Nothing
End Sub
Public Sub Muestra_cuenta(ByVal cuenta As String)
Dim ADORS As ADODB.Recordset
Dim sSQL  As String

sSQL = "SELECT * FROM PedidoDet "
End Sub
