VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FCierreVentas 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Cierre de Ventas"
   ClientHeight    =   4440
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9150
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4440
   ScaleWidth      =   9150
   Begin MSDataGridLib.DataGrid DbActuPrecios 
      Height          =   1785
      Left            =   120
      TabIndex        =   1
      Top             =   1320
      Width           =   8970
      _ExtentX        =   15822
      _ExtentY        =   3149
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      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            =   8.25
         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.CommandButton CMD_ACEPTAR 
      Caption         =   "Aceptar"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   5160
      Picture         =   "0505000.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   2
      Tag             =   "R ASDASD"
      Top             =   3240
      Width           =   1905
   End
   Begin VB.CommandButton CMD_CANCELAR 
      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          =   855
      Left            =   7080
      Picture         =   "0505000.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   3240
      Width           =   1935
   End
   Begin VB.Frame Frame1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000004&
      ForeColor       =   &H80000008&
      Height          =   1170
      Left            =   90
      TabIndex        =   0
      Top             =   60
      Width           =   8910
      Begin VB.Image Image1 
         Height          =   600
         Left            =   240
         Picture         =   "0505000.frx":0614
         Stretch         =   -1  'True
         Top             =   240
         Width           =   600
      End
      Begin VB.Label lblmensaje 
         Caption         =   "ESTE PROCESO INCREMENTA LA FECHA DE PROCESO EN UN DIA. SOLO DEBE EJECUTARSE AL FINALIZAR LAS VENTAS DEL DIA "
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   600
         Left            =   1080
         TabIndex        =   4
         Top             =   345
         Width           =   7305
      End
   End
   Begin MSComCtl2.Animation Animation1 
      Height          =   645
      Left            =   120
      TabIndex        =   5
      Top             =   3240
      Visible         =   0   'False
      Width           =   4815
      _ExtentX        =   8493
      _ExtentY        =   1138
      _Version        =   393216
      BackColor       =   -2147483644
      FullWidth       =   321
      FullHeight      =   43
   End
   Begin VB.Label lblespera 
      Caption         =   "Realizando Cierre de Ventas ... "
      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            =   120
      TabIndex        =   6
      Top             =   3960
      Visible         =   0   'False
      Width           =   4575
   End
End
Attribute VB_Name = "FCierreVentas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Se retiraron los Fuentes de la red el 24/04/2003
Option Explicit

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

Private MobjVentasGeneral As DB_OP_FACTURACION.C_VENTASGENERAL

Public Sub primer_registro()
End Sub
Public Sub ultimo_registro()
End Sub
Public Sub registro_anterior()
End Sub
Public Sub registro_siguiente()
End Sub
Private Sub Salir()
    Unload Me
End Sub

Private Sub CMD_ACEPTAR_Click()

On Error GoTo errhandler

Dim LrsVentasGeneral As ADODB.Recordset
Dim LStrCadenaPtoVta As String
     
    If MsgBox("Seguro que desea realizar el Fin de Día", vbQuestion + vbYesNo, "Advertencia") = vbNo Then
       Exit Sub
       Unload Me
    End If
     
    Set LrsVentasGeneral = MobjVentasGeneral.FaltaCierreZ
     
    If Not LrsVentasGeneral.EOF Then
       LrsVentasGeneral.MoveFirst
       LStrCadenaPtoVta = "No se ha Relizado el Cierre Z de las Sgte Cajas : " & vbCrLf
       Do While Not LrsVentasGeneral.EOF
           LStrCadenaPtoVta = LStrCadenaPtoVta & vbCrLf & Trim(LrsVentasGeneral!SALESPOINT)
           LrsVentasGeneral.MoveNext
       Loop
       MsgBox LStrCadenaPtoVta, vbDefaultButton1 + vbExclamation, "Advertencia"
    Else
       ' Se Procede a realizar el Cierre de Ventas
       'lblmensaje.Visible = False
       lblespera.Visible = True
       Screen.MousePointer = 11
       Animation1.Open GstrReportesVta & "proceso.avi"
       Animation1.Visible = True
       Animation1.Play
       
       MobjVentasGeneral.CerraDiadeVentas
       Screen.MousePointer = 0
       
       Animation1.AutoPlay = False
       Animation1.Stop
       Animation1.Visible = False
       lblespera.Visible = False
       'lblmensaje.Visible = True
       MsgBox "Proceso Terminado con éxito, el sistema se cerrará ", vbDefaultButton1 + vbExclamation, "Advertencia"
       End
    End If
    
    Set LrsVentasGeneral = Nothing
          
    Unload Me
Exit Sub
errhandler:
   Animation1.AutoPlay = False
   Animation1.Stop
   Animation1.Visible = False
   lblespera.Visible = False
   Screen.MousePointer = 0
    
   MsgBox Err.Description, vbDefaultButton1 + vbExclamation, "Advertencia"
End Sub

Private Sub cmd_cancelar_Click()
  Unload Me
End Sub

Private Sub Form_Load()
  Dim LrsActuPrecios As ADODB.Recordset
   
  Me.Caption = "Cierre de Ventas - [Fecha de Proceso " & GDatFechaProcesoVentas & "]"
  Me.Top = (Screen.Height - MDIFVENTAS.Toolbar1.Height - Me.Height) / 2
  Me.Left = (Screen.Width - Me.Width) / 2

  Set MobjVentasGeneral = New DB_OP_FACTURACION.C_VENTASGENERAL
  
  'Set LrsActuPrecios = MobjVentasGeneral.ListarPreciosaActualizar
  
  'If LrsActuPrecios.EOF Then
      DbActuPrecios.Visible = False
      CMD_ACEPTAR.Top = 1440
      CMD_CANCELAR.Top = 1440
      lblespera.Top = 2200
      Animation1.Top = 1440
      Me.Height = 2900
  'Else
  '    CMD_ACEPTAR.Top = 3450
  '    CMD_CANCELAR.Top = 3450
  '    DbActuPrecios.Caption = "Listado de Precios que serán Actualizados"
  '    Set DbActuPrecios.DataSource = LrsActuPrecios
  '    DbActuPrecios.Columns(0).Visible = False
  '    DbActuPrecios.Columns(1).Width = 1450
  '    DbActuPrecios.Columns(2).Visible = False
  '    DbActuPrecios.Columns(3).Width = 2400
  '    DbActuPrecios.Columns(4).Visible = False
  '    DbActuPrecios.Columns(5).Width = 3000
  '    DbActuPrecios.Columns(6).Width = 880
  '    DbActuPrecios.Columns(6).Alignment = dbgRight
  '    DbActuPrecios.Columns(6).NumberFormat = GMascara(GintDecPrecio)
  '    DbActuPrecios.Columns(7).Width = 880
  '    DbActuPrecios.Columns(7).Alignment = dbgRight
  '    DbActuPrecios.Columns(7).NumberFormat = GMascara(GintDecPrecio)
  '    DbActuPrecios.Refresh
  'End If
  
End Sub

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

Public Sub salir_formulario()
    Salir
End Sub


