VERSION 5.00
Object = "{69F9D01E-F1DE-11D4-9536-002018603DA2}#7.0#0"; "ControlNumber.ocx"
Object = "{C4DED68B-C40F-11D6-AD1A-000795CA0957}#50.0#0"; "pry_list.ocx"
Begin VB.Form FReplicar 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Replicar Almacenes"
   ClientHeight    =   5010
   ClientLeft      =   4080
   ClientTop       =   2010
   ClientWidth     =   6675
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5010
   ScaleWidth      =   6675
   Begin VB.TextBox txtcodsolNoinvent 
      Height          =   285
      Left            =   2760
      MaxLength       =   20
      TabIndex        =   3
      Top             =   3120
      Width           =   2535
   End
   Begin VB.TextBox txtcodsolinvent 
      Height          =   285
      Left            =   2760
      MaxLength       =   20
      TabIndex        =   2
      Top             =   2760
      Width           =   2535
   End
   Begin VB.CommandButton CmdSalir 
      Caption         =   "Cancelar"
      Height          =   735
      Left            =   5280
      Picture         =   "FReplicar2.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   4200
      Width           =   1335
   End
   Begin VB.CommandButton cmdreplicar 
      Caption         =   "Replicar"
      Height          =   735
      Left            =   3960
      Picture         =   "FReplicar2.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   4200
      Width           =   1335
   End
   Begin MiControl.CtrlNumber CTNstkmax 
      Height          =   375
      Left            =   2760
      TabIndex        =   5
      Top             =   3840
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      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 CTNstkmin 
      Height          =   375
      Left            =   2760
      TabIndex        =   4
      Top             =   3480
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      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.Frame Frame1 
      Caption         =   "Seleccionar Almacenes"
      Height          =   2535
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6375
      Begin pry_list.ctrl_listarray ListRAlmacenes 
         Height          =   2055
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   5775
         _ExtentX        =   10186
         _ExtentY        =   3625
      End
   End
   Begin VB.Label Label4 
      Caption         =   "Código Solomon No Inventariable"
      Height          =   255
      Left            =   120
      TabIndex        =   11
      Top             =   3120
      Width           =   2655
   End
   Begin VB.Label Label3 
      Caption         =   "Código Solomon Inventariable"
      Height          =   255
      Left            =   120
      TabIndex        =   10
      Top             =   2760
      Width           =   2415
   End
   Begin VB.Label Label2 
      Caption         =   "Stock Máximo"
      Height          =   375
      Left            =   120
      TabIndex        =   9
      Top             =   3840
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "Stock Minimo"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   3480
      Width           =   975
   End
End
Attribute VB_Name = "FReplicar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public GSTRMonedaBase As String
Public GDblIdentificador As Double
Public GstrcodArticulo As String
Private MobjArticuloReplica As DB_INV_ARTICULO.C_ARTICULO
Private MrsPerteneceAlm As ADODB.Recordset
Private MrsNoPerteneceAlm As ADODB.Recordset

Private Sub cmdreplicar_Click()
  Dim LArrayAlmacenes()
  Dim Lintfilas As Integer
  
  On Error GoTo ErrorHandler
  LArrayAlmacenes = ListRAlmacenes.llenar_matriz
  Lintfilas = UBound(LArrayAlmacenes) - 1
  
  If Lintfilas = 0 Then
     MsgBox "Debe seleccionar un Almacen", vbDefaultButton1 + vbExclamation, "Mensaje"
     Exit Sub
  End If
  For I = 1 To Lintfilas
      MobjArticuloReplica.ReplicarTempInventoryDat GDblIdentificador, _
                          GstrcodArticulo, LArrayAlmacenes(I, 1), CTNstkmin.Text, CTNstkmax.Text, txtcodsolinvent.Text, _
                          txtcodsolNoinvent.Text
  Next
    
  Unload Me
    
Exit Sub

ErrorHandler:
    
   MsgBox MensajedeError(ERR.Number, ERR.Description), vbExclamation + vbDefaultButton1, "Advertencia"
  
End Sub
Private Sub cmdSalir_Click()
   Unload Me
End Sub
Private Sub Form_Activate()
  CTNstkmin.Enteros = 7
  CTNstkmin.Decimales = GintDecStock
  CTNstkmin.ValorPorDefecto
  CTNstkmax.Enteros = 7
  CTNstkmax.Decimales = GintDecStock
  CTNstkmax.ValorPorDefecto
End Sub

Private Sub Form_Load()
  Me.Top = 3705
  Set MobjArticuloReplica = New DB_INV_ARTICULO.C_ARTICULO
  Set MrsPerteneceAlm = MobjArticuloReplica.PertenecealosAlmacenes(GstrcodArticulo)
  Set MrsNoPerteneceAlm = MobjArticuloReplica.NoPertenecealosAlmacenes(GstrcodArticulo)
     
  ListRAlmacenes.llena_lista MrsNoPerteneceAlm, MrsPerteneceAlm
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
  
  Set MobjArticuloReplica = Nothing
  Set MrsPerteneceAlm = Nothing
  Set MrsNoPerteneceAlm = Nothing
   
End Sub

Private Sub txtcodsolinvent_KeyPress(KeyAscii As Integer)
  KeyAscii = GBloqueaCaracter(KeyAscii)
End Sub

Private Sub txtcodsolNoinvent_KeyPress(KeyAscii As Integer)
  KeyAscii = GBloqueaCaracter(KeyAscii)
End Sub
