VERSION 5.00
Begin VB.Form frmLibre 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Precio Libre"
   ClientHeight    =   6870
   ClientLeft      =   8115
   ClientTop       =   3735
   ClientWidth     =   5910
   Icon            =   "frmLibre.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6870
   ScaleWidth      =   5910
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton neg 
      Caption         =   "-"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Left            =   4320
      TabIndex        =   16
      Top             =   120
      Width           =   1215
   End
   Begin VB.CommandButton Aceptar 
      Default         =   -1  'True
      Height          =   2415
      Left            =   4080
      Picture         =   "frmLibre.frx":0E42
      Style           =   1  'Graphical
      TabIndex        =   15
      Top             =   1680
      Width           =   1695
   End
   Begin VB.CommandButton btnCancelar 
      Cancel          =   -1  'True
      Height          =   1215
      Left            =   4320
      Picture         =   "frmLibre.frx":189B
      Style           =   1  'Graphical
      TabIndex        =   14
      Top             =   5280
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "7"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   7
      Left            =   240
      TabIndex        =   10
      Top             =   1680
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "8"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   8
      Left            =   1440
      TabIndex        =   9
      Top             =   1680
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "9"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   9
      Left            =   2640
      TabIndex        =   8
      Top             =   1680
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "4"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   4
      Left            =   240
      TabIndex        =   7
      Top             =   2880
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "5"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   5
      Left            =   1440
      TabIndex        =   6
      Top             =   2880
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "6"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   6
      Left            =   2640
      TabIndex        =   5
      Top             =   2880
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "1"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   1
      Left            =   240
      TabIndex        =   4
      Top             =   4080
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "2"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   2
      Left            =   1440
      TabIndex        =   3
      Top             =   4080
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "3"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   3
      Left            =   2640
      TabIndex        =   2
      Top             =   4080
      Width           =   1215
   End
   Begin VB.CommandButton comma 
      Caption         =   "00"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Left            =   2640
      TabIndex        =   0
      Top             =   5280
      Width           =   1215
   End
   Begin VB.CommandButton bNumero 
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   36
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Index           =   0
      Left            =   1440
      TabIndex        =   1
      Top             =   5280
      Width           =   1215
   End
   Begin VB.Frame Frame4 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   5295
      Left            =   120
      TabIndex        =   11
      Top             =   1440
      Width           =   3855
      Begin VB.CommandButton DEL 
         Caption         =   "<<"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   36
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1215
         Left            =   120
         TabIndex        =   12
         TabStop         =   0   'False
         Top             =   3840
         Width           =   1215
      End
   End
   Begin VB.Label LPrecio 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   48
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   1215
      Left            =   120
      TabIndex        =   13
      Top             =   120
      Width           =   3855
   End
End
Attribute VB_Name = "frmLibre"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public dinero As Double

Private Sub Aceptar_Click()
    Dim fecha As Date
fecha = Now
fecha = DateAdd("h", -4, fecha)
fecha = Format(fecha, "short date")
        
        Panel.LTotal = CDbl(Panel.LTotal) + CDbl(LPrecio) 'sumar precio

      Panel.MSFlexGrid1.AddItem ("1" & vbTab & _
      funciones.ticket & vbTab & _
      "999" & vbTab & _
      "PRECIO LIBRE" & vbTab & _
      CDbl(LPrecio) & vbTab & _
      CDbl(LPrecio) & vbTab & _
      Date) 'agregar producto a lista
      
     ' visor "Precio Libre", Panel.LTotal, LPrecio.Caption
      
        Dim X As Long 'actualizar formato precio
        With Panel.MSFlexGrid1
            For X = .FixedRows To .Rows - 1
                .TextMatrix(X, 5) = Format(.TextMatrix(X, 5), "###0.00")
            Next X
        End With
     
        Panel.MSFlexGrid1.Row = Panel.MSFlexGrid1.Rows - 1 'actualizar lista
        Panel.MSFlexGrid1.TopRow = Panel.MSFlexGrid1.Rows - 1
        
        Unload Me
End Sub

Private Sub bNumero_Click(Index As Integer)
    dinero = (dinero * 10) + ((bNumero(Index).Caption) / 100)
    LPrecio = dinero
End Sub

Private Sub btnCancelar_Click()
    Unload Me
End Sub

Private Sub comma_Click()
    dinero = (dinero * 100)
    LPrecio = dinero
End Sub

Private Sub DEL_Click()
    dinero = (Int(dinero * 10)) / 100
    LPrecio = dinero
End Sub

Private Sub Form_Load()
dinero = 0
End Sub

Private Sub LPrecio_Change()
LPrecio = Format(LPrecio, "###0.00")
End Sub

Private Sub Neg_Click()

    dinero = LPrecio - LPrecio * 2
    LPrecio = dinero
    
End Sub
