VERSION 5.00
Object = "{69F9D01E-F1DE-11D4-9536-002018603DA2}#7.0#0"; "ControlNumber.ocx"
Begin VB.Form FModifresventas 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Ingreso de vales / Diferencia"
   ClientHeight    =   2610
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7110
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2610
   ScaleWidth      =   7110
   Begin VB.Frame FraVales 
      Height          =   2460
      Left            =   105
      TabIndex        =   0
      Top             =   60
      Width           =   6915
      Begin VB.CommandButton cmdcancelar 
         Cancel          =   -1  'True
         Caption         =   "Cancelar"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   720
         Left            =   4890
         Picture         =   "FModificaResVentas.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   1665
         Width           =   1935
      End
      Begin VB.CommandButton cmdaceptar 
         Caption         =   "Aceptar"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   780
         Left            =   4860
         Picture         =   "FModificaResVentas.frx":030A
         Style           =   1  'Graphical
         TabIndex        =   3
         Tag             =   "R ASDASD"
         Top             =   750
         Width           =   1905
      End
      Begin MiControl.CtrlNumber Ctndiferencias 
         Height          =   360
         Left            =   1410
         TabIndex        =   2
         Top             =   1365
         Width           =   1650
         _ExtentX        =   2910
         _ExtentY        =   635
         BackColor       =   -2147483643
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin MiControl.CtrlNumber CtnVales 
         Height          =   360
         Left            =   1425
         TabIndex        =   1
         Top             =   870
         Width           =   1635
         _ExtentX        =   2884
         _ExtentY        =   635
         BackColor       =   -2147483643
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.Label lblimportetotal 
         Height          =   255
         Left            =   1440
         TabIndex        =   13
         Top             =   2040
         Visible         =   0   'False
         Width           =   1575
      End
      Begin VB.Label lblnumerodocu 
         Height          =   375
         Left            =   300
         TabIndex        =   12
         Top             =   1860
         Visible         =   0   'False
         Width           =   1245
      End
      Begin VB.Label lbltipodocumento 
         Height          =   330
         Left            =   1755
         TabIndex        =   11
         Top             =   1920
         Visible         =   0   'False
         Width           =   1815
      End
      Begin VB.Label Lblcorrelativo 
         Height          =   255
         Left            =   210
         TabIndex        =   10
         Top             =   1830
         Visible         =   0   'False
         Width           =   1635
      End
      Begin VB.Label lblcodcategoria 
         Height          =   300
         Left            =   210
         TabIndex        =   9
         Top             =   2055
         Visible         =   0   'False
         Width           =   465
      End
      Begin VB.Label lbldescategoria 
         BorderStyle     =   1  'Fixed Single
         Height          =   300
         Left            =   1440
         TabIndex        =   8
         Top             =   330
         Width           =   5355
      End
      Begin VB.Label lbletiquetacodigo 
         Caption         =   "Concepto"
         Height          =   300
         Left            =   210
         TabIndex        =   7
         Top             =   330
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "Diferencias"
         Height          =   390
         Left            =   210
         TabIndex        =   6
         Top             =   1395
         Width           =   1305
      End
      Begin VB.Label Label1 
         Caption         =   "Vales"
         Height          =   330
         Left            =   255
         TabIndex        =   5
         Top             =   855
         Width           =   1380
      End
   End
End
Attribute VB_Name = "FModifresventas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private MobjVentasGeneral As DB_OP_FACTURACION.C_VENTASGENERAL

Private Sub cmdAceptar_Click()
  ' Hay que Grabar en TMP_RESUMEN_VENTAS
  ' Actualizar_ResumendeVentas
   Screen.MousePointer = 11
   
   MobjVentasGeneral.Actualizar_ResumendeVentas Lblcorrelativo.Caption, lblcodcategoria.Caption, CtnVales.Text, Ctndiferencias.Text, _
                                                lbltipodocumento.Caption, lblnumerodocu.Caption
                                                
   Fresumenventas.ActulizaGrilla
   Screen.MousePointer = 0
   
   Unload Me
End Sub

Private Sub cmdcancelar_Click()
   Unload Me
End Sub

Private Sub Ctndiferencias_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     cmdaceptar.SetFocus
  End If
End Sub

Private Sub CtnVales_change()
   If Trim(lblimportetotal.Caption) <> Empty Then
     If CtnVales.Text = "" Then
        Ctndiferencias.Text = GFormatodeNumero(0, GintDecResultado)
     Else
        Ctndiferencias.Text = GFormatodeNumero(CDbl(lblimportetotal.Caption) - CtnVales.Text, GintDecResultado)
     End If
   End If
End Sub

Private Sub CtnVales_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
      cmdaceptar.SetFocus
  End If
End Sub

Private Sub Form_Load()
   
   Me.Top = (Screen.Height - MDIFVENTAS.Toolbar1.Height - Me.Height) / 2
   Me.Left = (Screen.Width - Me.Width) / 2

   CtnVales.Enteros = 7
   CtnVales.Decimales = 2
   CtnVales.ValorPorDefecto
         
   Ctndiferencias.Enteros = 7
   Ctndiferencias.Decimales = 2
   Ctndiferencias.ValorPorDefecto
   Ctndiferencias.Enabled = False
   Set MobjVentasGeneral = New DB_OP_FACTURACION.C_VENTASGENERAL
   
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Set MobjVentasGeneral = Nothing
End Sub
