Attribute VB_Name = "Module1"
Function ListarTiposDocumentosInventario(IntIngSal As Integer, Optional VarAux As Variant) As ADODB.Recordset
    Dim rs As ADODB.Recordset
    Dim StrSql As String
    
On Error GoTo errhandler
    
    Set rs = New ADODB.Recordset
    
    StrSql = "Select TypeDocID,Descr from IN_TYPEDOC where inout=" & IntIngSal
    
    Set rs = New Recordset
    rs.CursorLocation = adUseClient
    rs.Open StrSql, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
    
    Set ListarTiposDocumentosInventario = rs
        
   ' GetObjectContext.SetComplete
    
    Exit Function
    
errhandler:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If
    
    'GetObjectContext.SetAbort
     
     'Err.Raise LVarNumeroError, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.ListTiposDocumentosInv ", LStrMensajeError
End Function

'Function ListProveedoresEstacion() As ADODB.Recordset
'    Dim rs As ADODB.Recordset
'    Dim StrSql As String
'
'On Error GoTo errhandler
'
'    Set rs = New ADODB.Recordset
'
'    StrSql = "Select VendIdSS,Descr from IN_VENDOR"
'
'    rs.Open StrSql, "FILEDSN=conexionsies", adOpenStatic
'
'    Set ListTiposDocumentosInv = rs
'
'    GetObjectContext.SetComplete
'
'    Exit Function
'
'errhandler:
'    If Not rs Is Nothing Then
'        Set rs = Nothing
'    End If
'
'    GetObjectContext.SetAbort
'
'     Err.Raise LVarNumeroError, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.ListProveedoresEstacion", LStrMensajeError
'End Function

Function ListarTiposDocumentos(Optional VarAux As Variant) As ADODB.Recordset
    Dim rs As ADODB.Recordset
    Dim StrSql As String

On Error GoTo errhandler

    Set rs = New ADODB.Recordset

    StrSql = "Select DocTypeID,Descr from DOCTYPE"

    rs.Open StrSql, "FILEDSN=conexionsies", adOpenStatic

    Set ListarTiposDocumentos = rs

   ' GetObjectContext.SetComplete




    Exit Function

errhandler:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort

    ' Err.Raise LVarNumeroError, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.ListarTiposDocumentos", LStrMensajeError
End Function

Function CargarInSetup(Optional VarAux As Variant) As ADODB.Recordset
    Dim rs As ADODB.Recordset
    Dim StrSql As String

On Error GoTo errhandler

    Set rs = New ADODB.Recordset

    StrSql = "Select * from IN_SETUP"

    rs.Open StrSql, "FILEDSN=conexionsies", adOpenStatic

    Set CargarInSetup = rs

    GetObjectContext.SetComplete

    Exit Function

errhandler:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    GetObjectContext.SetAbort

     Err.Raise LVarNumeroError, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.CargarInSetup", LStrMensajeError
End Function

Sub ActualizarInSetup(StrTransfIng As String, StrTransfSal As String, StrRutaRepo As String, _
                      StrDesIng As String, StrDesSal As String, StrNtaCredSal As String, _
                      StrBonIng As String, StrTomInvIng As String, StrTomInvSal As String, _
                      StrCompStoreIng As String, StrCompCombIng As String, StrInvIniIng As String, _
                      StrTipDoc As String, StrProvEst As String, Optional VarAux As Variant)
    Dim cmd As ADODB.Command
    Dim StrSql As String

On Error GoTo errhandler

    Set cmd = New ADODB.Command

    StrSql = _
    "SP_UpProcIN_SETUP '" & StrTransfIng & "','" & StrTransfSal & "','" & StrRutaRepo & "','" & _
    StrDesIng & "','" & StrDesSal & "','" & StrNtaCredSal & "','" & StrBonIng & "','" & _
    StrTomInvIng & "','" & StrTomInvSal & "','" & StrCompStoreIng & "','" & StrCompCombIng & "','" & _
    StrInvIniIng & "','" & StrTipDoc & "','" & StrProvEst & "'"

    cmd.ActiveConnection = "FILEDSN=conexionsies"
    cmd.CommandText = StrSql
    cmd.Execute StrSql

    GetObjectContext.SetComplete
    
    Exit Sub

errhandler:
    If Not cmd Is Nothing Then
        Set cmd = Nothing
    End If

    GetObjectContext.SetAbort

    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.ActualizarInSetup"
End Sub



Public Function Auxiliar1(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar1", Err.Description
End Function


Public Function Auxiliar2(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar2", Err.Description
End Function

Public Function Auxiliar3(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar3", Err.Description
End Function

Public Function Auxiliar4(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar4", Err.Description
End Function

Public Function Auxiliar5(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar5", Err.Description
End Function


Public Function Auxiliar6(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar6", Err.Description
End Function

Public Function Auxiliar7(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar7", Err.Description
End Function

Public Function Auxiliar8(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar8", Err.Description
End Function

Public Function Auxiliar9(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar9", Err.Description
End Function

Public Function Auxiliar10(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "DB_UT_MANTENIMIENTOS.C_INVENTARIOS.Auxiliar10", Err.Description
End Function




