VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "C_FALTA_SOBRA"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'EDGAR CANCHO RUIZ
'Clase : C_FALTA_SOBRA


Public Sub AgregarFaltaSobra(ByVal strSITEID As String, ByVal datDATEPROCE As Date, _
                                  ByVal strCURYID As String, ByVal strUSERID As String, _
                                  ByVal lngCORREL As Long, Optional VarAux As Variant)
                             
   
    Dim con As ADODB.Connection
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " EXEC GrabarCabFaltaSobraProc '" & strSITEID & "','" & Format(datDATEPROCE, "YYYY/DD/MM") & "','" & _
                                                strCURYID & "','" & strUSERID & "'," & lngCORREL
                                                
                                

    Set con = New ADODB.Connection
    con.Open "FILEDSN=conexionsies"

    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, con, adOpenStatic
    
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:

Dim LStrMensajeError As String
Dim LVarNumeroError As Variant
     If Not rs Is Nothing Then
        Set rs = Nothing
     End If
     If Not con Is Nothing Then
        LStrMensajeError = con.Errors(con.Errors.Count - 2).Description
        LVarNumeroError = con.Errors(con.Errors.Count - 2).NativeError
        Set con = Nothing
     End If
     
     'GetObjectContext.SetAbort
     
     Err.Raise LVarNumeroError, "DB_MA_MANTENIMIENTOS.AgregarFaltaSobra", LStrMensajeError
     
End Sub

Public Sub ModificarFaltanteSobrante(ByVal strSITEID As String, ByVal datDATEPROCE As Date, ByVal lngCORRNBR As Long, Optional VarAux As Variant)
                             
   
    Dim con As ADODB.Connection
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " EXEC Copiar_Temporal_A_OP_CCSALESPERSONDETProc '" & strSITEID & "','" & Format(datDATEPROCE, "YYYY/DD/MM") & "'," & lngCORRNBR
                                

    Set con = New ADODB.Connection
    con.Open "FILEDSN=conexionsies"

    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, con, adOpenStatic
    

    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:

Dim LStrMensajeError As String
Dim LVarNumeroError As Variant
     If Not rs Is Nothing Then
        Set rs = Nothing
     End If
     If Not con Is Nothing Then
        LStrMensajeError = con.Errors(con.Errors.Count - 2).Description
        LVarNumeroError = con.Errors(con.Errors.Count - 2).NativeError
        Set con = Nothing
     End If
     
     'GetObjectContext.SetAbort
     
     Err.Raise LVarNumeroError, "DB_MA_MANTENIMIENTOS.ModificarFaltanteSobrante", LStrMensajeError
     
End Sub

Public Sub CopiarAlTemporal(ByVal intCORRNBR As Long, ByVal strSITEID As String, ByVal datDATEPROCE As Date, ByVal intNUMBERTURN As Integer, ByVal strSALESPERID As String, Optional VarAux As Variant)
    Dim strSQL As String
    Dim con As ADODB.Connection
    
    On Error GoTo TrataError
    
    strSQL = " EXEC CargaTMP_ControlTurnoProc " & intCORRNBR & ",'" & strSITEID & "','" & Format(datDATEPROCE, "DD/MM/YYYY") & "'," & intNUMBERTURN & ",'" & strSALESPERID & "'"
    
    
    Set con = New Connection
    con.Open "FILEDSN=conexionsies"
    con.Execute strSQL
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:
    If Not con Is Nothing Then
        Set con = Nothing
    End If
    
    
    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_MA_MANTENIMIENTOS.CopiarDetalleListaPrecInvAlTemporal", Err.Description

End Sub

Public Sub CopiarOriginalAlTemporal(ByVal strSITEID As String, ByVal datDATEPROCE As Date, ByVal lngCORRNBR As Long, Optional VarAux As Variant)
    Dim strSQL As String
    Dim con As ADODB.Connection
    
    On Error GoTo TrataError
    
    strSQL = " EXEC Copiar_OP_CCSALESPERSONDET_AlTemporalProc '" & strSITEID & "','" & Format(datDATEPROCE, "YYYY/DD/MM") & "'," & lngCORRNBR
    
    
    Set con = New Connection
    con.Open "FILEDSN=conexionsies"
    con.Execute strSQL
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:
    If Not con Is Nothing Then
        Set con = Nothing
    End If
    
    
    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_MA_MANTENIMIENTOS.CopiarOriginalAlTemporal", Err.Description

End Sub

Public Sub EliminarEnTemporal(ByVal lngCORRNBR As Long, ByVal strSITEID As String, ByVal datFecha As Date, _
                              ByVal strSALESPERID As String, ByVal strCCSALESPERSONTYPEID As String, Optional VarAux As Variant)
   
    Dim cmd As Command
    Dim con As Connection
    Dim strSQL As String

    On Error GoTo TrataError
    
    strSQL = " EXEC TMP_OP_CCSALESPERSONDETDelProc " & lngCORRNBR & ",'" & strSITEID & "','" & Format(datFecha, "DD/MM/YYYY") & "','" & _
                                                            strSALESPERID & "','" & strCCSALESPERSONTYPEID & "'"
                                
    Set cmd = New Command
    cmd.CommandText = strSQL
      
    Set con = New Connection
    con.Open "FILEDSN=conexionsies"
    cmd.ActiveConnection = con
    cmd.Execute
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:
    If Not cmd Is Nothing Then
        Set cmd = Nothing
    End If
    If Not con Is Nothing Then
        Set con = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_MA_MANTENIMIENTOS.EliminarEnTemporal", Err.Description
End Sub

Public Sub EliminarFaltanteSobrantes(ByVal strSITEID As String, ByVal strDATEPROCE As Date, Optional VarAux As Variant)
   
    Dim cmd As Command
    Dim con As Connection
    Dim strSQL As String

    On Error GoTo TrataError
    
    strSQL = " EXEC EliminarFantanteSobranteProc '" & strSITEID & "','" & Format(strDATEPROCE, "DD/MM/YYYY") & "'"
                                
    Set cmd = New Command
    cmd.CommandText = strSQL
      
    Set con = New Connection
    con.Open "FILEDSN=conexionsies"
    cmd.ActiveConnection = con
    cmd.Execute
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:
    If Not cmd Is Nothing Then
        Set cmd = Nothing
    End If
    If Not con Is Nothing Then
        Set con = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_MA_MANTENIMIENTOS.EliminarFaltanteSobrantes", Err.Description
End Sub

Public Sub ActualizaEnTemporal(ByVal lngCORRNBR As Long, ByVal strSITEID As String, ByVal strCURYID As String, ByVal datFecha As Date, _
                               ByVal strSALESPERID As String, ByVal strCCSALESPERSONTYPEID As String, ByVal dblVALOR As Double, ByVal strOBS As String, _
                               ByVal strCURYTYPEID As String, ByVal strMONEDABASE As String, ByVal strMONEDAEXT As String, ByVal intREDONDEO As Integer, Optional VarAux As Variant)
   
    
    Dim strSQL As String
    Dim con As ADODB.Connection
    Dim ValorPEN As Double
    Dim ValorUSD As Double
    
    On Error GoTo TrataError
    
    If strCURYID = strMONEDABASE Then
        ValorPEN = dblVALOR
        ValorUSD = ConvertirValor(dblVALOR, strCURYID, datFecha, strCURYTYPEID, strMONEDABASE, strMONEDAEXT, intREDONDEO)
    Else
        ValorPEN = ConvertirValor(dblVALOR, strCURYID, datFecha, strCURYTYPEID, strMONEDABASE, strMONEDAEXT, intREDONDEO)
        ValorUSD = dblVALOR
    End If
    
    
    strSQL = " EXEC TMP_OP_CCSALESPERSONDETUpdProc " & lngCORRNBR & ",'" & strSITEID & "','" & Format(datFecha, "DD/MM/YYYY") & "','" & _
                                                            strSALESPERID & "','" & strCCSALESPERSONTYPEID & "'," & ValorPEN & "," & ValorUSD & ",'" & strOBS & "'"
                                                    
    
    Set con = New Connection
    con.Open "FILEDSN=conexionsies"
    con.Execute strSQL
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:
    If Not con Is Nothing Then
        Set con = Nothing
    End If
    
    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.ActualizaEnTemporal", Err.Description

End Sub

Public Function SeleccionaEnTemporalDetFaltaSobra(ByVal lngCORRNBR As Long, Optional VarAux As Variant) As ADODB.Recordset
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " SELECT SALESPERID as Cod_Vendedor,CCSALESPERSONTYPEID as Tipo_Mov,TOTALPEN as TotalPEN,TOTALUSD as TotalUSD,OBS as Observacion " & _
             " FROM TMP_OP_CCSALESPERSONDET " & _
             " WHERE CORRNBR=" & lngCORRNBR
    
    Set rs = New Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
        
    Set SeleccionaEnTemporalDetFaltaSobra = rs
    
    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If
    
    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_MA_MANTENIMIENTOS.SeleccionaEnTemporalDetFaltaSobra", Err.Description

End Function

Public Function SeleccionaEnDetalle(ByVal strSITEID As String, ByVal datFECHAPROCE As Date, Optional VarAux As Variant) As ADODB.Recordset
    Dim strSQL As String
    Dim strVENDIDSS As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
       
    strSQL = " SELECT SALESPERID as Cod_Vendedor,CCSALESPERSONTYPEID as Tipo_Mov,TOTALPEN as TotalPEN,TOTALUSD as TotalUSD,OBS as Observacion " & _
             " FROM OP_CCSALESPERSONDET " & _
             " WHERE SITEID='" & strSITEID & "' AND DATEPROCE='" & Format(datFECHAPROCE, "DD/MM/YYYY") & "'"
    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenStatic
    
    Set SeleccionaEnDetalle = rs
    
    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.SeleccionaEnDetalle", Err.Description

End Function

Public Function SeleccionaEnCabecera(ByVal strSITEID As String, ByVal datFECHAPROCE As Date, Optional VarAux As Variant) As ADODB.Recordset
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " SELECT * " & _
             " FROM OP_CCSALESPERSON WHERE SITEID='" & strSITEID & "' AND DATEPROCE='" & Format(datFECHAPROCE, "DD/MM/YYYY") & "'"
    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenStatic
        
    Set SeleccionaEnCabecera = rs
    
    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.SeleccionaEnCabecera", Err.Description

End Function

Public Function ExisteRegistro(ByVal strSITEID As String, ByVal datDATEPROCE As Date, _
                               ByVal intNUMBERTURN As Integer, ByVal strSALESPERID As String, Optional VarAux As Variant) As Long
    
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    ExisteRegistro = 0
    
    strSQL = " SELECT *  FROM OP_CTRLTURN " & _
             " WHERE DATEPROCES='" & Format(datDATEPROCE, "DD/MM/YYYY") & "' AND SITEID='" & strSITEID & "' AND NBRTUR=" & intNUMBERTURN & " AND SALESPERID='" & strSALESPERID & "'"

    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenStatic
        
    If rs.RecordCount > 0 Then
        ExisteRegistro = rs!BATNBRTURN
    End If
    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.ExisteRegistro", Err.Description

End Function

Public Function ListarFaltantesSobrantes(ByVal strSITEID As String, ByVal datFECHAINI As Date, ByVal datFECHAFIN As Date, _
                                         ByVal bytAlmacen As Byte, Optional VarAux As Variant) As ADODB.Recordset
                               
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    If bytAlmacen = 1 Then  'TODOS LOS ALMACENES
        strSQL = " SELECT SITEID as Almacen,DATEPROCE as Fech_Proc,CURYID as Moneda,CASE STATUS " & _
                 " WHEN 1 THEN 'CERRADO' WHEN 0 THEN 'NO CERRADO' END AS Estado " & _
                 " FROM OP_CCSALESPERSON  " & _
                 " WHERE DATEPROCE>='" & Format(datFECHAINI, "DD/MM/YYYY") & "' AND DATEPROCE<='" & Format(datFECHAFIN, "DD/MM/YYYY") & "'"
    Else
        
        strSQL = " SELECT SITEID as Almacen,DATEPROCE as Fech_Proc,CURYID as Moneda,CASE STATUS " & _
                 " WHEN 1 THEN 'CERRADO' WHEN 0 THEN 'NO CERRADO' END AS Estado " & _
                 " FROM OP_CCSALESPERSON  " & _
                 " WHERE DATEPROCE>='" & Format(datFECHAINI, "DD/MM/YYYY") & "' AND DATEPROCE<='" & Format(datFECHAFIN, "DD/MM/YYYY") & "' AND SITEID='" & strSITEID & "'"
        
    End If


    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
            
    Set ListarFaltantesSobrantes = rs
    
    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.ListarFaltantesSobrantes", Err.Description

End Function

Public Function ListarTipoCCVendedor(Optional VarAux As Variant) As ADODB.Recordset
                               
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " SELECT CCSALESPERSONTYPEID,DESCRCCSALESPERSONTYPE FROM OP_CCSALESPERSONTYPE"


    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
            
    Set ListarTipoCCVendedor = rs
    
    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.ListarTipoCCVendedor", Err.Description

End Function


Public Sub AgregaEnTemporal(ByVal lngCORRNBR As Long, ByVal strSITEID As String, ByVal strCURYID As String, ByVal datFecha As Date, _
                            ByVal strSALESPERID As String, ByVal strCCSALESPERSONTYPEID As String, ByVal dblVALOR As Double, ByVal strOBS As String, _
                            ByVal strCURYTYPEID As String, ByVal strMONEDABASE As String, ByVal strMONEDAEXT As String, ByVal intREDONDEO As Integer, Optional VarAux As Variant)
    
    Dim strSQL As String
    Dim con As ADODB.Connection
    Dim ValorPEN As Double
    Dim ValorUSD As Double
    
    On Error GoTo TrataError
    
    If strCURYID = strMONEDABASE Then
        ValorPEN = dblVALOR
        ValorUSD = ConvertirValor(dblVALOR, strCURYID, datFecha, strCURYTYPEID, strMONEDABASE, strMONEDAEXT, intREDONDEO)
    Else
        ValorPEN = ConvertirValor(dblVALOR, strCURYID, datFecha, strCURYTYPEID, strMONEDABASE, strMONEDAEXT, intREDONDEO)
        ValorUSD = dblVALOR
    End If
    
    
    strSQL = " EXEC TMP_OP_CCSALESPERSONDETInsProc " & lngCORRNBR & ",'" & strSITEID & "','" & Format(datFecha, "DD/MM/YYYY") & "','" & _
                                                            strSALESPERID & "','" & strCCSALESPERSONTYPEID & "'," & ValorPEN & "," & ValorUSD & ",'" & strOBS & "'"
                                                    
    
    Set con = New Connection
    con.Open "FILEDSN=conexionsies"
    con.Execute strSQL
    
    ''GetObjectContext.SetComplete
    
    Exit Sub
    
TrataError:
    If Not con Is Nothing Then
        Set con = Nothing
    End If
    
    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_OP_MANTENIMIENTOS.AgregaEnTemporal", Err.Description

End Sub


Public Function ConvertirValor(ByVal dblVALOR As Double, ByVal strCURYID As String, ByVal datFecha As Date, _
                               ByVal strCURYTYPEID As String, ByVal strMONEDABASE As String, ByVal strMONEDAEXT As String, ByVal intREDONDEO As Integer, Optional VarAux As Variant) As Double
                                
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    

    If strCURYID = strMONEDABASE Then
    
        strSQL = " Exec ObtieneTipoCambioGeneralProc " & dblVALOR & ",'" & strCURYID & "','" & strMONEDAEXT & "','" & Format(datFecha, "YYYY/DD/MM") & "','" & strCURYTYPEID & "'," & intREDONDEO
    Else
        strSQL = " Exec ObtieneTipoCambioGeneralProc " & dblVALOR & ",'" & strCURYID & "','" & strMONEDABASE & "','" & Format(datFecha, "YYYY/DD/MM") & "','" & strCURYTYPEID & "'," & intREDONDEO
    End If
        
        Set rs = New Recordset
        rs.CursorLocation = adUseClient
        rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
    
        ConvertirValor = rs!VALOR
    

    ''GetObjectContext.SetComplete
    
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If

    'GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "DB_MA_MONTENIMIENTOS.ConvertirValor", Err.Description

End Function

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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.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_OP_FACTURACION.C_CIERRE.Auxiliar10", Err.Description
End Function
