VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Fprocresuinv 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Procesar Resumen de Inventarios (95.240.00)"
   ClientHeight    =   2340
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7140
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   2340
   ScaleWidth      =   7140
   Begin VB.Frame Frame1 
      Height          =   2295
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7095
      Begin VB.CommandButton cmdprocesar 
         Caption         =   "Procesar"
         Height          =   855
         Left            =   4440
         TabIndex        =   9
         Top             =   1320
         Width           =   1215
      End
      Begin VB.Frame Frame2 
         Caption         =   "Rango de Fechas"
         Height          =   1455
         Left            =   120
         TabIndex        =   2
         Top             =   720
         Width           =   3855
         Begin MSComCtl2.DTPicker DTPFechaFin 
            Height          =   375
            Left            =   960
            TabIndex        =   3
            Top             =   840
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   661
            _Version        =   393216
            Format          =   61210625
            CurrentDate     =   37964
         End
         Begin MSComCtl2.DTPicker DTPFechaIni 
            Height          =   375
            Left            =   960
            TabIndex        =   4
            Top             =   360
            Width           =   1455
            _ExtentX        =   2566
            _ExtentY        =   661
            _Version        =   393216
            Format          =   61210625
            CurrentDate     =   37964
         End
         Begin VB.Label Label3 
            Caption         =   "Hasta"
            Height          =   255
            Left            =   120
            TabIndex        =   6
            Top             =   840
            Width           =   975
         End
         Begin VB.Label Label2 
            Caption         =   "Desde"
            Height          =   255
            Left            =   120
            TabIndex        =   5
            Top             =   360
            Width           =   1095
         End
      End
      Begin VB.CommandButton cmdSalir 
         Caption         =   "&Salir"
         Height          =   855
         Left            =   5670
         Picture         =   "Fprocresuinv.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   1320
         Width           =   1335
      End
      Begin MSDataListLib.DataCombo DtcAlmacen 
         Height          =   315
         Left            =   1320
         TabIndex        =   7
         Top             =   240
         Width           =   4170
         _ExtentX        =   7355
         _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 Label1 
         Caption         =   "Almacén"
         Height          =   270
         Left            =   120
         TabIndex        =   8
         Top             =   240
         Width           =   1890
      End
   End
End
Attribute VB_Name = "Fprocresuinv"
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
'******************************************************************************************
' 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

Private MobjAlmacen As DB_INV_MANTENIMIENTOS.C_ALMACEN
Private MobjVentasGeneral As DB_OP_FACTURACION.C_VENTASGENERAL
Private MobjMoneda As DB_MA_MANTENIMIENTOS.C_MONEDA
Private MobjUtilSetup As UTIL_SETUP.C_SETUP
Private MobjUtilitarios As DB_UT_MANTENIMIENTOS.C_PROCESOS



Private Sub cmdprocesar_Click()

On Error GoTo Err:

Dim Lstrcadena As String

   If MsgBox("Seguro que desa generar los resumenes de inventarios", vbQuestion + vbYesNo, "Procesar") = vbYes Then
      Lstrcadena = " GENERA_RESUMENES_MOVIMIENTOS_PROC  '" & Format(DTPFechaIni, "yyyymmdd") & "','" & Format(DTPFechaFin.Value, "yyyymmdd") & "'"
      Screen.MousePointer = 11
      MobjUtilitarios.Auxiliar1 Lstrcadena
      Screen.MousePointer = 0
      
      MsgBox "Proceso Terminado", vbDefaultButton1 + vbInformation, "Mensaje"
      
   End If

Exit Sub

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


Private Sub cmdSalir_Click()
   Unload Me
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 = (Screen.Width - Me.Width) / 2
    Me.Top = 100
    
    Set MobjVentasGeneral = New DB_OP_FACTURACION.C_VENTASGENERAL
    Set MobjAlmacen = New DB_INV_MANTENIMIENTOS.C_ALMACEN
    Set MobjMoneda = New DB_MA_MANTENIMIENTOS.C_MONEDA
    Set MobjUtilSetup = New UTIL_SETUP.C_SETUP
    Set MobjUtilitarios = New DB_UT_MANTENIMIENTOS.C_PROCESOS
    
    Call CargaDataCombo(DtcAlmacen, MobjAlmacen.ListarAlmacenesPorStatus(1), "SiteId", "Name")
    DtcAlmacen.BoundText = GstrSiteProce
  Else
    MsgBox ("No tiene Derechos de Consultar en este formulario"), vbCritical + vbDefaultButton1, "Mensaje"
  End If
 
End Sub

Private Sub Form_Unload(Cancel As Integer)
    
    Set MobjVentasGeneral = Nothing
    Set MobjAlmacen = Nothing
    Set MobjMoneda = Nothing
    Set MobjUtilSetup = Nothing
    Set MobjUtilitarios = Nothing
    
End Sub

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

Public Sub actualizar_registro()
  
End Sub
