VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "crystl32.ocx"
Begin VB.Form Fresumenventas 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Resumen de Ventas / Vales del Día (05.110.00)"
   ClientHeight    =   6900
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   12555
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   9.75
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   6900
   ScaleWidth      =   12555
   Begin TabDlg.SSTab SSTab1 
      Height          =   6810
      Left            =   45
      TabIndex        =   0
      Top             =   45
      Width           =   12480
      _ExtentX        =   22013
      _ExtentY        =   12012
      _Version        =   393216
      Tabs            =   2
      TabHeight       =   520
      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
      TabCaption(0)   =   "Datos Generales"
      TabPicture(0)   =   "0511000.frx":0000
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Label4"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "Label3"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "Label2"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "Shape1"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "lblimportetotal"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "lblcredadel"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).Control(6)=   "lbltotal"
      Tab(0).Control(6).Enabled=   0   'False
      Tab(0).Control(7)=   "Line1"
      Tab(0).Control(7).Enabled=   0   'False
      Tab(0).Control(8)=   "DbResumenVentas"
      Tab(0).Control(8).Enabled=   0   'False
      Tab(0).Control(9)=   "CMD_ACEPTAR"
      Tab(0).Control(9).Enabled=   0   'False
      Tab(0).Control(10)=   "CmdGrabar"
      Tab(0).Control(10).Enabled=   0   'False
      Tab(0).Control(11)=   "cmdsalir"
      Tab(0).Control(11).Enabled=   0   'False
      Tab(0).Control(12)=   "FraDatosProce"
      Tab(0).Control(12).Enabled=   0   'False
      Tab(0).Control(13)=   "CrResumenVentas"
      Tab(0).Control(13).Enabled=   0   'False
      Tab(0).Control(14)=   "cmdcomentario"
      Tab(0).Control(14).Enabled=   0   'False
      Tab(0).Control(15)=   "cmdimpresion"
      Tab(0).Control(15).Enabled=   0   'False
      Tab(0).Control(16)=   "CRPh"
      Tab(0).Control(16).Enabled=   0   'False
      Tab(0).ControlCount=   17
      TabCaption(1)   =   "Consultar"
      TabPicture(1)   =   "0511000.frx":001C
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "cmdimpdet"
      Tab(1).Control(1)=   "cmdconsultar"
      Tab(1).Control(2)=   "Frame1"
      Tab(1).Control(3)=   "cmdimprimir"
      Tab(1).Control(4)=   "FradatosGen"
      Tab(1).Control(5)=   "DbConsultaParteD"
      Tab(1).Control(6)=   "lblestado"
      Tab(1).Control(7)=   "Label8"
      Tab(1).Control(8)=   "Line2"
      Tab(1).Control(9)=   "Label11"
      Tab(1).Control(10)=   "Label10"
      Tab(1).Control(11)=   "Label9"
      Tab(1).Control(12)=   "Shape2"
      Tab(1).Control(13)=   "lbltotalcons"
      Tab(1).Control(14)=   "lblventacredcons"
      Tab(1).Control(15)=   "lbltotalfinalcons"
      Tab(1).ControlCount=   16
      Begin VB.CommandButton cmdimpdet 
         Caption         =   "Imprimir Detalle"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   735
         Left            =   -63720
         Picture         =   "0511000.frx":0038
         TabIndex        =   38
         Top             =   600
         Width           =   1050
      End
      Begin VB.CommandButton cmdconsultar 
         Caption         =   "Consultar"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   735
         Left            =   -65880
         Picture         =   "0511000.frx":0342
         Style           =   1  'Graphical
         TabIndex        =   37
         Top             =   600
         Width           =   1050
      End
      Begin Crystal.CrystalReport CRPh 
         Left            =   5520
         Top             =   5160
         _ExtentX        =   741
         _ExtentY        =   741
         _Version        =   348160
         PrintFileLinesPerPage=   60
      End
      Begin VB.CommandButton cmdimpresion 
         Caption         =   "Imprimir Detalle"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   855
         Left            =   5640
         Picture         =   "0511000.frx":064C
         Style           =   1  'Graphical
         TabIndex        =   36
         Tag             =   "R ASDASD"
         Top             =   5760
         Width           =   1300
      End
      Begin VB.CommandButton cmdcomentario 
         Caption         =   "Comentario"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   855
         Left            =   6960
         Picture         =   "0511000.frx":0956
         Style           =   1  'Graphical
         TabIndex        =   33
         Tag             =   "R ASDASD"
         Top             =   5760
         Width           =   1300
      End
      Begin VB.Frame Frame1 
         Caption         =   "Comentario"
         Height          =   1665
         Left            =   -74805
         TabIndex        =   31
         Top             =   4920
         Width           =   5895
         Begin VB.TextBox txtcomentario 
            Height          =   1275
            Left            =   105
            Locked          =   -1  'True
            MultiLine       =   -1  'True
            ScrollBars      =   2  'Vertical
            TabIndex        =   32
            Top             =   270
            Width           =   5670
         End
      End
      Begin Crystal.CrystalReport CrResumenVentas 
         Left            =   5535
         Top             =   4680
         _ExtentX        =   741
         _ExtentY        =   741
         _Version        =   348160
         PrintFileLinesPerPage=   60
      End
      Begin VB.Frame FraDatosProce 
         Caption         =   "Datos a Procesar"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1950
         Left            =   180
         TabIndex        =   25
         Top             =   4560
         Width           =   5235
         Begin VB.CommandButton cmdbuscaralmaceproce 
            Enabled         =   0   'False
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   4335
            Picture         =   "0511000.frx":0C60
            Style           =   1  'Graphical
            TabIndex        =   26
            Top             =   300
            Width           =   375
         End
         Begin MSDataListLib.DataCombo dtcalmacenproces 
            Height          =   315
            Left            =   1695
            TabIndex        =   27
            Top             =   330
            Width           =   2565
            _ExtentX        =   4524
            _ExtentY        =   556
            _Version        =   393216
            Style           =   2
            Text            =   ""
            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 lblfechaproceso 
            Alignment       =   1  'Right Justify
            BorderStyle     =   1  'Fixed Single
            Height          =   300
            Left            =   1710
            TabIndex        =   30
            Top             =   765
            Width           =   2355
         End
         Begin VB.Label Label7 
            Caption         =   "Fecha de Proceso"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   285
            Left            =   195
            TabIndex        =   29
            Top             =   780
            Width           =   1515
         End
         Begin VB.Label Label6 
            Caption         =   "Almacén"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   270
            Left            =   180
            TabIndex        =   28
            Top             =   360
            Width           =   1890
         End
      End
      Begin VB.CommandButton cmdimprimir 
         Caption         =   "Imprimir Resumen"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   735
         Left            =   -64800
         Picture         =   "0511000.frx":1192
         TabIndex        =   24
         Top             =   600
         Width           =   1050
      End
      Begin VB.Frame FradatosGen 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   810
         Left            =   -74880
         TabIndex        =   11
         Top             =   495
         Width           =   7095
         Begin VB.CommandButton cmdBuscar 
            Enabled         =   0   'False
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   3480
            Picture         =   "0511000.frx":149C
            Style           =   1  'Graphical
            TabIndex        =   16
            Top             =   240
            Width           =   375
         End
         Begin MSDataListLib.DataCombo DtcAlmacen 
            Height          =   315
            Left            =   810
            TabIndex        =   13
            Top             =   270
            Width           =   2565
            _ExtentX        =   4524
            _ExtentY        =   556
            _Version        =   393216
            Style           =   2
            Text            =   ""
            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 MSComCtl2.DTPicker DTPFechaProceso 
            Height          =   315
            Left            =   5460
            TabIndex        =   15
            Top             =   270
            Width           =   1440
            _ExtentX        =   2540
            _ExtentY        =   556
            _Version        =   393216
            Format          =   51052545
            CurrentDate     =   37673
         End
         Begin VB.Label Label5 
            Caption         =   "Fecha de Proceso"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   4020
            TabIndex        =   14
            Top             =   315
            Width           =   1395
         End
         Begin VB.Label Label1 
            Caption         =   "Almacén"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   270
            Left            =   45
            TabIndex        =   12
            Top             =   315
            Width           =   1890
         End
      End
      Begin VB.CommandButton cmdsalir 
         Cancel          =   -1  'True
         Caption         =   "&Salir"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   855
         Left            =   10920
         Picture         =   "0511000.frx":19CE
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   5760
         Width           =   1300
      End
      Begin VB.CommandButton CmdGrabar 
         Caption         =   "Grabar "
         Default         =   -1  'True
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   855
         Left            =   9600
         Picture         =   "0511000.frx":1CD8
         Style           =   1  'Graphical
         TabIndex        =   3
         Tag             =   "R ASDASD"
         Top             =   5760
         Width           =   1300
      End
      Begin VB.CommandButton CMD_ACEPTAR 
         Caption         =   "Generar "
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   855
         Left            =   8280
         Picture         =   "0511000.frx":220A
         Style           =   1  'Graphical
         TabIndex        =   2
         Tag             =   "R ASDASD"
         Top             =   5760
         Width           =   1300
      End
      Begin MSDataGridLib.DataGrid DbResumenVentas 
         Height          =   3390
         Left            =   105
         TabIndex        =   1
         ToolTipText     =   "Presiones Enter en la Fila que desea Modificar"
         Top             =   855
         Width           =   12165
         _ExtentX        =   21458
         _ExtentY        =   5980
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   19
         BeginProperty HeadFont {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
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   3082
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   3082
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin MSDataGridLib.DataGrid DbConsultaParteD 
         Height          =   3360
         Left            =   -74880
         TabIndex        =   17
         ToolTipText     =   "Presiones Enter en la Fila que desea Modificar"
         Top             =   1455
         Width           =   12165
         _ExtentX        =   21458
         _ExtentY        =   5927
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   19
         BeginProperty HeadFont {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
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   3082
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   3082
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin VB.Label lblestado 
         BorderStyle     =   1  'Fixed Single
         Height          =   345
         Left            =   -67665
         TabIndex        =   35
         Top             =   870
         Width           =   1680
      End
      Begin VB.Label Label8 
         Caption         =   "Estado"
         Height          =   285
         Left            =   -67635
         TabIndex        =   34
         Top             =   585
         Width           =   1515
      End
      Begin VB.Line Line2 
         X1              =   -68775
         X2              =   -62760
         Y1              =   5340
         Y2              =   5355
      End
      Begin VB.Label Label11 
         Alignment       =   1  'Right Justify
         Caption         =   "Total"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   -64425
         TabIndex        =   23
         Top             =   5175
         Width           =   1440
      End
      Begin VB.Label Label10 
         Alignment       =   1  'Right Justify
         Caption         =   "Venta Crédito/Adelanto"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   -66825
         TabIndex        =   22
         Top             =   5160
         Width           =   2055
      End
      Begin VB.Label Label9 
         Alignment       =   1  'Right Justify
         Caption         =   "Importe Total"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   -68760
         TabIndex        =   21
         Top             =   5160
         Width           =   1635
      End
      Begin VB.Shape Shape2 
         Height          =   915
         Left            =   -68775
         Top             =   5025
         Width           =   6015
      End
      Begin VB.Label lbltotalcons 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   1  'Fixed Single
         Caption         =   "0.00"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   -68670
         TabIndex        =   20
         Top             =   5490
         Width           =   1575
      End
      Begin VB.Label lblventacredcons 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   1  'Fixed Single
         Caption         =   "0.00"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   -66405
         TabIndex        =   19
         Top             =   5490
         Width           =   1575
      End
      Begin VB.Label lbltotalfinalcons 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   1  'Fixed Single
         Caption         =   "0.00"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   -64455
         TabIndex        =   18
         Top             =   5490
         Width           =   1575
      End
      Begin VB.Line Line1 
         X1              =   6300
         X2              =   12270
         Y1              =   4890
         Y2              =   4890
      End
      Begin VB.Label lbltotal 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   1  'Fixed Single
         Caption         =   "0.00"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   10575
         TabIndex        =   10
         Top             =   5010
         Width           =   1575
      End
      Begin VB.Label lblcredadel 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   1  'Fixed Single
         Caption         =   "0.00"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   8625
         TabIndex        =   9
         Top             =   5010
         Width           =   1575
      End
      Begin VB.Label lblimportetotal 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00E0E0E0&
         BorderStyle     =   1  'Fixed Single
         Caption         =   "0.00"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6360
         TabIndex        =   8
         Top             =   4980
         Width           =   1575
      End
      Begin VB.Shape Shape1 
         Height          =   915
         Left            =   6255
         Top             =   4545
         Width           =   6015
      End
      Begin VB.Label Label2 
         Alignment       =   1  'Right Justify
         Caption         =   "Importe Total"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6270
         TabIndex        =   7
         Top             =   4680
         Width           =   1635
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         Caption         =   "Venta Crédito/Adelanto"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   8205
         TabIndex        =   6
         Top             =   4680
         Width           =   2055
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         Caption         =   "Total"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   10605
         TabIndex        =   5
         Top             =   4695
         Width           =   1440
      End
   End
End
Attribute VB_Name = "Fresumenventas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'******************************************************************************************
' Variables para el control de Seguridad
'******************************************************************************************
  
Public pb_editar As Boolean
Public pb_agregar As Boolean
Public pb_primerregistro As Boolean
Public pb_ultimoregistro As Boolean
Public pbderecho_agregar As Boolean
Public pbderecho_consultar As Boolean
Public pbderecho_editar As Boolean
Public pbderecho_borrar As Boolean
Public pbderecho_imprimir As Boolean
Public pbderecho_anular As Boolean
Public pbderecho_emitir As Boolean
Public pb_tiposcreen As String

'******************************************************************************************

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

Public GStrComentario As String
Private MobjAlmacen As DB_INV_MANTENIMIENTOS.C_ALMACEN
Private MobjVentasGeneral As DB_OP_FACTURACION.C_VENTASGENERAL
Private MDblCorrelativo As Double
Private MobjCorrelativo As DB_CORRELATIVO.C_Correlativos
Public Sub ActulizaGrilla()

   Set DbResumenVentas.DataSource = MobjVentasGeneral.MostrarResumenVentas(MDblCorrelativo)
   DbResumenVentas.Refresh
   FormatearGrilla
   
End Sub

Private Sub CMD_ACEPTAR_Click()
  
   Dim lrsresumenventas As ADODB.Recordset
   Dim LrsResumenVentasTotales As ADODB.Recordset
   Dim LDblImporteTotal As Double
   Dim LDblVtaCredAdel As Double
   Dim LDblTotal As Double
   
   If MobjVentasGeneral.MostrarStatusParteDiario(GstrSiteProce) = True Then
      MsgBox "Parte Diario ya fue cerrado", vbDefaultButton1 + vbExclamation, "Advertencia"
      Screen.MousePointer = 0
      Exit Sub
   End If
   
   ' Se Obtiene el Correlativo
   Screen.MousePointer = 11
   
   ' Hay que Elimnar los Valores de los Temporales TMP_RESUMEN_VENTAS/TMP_RESUMEN_VENTASDET
    
   MobjVentasGeneral.Eliminar_TMPResumendeVentas MDblCorrelativo
    
   ' **************************************************************************************
   
   MDblCorrelativo = MobjCorrelativo.ObtenerCorrelativo(GCUSERID)
   MobjVentasGeneral.Cargar_ResumendeVentas dtcalmacenproces.BoundText, MDblCorrelativo
   
   Set lrsresumenventas = MobjVentasGeneral.MostrarResumenVentas(MDblCorrelativo)
   Set LrsResumenVentasTotales = lrsresumenventas.Clone
   
   
   If Not LrsResumenVentasTotales.EOF Then
      LrsResumenVentasTotales.MoveFirst
      
      LDblImporteTotal = 0
      LDblVtaCredAdel = 0
      LDblTotal = 0
      
      Do While Not LrsResumenVentasTotales.EOF
         LDblImporteTotal = LDblImporteTotal + LrsResumenVentasTotales!IMPORTEBASE
         LDblVtaCredAdel = LDblVtaCredAdel + LrsResumenVentasTotales!VTACREDBASE
         LrsResumenVentasTotales.MoveNext
      Loop
      
      LDblTotal = LDblImporteTotal - LDblVtaCredAdel
      lblimportetotal.Caption = GFormatodeNumero(LDblImporteTotal, GintDecResultado)
      lblcredadel.Caption = GFormatodeNumero(LDblVtaCredAdel, GintDecResultado)
      lbltotal.Caption = GFormatodeNumero(LDblTotal, GintDecResultado)
   Else
      lblimportetotal.Caption = GFormatodeNumero(0, GintDecResultado)
      lblcredadel.Caption = GFormatodeNumero(0, GintDecResultado)
      lbltotal.Caption = GFormatodeNumero(0, GintDecResultado)
          
   End If
   
   Set DbResumenVentas.DataSource = lrsresumenventas
   DbResumenVentas.Refresh
   FormatearGrilla
   CmdGrabar.Enabled = True
   cmdcomentario.Enabled = True
   CMD_ACEPTAR.Enabled = False
   Screen.MousePointer = 0
   Me.Height = 7350
    
End Sub

Private Sub CMD_CANCELAR_Click()

End Sub

Private Sub cmdBuscar_Click()
    Dim ArrayBusqueda(1 To 2, 1 To 3) As Variant
    ArrayBusqueda(1, 1) = "Siteid"
    ArrayBusqueda(1, 2) = "Código "
    ArrayBusqueda(1, 3) = 1000
    ArrayBusqueda(2, 1) = "Name"
    ArrayBusqueda(2, 2) = "Descripción "
    ArrayBusqueda(2, 3) = 4000
      
    FBusquedasVta.GObtenerRegistros MobjAlmacen.ListarAlmacenesPorStatus(1), ArrayBusqueda, 2, 2
    FBusquedasVta.Show vbModal
    
    If GrecibeUbicacion <> 0 Then
        DtcAlmacen.BoundText = GrecibeColumnaID
    End If
End Sub

Private Sub cmdbuscaralmaceproce_Click()
    Dim ArrayBusqueda(1 To 2, 1 To 3) As Variant
    ArrayBusqueda(1, 1) = "Siteid"
    ArrayBusqueda(1, 2) = "Código "
    ArrayBusqueda(1, 3) = 1000
    ArrayBusqueda(2, 1) = "Name"
    ArrayBusqueda(2, 2) = "Descripción "
    ArrayBusqueda(2, 3) = 4000
      
    FBusquedasVta.GObtenerRegistros MobjAlmacen.ListarAlmacenesPorStatus(1), ArrayBusqueda, 2, 2
    FBusquedasVta.Show vbModal
    
    If GrecibeUbicacion <> 0 Then
        dtcalmacenproces.BoundText = GrecibeColumnaID
    End If
End Sub

Private Sub cmdcomentario_Click()
   'FComentario.GintpantallaComent = 0
   FComentario.Show vbModal
End Sub

Private Sub cmdconsultar_Click()

   Dim LDblTotal As Double
   Dim LDblImporteTotal As Double
   Dim LDblVtaCredAdel As Double
   
   Dim LrsConsultarParteDiarioClone As ADODB.Recordset
   Dim LrsConsultarParteDiario As ADODB.Recordset
   
   Set LrsConsultarParteDiario = MobjVentasGeneral.ConsultarResumenVentas(DTPFechaProceso.Value, DtcAlmacen.BoundText)
   Set LrsConsultarParteDiarioClone = LrsConsultarParteDiario.Clone
   
   Set DbConsultaParteD.DataSource = LrsConsultarParteDiario
   DbConsultaParteD.Refresh
   
    ' Parte que Calcula los Resumenes
    
   If Not LrsConsultarParteDiarioClone.EOF Then
      LrsConsultarParteDiarioClone.MoveFirst
      txtcomentario.Text = LrsConsultarParteDiarioClone!comment
      
      If LrsConsultarParteDiarioClone!Status = 1 Then
        lblestado.Caption = "Aprobado"
      Else
        lblestado.Caption = "No Aprobado"
      End If
      
      lbltotalcons.Caption = 0
      lblventacredcons.Caption = 0
      lbltotalfinalcons.Caption = 0
      
      Do While Not LrsConsultarParteDiarioClone.EOF
         LDblImporteTotal = LDblImporteTotal + LrsConsultarParteDiarioClone!IMPORTE
         LDblVtaCredAdel = LDblVtaCredAdel + LrsConsultarParteDiarioClone!CREDITO
         LrsConsultarParteDiarioClone.MoveNext
      Loop
            
      LDblTotal = LDblImporteTotal - LDblVtaCredAdel
      
      lbltotalcons.Caption = GFormatodeNumero(LDblImporteTotal, GintDecResultado)
      lblventacredcons.Caption = GFormatodeNumero(LDblVtaCredAdel, GintDecResultado)
      lbltotalfinalcons.Caption = GFormatodeNumero(LDblTotal, GintDecResultado)
      
   Else
      txtcomentario.Text = Empty
      lblestado.Caption = Empty
      lbltotalcons.Caption = GFormatodeNumero(0, GintDecResultado)
      lblventacredcons.Caption = GFormatodeNumero(0, GintDecResultado)
      lbltotalfinalcons.Caption = GFormatodeNumero(0, GintDecResultado)
          
   End If
    
   FormatearGrilladeConsulta
    
    
    '**********************************
    
End Sub

Private Sub CmdGrabar_Click()
On Error GoTo errhandler
   Dim lrsresumenventas As ADODB.Recordset
   If MsgBox("Seguro que desea Grabar el Resumen de Ventas ", vbYesNo + vbQuestion, "Advertencia") = vbYes Then
      Screen.MousePointer = 11
     ' MobjVentasGeneral
      MobjVentasGeneral.GenerarParteDiaro MDblCorrelativo, dtcalmacenproces.BoundText, Trim(GStrComentario), GstrCodMonedaBase, _
                                          GstrMonedaExtranjeraModgen, GCUSERID, lbltotal.Caption
      
      Set lrsresumenventas = MobjVentasGeneral.MostrarResumenVentas(MDblCorrelativo)
      Set DbResumenVentas.DataSource = lrsresumenventas
      DbResumenVentas.Refresh
      FormatearGrilla
      Screen.MousePointer = 0
      CmdGrabar.Enabled = False
      cmdcomentario.Enabled = False
      cmdimpresion.Enabled = True
      
      If MsgBox("Resumen de Ventas Generado con éxito, Desea Imprimir ", vbYesNo + vbQuestion, "Resumen de Ventas") = vbYes Then
         CrResumenVentas.Reset
         CrResumenVentas.StoredProcParam(0) = MDblCorrelativo
         CrResumenVentas.ReportFileName = GstrReportesVta + "rpt_ResumenVentas.rpt"
         CrResumenVentas.WindowTitle = "Resumen de Ventas"
         CrResumenVentas.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
         CrResumenVentas.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
         CrResumenVentas.Formulas(3) = "formMoneda=stringvar strmoneda; strmoneda:='" & GstrSimboloMonedaBase & "'"
         CrResumenVentas.Formulas(4) = "formdecresultado=" & GintDecResultado
         CrResumenVentas.Formulas(5) = "formalmacen=stringvar stralmacen; stralmacen:='" & DtcAlmacen.Text & "'"
         CrResumenVentas.Formulas(6) = "formfechaproceso=stringvar strfechaproces; strfechaproces:='" & CStr(DTPFechaProceso.Value) & "'"
         CrResumenVentas.Formulas(7) = "formestado=stringvar strestado; strestado:='No Aprobado'"
         
         Dim LStrComentAux As String
         LStrComentAux = Trim(Replace(Trim(GStrComentario), Chr(13), " "))
         LStrComentAux = Replace(LStrComentAux, Chr(10), " ")
                  
         CrResumenVentas.Formulas(8) = "formcomentario=stringvar strcomentario; strcomentario:='" & LStrComentAux & "'"
         CrResumenVentas.WindowState = crptMaximized
         CrResumenVentas.WindowShowPrintSetupBtn = True
         CrResumenVentas.Action = 1
      End If
   End If
Exit Sub
errhandler:
 MsgBox Err.Description, vbDefaultButton1 + vbExclamation, "Error"
End Sub

Private Sub cmdimpdet_Click()

On Error GoTo ERR1

   Dim cadena As String
   Dim lobjsetup As UTIL_SETUP.C_SETUP
   Set lobjsetup = New UTIL_SETUP.C_SETUP
   
   Dim Lrstemp As ADODB.Recordset
   Set Lrstemp = New ADODB.Recordset
   
   cadena = " Select siteid,DOCSUMMARYTYPEID,NBRDOCSUMMARY " & _
            " from op_docsummary where docdate='" & Format(DTPFechaProceso.Value, "yyyymmdd") & "' and " & _
            " siteid='" & DtcAlmacen.BoundText & "'"
   
   Set Lrstemp = lobjsetup.Auxiliar3(cadena)
   
   Lrstemp.MoveFirst
   
   Do While Not Lrstemp.EOF
      ' Hay que Imprimir
      
       CRPh.ReportFileName = GstrReportesVta + "rpt_listar_PH.rpt"
       CRPh.StoredProcParam(0) = Lrstemp!SITEID
       CRPh.StoredProcParam(1) = Lrstemp!DOCSUMMARYTYPEID
       CRPh.StoredProcParam(2) = Lrstemp!NBRDOCSUMMARY
       
       CRPh.WindowTitle = "Documento Phantom"
       CRPh.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
       CRPh.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
       CRPh.Formulas(3) = "formdecresultado=" & GintDecResultado
       CRPh.Formulas(4) = "formdecprecio=" & GintDecPrecio
       CRPh.Formulas(5) = "formdecStock=" & GintDecStock
              
       CRPh.Destination = crptToPrinter
       CRPh.Action = 1
       
       
      Lrstemp.MoveNext
   Loop

   Set lobjsetup = Nothing
   Set Lrstemp = Nothing

Exit Sub

ERR1:

MsgBox Err.Description, vbDefaultButton1 + vbExclamation, "Mensaje"
  
End Sub

Private Sub cmdimpresion_Click()

On Error GoTo ERR2

   Dim cadena As String
   Dim lobjsetup As UTIL_SETUP.C_SETUP
   Set lobjsetup = New UTIL_SETUP.C_SETUP
   
   Dim Lrstemp As ADODB.Recordset
   Set Lrstemp = New ADODB.Recordset
   
   cadena = " Select siteid,DOCSUMMARYTYPEID,NBRDOCSUMMARY " & _
            " from op_docsummary where docdate='" & Format(lblfechaproceso.Caption, "yyyymmdd") & "' and " & _
            " siteid='" & dtcalmacenproces.BoundText & "'"
   
   Set Lrstemp = lobjsetup.Auxiliar3(cadena)
   
   Lrstemp.MoveFirst
   
   Do While Not Lrstemp.EOF
      ' Hay que Imprimir
      
       CRPh.ReportFileName = GstrReportesVta + "rpt_listar_PH.rpt"
       CRPh.StoredProcParam(0) = Lrstemp!SITEID
       CRPh.StoredProcParam(1) = Lrstemp!DOCSUMMARYTYPEID
       CRPh.StoredProcParam(2) = Lrstemp!NBRDOCSUMMARY
       
       CRPh.WindowTitle = "Documento Phantom"
       CRPh.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
       CRPh.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
       CRPh.Formulas(3) = "formdecresultado=" & GintDecResultado
       CRPh.Formulas(4) = "formdecprecio=" & GintDecPrecio
       CRPh.Formulas(5) = "formdecStock=" & GintDecStock
       
       CRPh.Destination = crptToPrinter
       CRPh.Action = 1
       
       
      Lrstemp.MoveNext
   Loop

   Set lobjsetup = Nothing
   Set Lrstemp = Nothing

Exit Sub

ERR2:

    MsgBox Err.Description, vbDefaultButton1 + vbExclamation, "Mensaje"

End Sub

Private Sub cmdImprimir_Click()
  
  If MsgBox("Seguro que desea Reimprimir el Resumen de Ventas del " & CStr(DTPFechaProceso), vbYesNo + vbQuestion) = vbYes Then
     CrResumenVentas.ReportFileName = GstrReportesVta + "rpt_ResumenVentasReimprime.rpt"
     CrResumenVentas.StoredProcParam(0) = DtcAlmacen.BoundText
     CrResumenVentas.StoredProcParam(1) = Format(DTPFechaProceso.Value, "yyyymmdd")
     CrResumenVentas.WindowTitle = "Resumen de Ventas"
     CrResumenVentas.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
     CrResumenVentas.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
     CrResumenVentas.Formulas(3) = "formMoneda=stringvar strmoneda; strmoneda:='" & GstrSimboloMonedaBase & "'"
     CrResumenVentas.Formulas(4) = "formdecresultado=" & GintDecResultado
     CrResumenVentas.Formulas(5) = "formalmacen=stringvar stralmacen; stralmacen:='" & DtcAlmacen.Text & "'"
     CrResumenVentas.Formulas(6) = "formfechaproceso=stringvar strfechaproces; strfechaproces:='" & CStr(DTPFechaProceso.Value) & "'"
     CrResumenVentas.Formulas(7) = "formestado=stringvar strestado; strestado:='" & lblestado.Caption & "'"
     
     Dim LStrComentAux As String
     LStrComentAux = Trim(Replace(Trim(txtcomentario.Text), Chr(13), " "))
     LStrComentAux = Replace(LStrComentAux, Chr(10), " ")
                  
     CrResumenVentas.Formulas(8) = "formcomentario=stringvar strcomentario; strcomentario:='" & LStrComentAux & "'"
         
     CrResumenVentas.WindowState = crptMaximized
     CrResumenVentas.WindowShowPrintSetupBtn = True
     CrResumenVentas.Action = 1
  End If
  
End Sub

Private Sub cmdSalir_Click()
  Unload Me
End Sub

Private Sub DbConsultaParteD_KeyDown(KeyCode As Integer, Shift As Integer)
 
On Error GoTo ERR4

 If KeyCode = vbKeyF5 Then
    ' Comienza la Impresión de Registros
      
     If Trim(DbConsultaParteD.Columns(8).Text) = "05" Then
       CRPh.ReportFileName = GstrReportesVta + "rpt_listar_PH.rpt"
       CRPh.StoredProcParam(0) = DtcAlmacen.BoundText
       CRPh.StoredProcParam(1) = "05"
       CRPh.StoredProcParam(2) = DbConsultaParteD.Columns(10).Value
       
       CRPh.WindowTitle = "Documento Phantom"
       CRPh.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
       CRPh.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
       CRPh.Formulas(3) = "formdecresultado=" & GintDecResultado
       CRPh.Formulas(4) = "formdecprecio=" & GintDecPrecio
       CRPh.Formulas(5) = "formdecStock=" & GintDecStock
              
       CRPh.Destination = crptToWindow
       CRPh.WindowShowPrintBtn = True
       CRPh.WindowShowPrintSetupBtn = True
       CRPh.WindowState = crptMaximized
       CRPh.Action = 1
     End If
     
     If Trim(DbConsultaParteD.Columns(12).Text) = "01" Then
       CRPh.ReportFileName = GstrReportesVta + "rpt_listar_PH.rpt"
       CRPh.StoredProcParam(0) = DtcAlmacen.BoundText
       CRPh.StoredProcParam(1) = "01"
       CRPh.StoredProcParam(2) = DbConsultaParteD.Columns(14).Value
       
       CRPh.WindowTitle = "Documento Phantom"
       CRPh.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
       CRPh.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
       CRPh.Formulas(3) = "formdecresultado=" & GintDecResultado
       CRPh.Formulas(4) = "formdecprecio=" & GintDecPrecio
       CRPh.Formulas(5) = "formdecStock=" & GintDecStock
       
       CRPh.Destination = crptToWindow
       CRPh.WindowShowPrintBtn = True
       CRPh.WindowShowPrintSetupBtn = True
       CRPh.WindowState = crptMaximized
       CRPh.Action = 1
     End If
 End If
 
Exit Sub
ERR4:


End Sub

Private Sub DbResumenVentas_DblClick()
  'MsgBox DbResumenVentas.Col
End Sub

Private Sub DbResumenVentas_KeyDown(KeyCode As Integer, Shift As Integer)
   
On Error GoTo ERR3

   If KeyCode = 13 Then
      If Not IsNull(DbResumenVentas.Bookmark) Then
         Dim Bkmark As Variant
         Bkmark = DbResumenVentas.Bookmark
         FModifresventas.lblcodcategoria = Trim(DbResumenVentas.Columns(0))
         FModifresventas.lbldescategoria = Trim(DbResumenVentas.Columns(1))
         FModifresventas.CtnVales.Text = Trim(DbResumenVentas.Columns(16))
         FModifresventas.Ctndiferencias.Text = Trim(DbResumenVentas.Columns(17))
         FModifresventas.lbltipodocumento = DbResumenVentas.Columns(20)
         FModifresventas.lblnumerodocu = DbResumenVentas.Columns(21)
         FModifresventas.Lblcorrelativo.Caption = MDblCorrelativo
         FModifresventas.lblimportetotal.Caption = DbResumenVentas.Columns(10).Value
         FModifresventas.Show vbModal
         DbResumenVentas.Bookmark = Bkmark
      End If
   End If
   
   If KeyCode = vbKeyF5 Then
         
        If Trim(DbResumenVentas.Columns(3).Text) <> "1" Then
           CRPh.ReportFileName = GstrReportesVta + "rpt_listar_PH.rpt"
           CRPh.StoredProcParam(0) = DtcAlmacen.BoundText
           CRPh.StoredProcParam(1) = "05"
           CRPh.StoredProcParam(2) = DbResumenVentas.Columns(3).Value
       
           CRPh.WindowTitle = "Documento Phantom"
           CRPh.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
           CRPh.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
           CRPh.Formulas(3) = "formdecresultado=" & GintDecResultado
           CRPh.Formulas(4) = "formdecprecio=" & GintDecPrecio
           CRPh.Formulas(5) = "formdecStock=" & GintDecStock
              
           CRPh.Destination = crptToWindow
           CRPh.WindowShowPrintBtn = True
           CRPh.WindowShowPrintSetupBtn = True
           CRPh.WindowState = crptMaximized
           CRPh.Action = 1
        End If
        
        If Trim(DbResumenVentas.Columns(7).Text) <> "1" Then
           CRPh.ReportFileName = GstrReportesVta + "rpt_listar_PH.rpt"
           CRPh.StoredProcParam(0) = DtcAlmacen.BoundText
           CRPh.StoredProcParam(1) = "01"
           CRPh.StoredProcParam(2) = DbResumenVentas.Columns(7).Value
       
           CRPh.WindowTitle = "Documento Phantom"
           CRPh.Formulas(1) = "formusuario=stringvar strusuario; strusuario:='" & GCUSERID & "'"
           CRPh.Formulas(2) = "formscreen=stringvar strscreen; strscreen:='05.110.00'"
           CRPh.Formulas(3) = "formdecresultado=" & GintDecResultado
           CRPh.Formulas(4) = "formdecprecio=" & GintDecPrecio
           CRPh.Formulas(5) = "formdecStock=" & GintDecStock
              
           CRPh.Destination = crptToWindow
           CRPh.WindowShowPrintBtn = True
           CRPh.WindowShowPrintSetupBtn = True
           CRPh.WindowState = crptMaximized
           CRPh.Action = 1
        End If
        
   End If
Exit Sub
ERR3:
   
End Sub

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

Private Sub Form_Load()
       
   Call gseguridad(Me)
    
   If pbderecho_consultar Then
        Me.Left = (MDIFVENTAS.Width - Me.Width) / 2
        Me.Top = 100
            
        Set MobjVentasGeneral = New DB_OP_FACTURACION.C_VENTASGENERAL
        Set MobjCorrelativo = New DB_CORRELATIVO.C_Correlativos
        Set MobjAlmacen = New DB_INV_MANTENIMIENTOS.C_ALMACEN
          
        Call CargaDataCombo(DtcAlmacen, MobjAlmacen.ListarAlmacenesPorStatus(1), "SiteId", "Name")
        Call CargaDataCombo(dtcalmacenproces, MobjAlmacen.ListarAlmacenesPorStatus(1), "SiteId", "Name")
         
        lbltotalcons.Caption = GFormatodeNumero(0, GintDecResultado)
        lblventacredcons.Caption = GFormatodeNumero(0, GintDecResultado)
        lbltotalfinalcons.Caption = GFormatodeNumero(0, GintDecResultado)
            
        DtcAlmacen.BoundText = GstrSiteProce
        DTPFechaProceso.Value = GDatFechaProceso
        lblfechaproceso.Caption = GDatFechaProceso
        dtcalmacenproces.BoundText = GstrSiteProce
        
        FradatosGen.Enabled = True
        cmdBuscar.Enabled = True
        FraDatosProce.Enabled = True
        cmdbuscaralmaceproce.Enabled = True
          
        SSTab1.Tab = 0
          
        Me.Height = 7275
    Else
        MsgBox ("No tiene Derechos de Consultar en este formulario"), vbCritical + vbDefaultButton1, "Mensaje"
    End If
     
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
  
  
  Me.pb_agregar = False
  Me.pb_editar = False
  Call gdesactiva_barra

  
  MobjVentasGeneral.Eliminar_TMPResumendeVentas MDblCorrelativo
  Set MobjVentasGeneral = Nothing
  Set MobjCorrelativo = Nothing
   
End Sub
Sub FormatearGrilladeConsulta()
  
 DbConsultaParteD.Caption = "[F5]-Imprimir Detalle"
  
 DbConsultaParteD.Columns(0).Visible = False ' Almacen
 DbConsultaParteD.Columns(1).Visible = False ' Fecha de Proceso
 DbConsultaParteD.Columns(2).Visible = False ' Comentarios
  

 DbConsultaParteD.Columns(3).Visible = False ' Status
 DbConsultaParteD.Columns(4).Visible = False ' Secuencia
 DbConsultaParteD.Columns(5).Visible = False ' ClassID
 DbConsultaParteD.Columns(6).Visible = False ' Cliente
 DbConsultaParteD.Columns(7).Caption = "Concepto"
 DbConsultaParteD.Columns(8).Visible = False 'Tipo de Documento
 
 DbConsultaParteD.Columns(9).Alignment = dbgCenter
 DbConsultaParteD.Columns(9).Width = 450
 
 
 DbConsultaParteD.Columns(10).Caption = "N.Cred.Phantom"
 DbConsultaParteD.Columns(10).Width = 1000
 DbConsultaParteD.Columns(11).Caption = "Importe N.cred"
 DbConsultaParteD.Columns(11).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(11).Alignment = dbgRight
 DbConsultaParteD.Columns(11).Width = 1000
 DbConsultaParteD.Columns(12).Visible = False
    
    
 DbConsultaParteD.Columns(13).Width = 450
 DbConsultaParteD.Columns(13).Alignment = dbgCenter
  
 DbConsultaParteD.Columns(14).Caption = "N.Factu.Phantom"
 DbConsultaParteD.Columns(14).Width = 1000
 
 DbConsultaParteD.Columns(15).Caption = "Importe N.Factu"
 DbConsultaParteD.Columns(15).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(15).Alignment = dbgRight
 DbConsultaParteD.Columns(15).Width = 1005.165
 DbConsultaParteD.Columns(16).Caption = "Importe Total"
 DbConsultaParteD.Columns(16).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(16).Alignment = dbgRight
 DbConsultaParteD.Columns(16).Width = 1000
 
 DbConsultaParteD.Columns(17).Caption = "Venta Crédito"
 DbConsultaParteD.Columns(17).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(17).Alignment = dbgRight
 DbConsultaParteD.Columns(17).Width = 1050
 
 DbConsultaParteD.Columns(18).Caption = "Total"
 DbConsultaParteD.Columns(18).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(18).Alignment = dbgRight
 DbConsultaParteD.Columns(18).Width = 1050
 
 DbConsultaParteD.Columns(19).Caption = "Vales"
 DbConsultaParteD.Columns(19).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(19).Alignment = dbgRight
 DbConsultaParteD.Columns(19).Width = 900
 DbConsultaParteD.Columns(20).Caption = "Diferencia"
 DbConsultaParteD.Columns(20).NumberFormat = GMascara(GintDecResultado)
 DbConsultaParteD.Columns(20).Alignment = dbgRight
 DbConsultaParteD.Columns(20).Width = 940
 
End Sub

Sub FormatearGrilla()
    
 DbResumenVentas.Columns(0).Visible = False
 DbResumenVentas.Columns(1).Width = 1850
 DbResumenVentas.Columns(1).Caption = "Concepto"
  
 DbResumenVentas.Columns(2).Caption = "Gen."
 DbResumenVentas.Columns(2).Width = 400
  
 DbResumenVentas.Columns(3).Caption = "N.Cred Phanton"
 DbResumenVentas.Columns(3).Width = 1005.165
  
 DbResumenVentas.Columns(4).Caption = "Importe N.Cred"
 DbResumenVentas.Columns(4).Width = 1005.165
 DbResumenVentas.Columns(4).NumberFormat = GMascara(GintDecResultado)
 DbResumenVentas.Columns(4).Alignment = dbgRight
  
 DbResumenVentas.Columns(5).Caption = "Importe Extr"
 DbResumenVentas.Columns(5).Visible = False
  
 DbResumenVentas.Columns(6).Caption = "Gen."
 DbResumenVentas.Columns(6).Width = 400
    
 DbResumenVentas.Columns(7).Caption = "N.Factu Phanton"
 DbResumenVentas.Columns(7).Width = 1090.165
  
 DbResumenVentas.Columns(8).Caption = "Importe N.Factu"
 DbResumenVentas.Columns(8).Width = 1005.165
 DbResumenVentas.Columns(8).NumberFormat = GMascara(GintDecResultado)
 DbResumenVentas.Columns(8).Alignment = dbgRight
   
 DbResumenVentas.Columns(9).Caption = "Importe Extr"
 DbResumenVentas.Columns(9).Visible = False
  
 DbResumenVentas.Columns(10).Caption = "Importe Total"
 DbResumenVentas.Columns(10).Width = 1010
 DbResumenVentas.Columns(10).NumberFormat = GMascara(GintDecResultado)
 DbResumenVentas.Columns(10).Alignment = dbgRight
  
 DbResumenVentas.Columns(11).Caption = "Importe Extr"
 DbResumenVentas.Columns(11).Visible = False
  
 DbResumenVentas.Columns(12).Caption = "Venta Crédito/Adelanto"
 DbResumenVentas.Columns(12).Width = 1005.65
 DbResumenVentas.Columns(12).NumberFormat = GMascara(GintDecResultado)
 DbResumenVentas.Columns(12).Alignment = dbgRight
  
 DbResumenVentas.Columns(13).Caption = "Venta Crédito/Adelanto Extr"
 DbResumenVentas.Columns(13).Visible = False
 
  DbResumenVentas.Columns(14).Caption = "Total"
  DbResumenVentas.Columns(14).Width = 1010
  DbResumenVentas.Columns(14).NumberFormat = GMascara(GintDecResultado)
  DbResumenVentas.Columns(14).Alignment = dbgRight

  DbResumenVentas.Columns(15).Visible = False 'TotalUsd
  
  DbResumenVentas.Columns(16).Caption = "Vales"
  DbResumenVentas.Columns(16).Width = 945
  DbResumenVentas.Columns(16).NumberFormat = GMascara(GintDecResultado)
  DbResumenVentas.Columns(16).Alignment = dbgRight
  
  DbResumenVentas.Columns(17).Caption = "Diferencia"
  DbResumenVentas.Columns(17).Width = 930
  DbResumenVentas.Columns(17).NumberFormat = GMascara(GintDecResultado)
  DbResumenVentas.Columns(17).Alignment = dbgRight
  
  DbResumenVentas.Columns(18).Visible = False
  DbResumenVentas.Columns(19).Visible = False
  DbResumenVentas.Columns(20).Visible = False
  DbResumenVentas.Columns(21).Visible = False
   
End Sub

Sub salir_formulario()
  MDIFVENTAS.Toolbar1.Buttons(18).Caption = "Salir"    ' boton salir
  cmdSalir_Click
End Sub

Public Sub borrar_registro()

End Sub

Public Sub actualizar_registro()
    'llamar al procedimiento de carga
    'Call obtener_datos
    'Call asigna_campos
    'MsgBox ("Registros Actualizados")
End Sub
Public Sub agregar_registro()
    'Call gagregar_registro(Me, TxtRuc)
    
    'cmdnuevo_Click
    
    'Me.pb_agregar = True
    'Me.pb_editar = True
    'gHabilitarReg Me, Me.pb_editar
    'Call gactualiza_barra(Me)
    
    
End Sub
Public Sub modificar_registro()
    'Call gmodificar_registro(Me, txtCodigo)
End Sub
Public Sub descartar_registro()
    'Revertir cambios
    'adodc1.Recordset.CancelUpdate
    
    'LimpiaFormulario
    
    'Call gdescartar_registro(Me)
    
    'Me.pb_agregar = False
    'Me.pb_editar = False
    
    'Call gHabilitarReg(frm, frm.pb_editar)
    
    'Call gactualiza_barra(Me)
    'Call gactualizaopcion(Me.pbderecho_agregar, Me.pbderecho_editar, Me.pbderecho_borrar, Me.pbderecho_imprimir)
    'MsgBox ("Cambios Descartados"), vbInformation + vbDefaultButton1, "Mensaje"
    'Call asigna_campos
End Sub
Sub obtener_datos()
End Sub

Sub imprimir()
 If SSTab1.Tab = 1 Then
  cmdImprimir_Click
 End If
End Sub






Private Sub Label12_Click()

End Sub

