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_CONTOMETROM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True

Public Function AgregarContometro(ByVal strSITEID As String, ByVal datDATEPROCES As Date, _
                                  ByVal strNBRTUR As String, ByVal strSALESPERID As String, _
                                  ByVal strUSERID As String, ByVal lngCORREL As Long, Optional VarAux As Variant) As String
                             
   
    Dim con As ADODB.Connection
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " EXEC GrabarCabContometroProc '" & strSITEID & "','" & Format(datDATEPROCES, "YYYY/DD/MM") & "','" & _
                                                strNBRTUR & "','" & strSALESPERID & "','" & _
                                                strUSERID & "'," & lngCORREL
                                

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

    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, con, adOpenStatic
    
    AgregarContometro = rs!NUMEROCONTOMETRO
    
    ''GetObjectContext.SetComplete
    
    Exit Function
    
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.AgregarContometro", LStrMensajeError
     
End Function

Public Sub ModificarContometro(ByVal lngBATNBRTURN As Long, ByVal strSITEID As String, 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_CTRLTURNDETProc " & lngBATNBRTURN & ",'" & strSITEID & "'," & 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.ModificarContometro", LStrMensajeError
     
End Sub

Public Sub CopiarAlTemporal(ByVal lngCORRNBR 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 " & lngCORRNBR & ",'" & 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 lngBATNBRTURN As Long, ByVal strSITEID As String, 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_CTRLTURNDET_AlTemporalProc " & lngBATNBRTURN & ",'" & strSITEID & "'," & 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 EliminarItemEnTmpDetalleHistPrecInv(ByVal strINVTIDSKU As String, ByVal lngCORRNBR As Long, Optional VarAux As Variant)
   
    Dim cmd As Command
    Dim con As Connection
    Dim strSQL As String

    On Error GoTo TrataError
    
    strSQL = " EXEC TMP_IN_PRICELEVELTEMDETDelProc '" & strINVTIDSKU & "'," & lngCORRNBR
                                
    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.EliminarItemEnTmpDetalleHistPrecInv", Err.Description
End Sub

Public Sub EliminarTodoEnTmpDetalleHistPrecInv(ByVal lngCORRNBR As Long, Optional VarAux As Variant)
   
    Dim cmd As Command
    Dim con As Connection
    Dim strSQL As String

    On Error GoTo TrataError
    
    strSQL = " EXEC TMP_IN_PRICELEVELTEMDETDelTodoProc " & lngCORRNBR
                                
    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.EliminarTodoEnTmpDetalleHistPrecInv", Err.Description
End Sub

Public Sub ActualizaTemporal(ByVal lngCORRNBR As Long, ByVal strSIDE As String, ByVal intHOSENUMBER As Integer, ByVal dblSTARTREADING As Double, _
                             ByVal dblENDREADING As Double, ByVal dblQTYSALES As Double, ByVal dblQTYSERAF As Double, ByVal dblQTYOTHER As Double, ByVal dblTOTQTY As Double, Optional VarAux As Variant)
   
    Dim cmd As Command
    Dim con As Connection
    Dim strSQL As String

    On Error GoTo TrataError
    
    strSQL = " EXEC TMP_OP_CTRLTURNDETUpdProc " & lngCORRNBR & ",'" & strSIDE & "'," & intHOSENUMBER & "," & dblSTARTREADING & "," & _
                                                dblENDREADING & "," & dblQTYSALES & "," & dblQTYSERAF & "," & dblQTYOTHER & "," & dblTOTQTY
                                
    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.ActualizaTemporal", Err.Description
End Sub

Public Function SeleccionaEnTemporalDetControlTurno(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 TMP_OP_CTRLTURNDET.SIDE AS Cara,TMP_OP_CTRLTURNDET.HOSENUMBER as Manguera,DESCR as Articulo,STARTREADING AS Inicial,ENDREADING as Final,QTYSALES as Venta,QTYSERAF as Serafin,QTYOTHER as Otros,TOTQTY as Total " & _
             " FROM TMP_OP_CTRLTURNDET JOIN OP_SIDE_FUEL " & _
             " ON TMP_OP_CTRLTURNDET.INVTIDBARR=OP_SIDE_FUEL.INVTIDBARR AND TMP_OP_CTRLTURNDET.SIDE=OP_SIDE_FUEL.SIDE AND TMP_OP_CTRLTURNDET.HOSENUMBER=OP_SIDE_FUEL.HOSENUMBER " & _
             " WHERE CORRNBR=" & lngCORRNBR
    
    Set rs = New Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
        
    Set SeleccionaEnTemporalDetControlTurno = 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.SeleccionaEnTemporalDetControlTurno", Err.Description

End Function

Public Function SeleccionTemporal(ByVal strSITEID As String, ByVal datDATEPROCE As Date, ByVal intNUMBERTURN As Integer, ByVal strSALESPERID As String, Optional VarAux As Variant) As ADODB.Recordset

    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " SELECT Cara,Manguera,Articulo,0 AS Inicial,0 as Final,0 as Venta,0 as Serafin,0 as Otros,0 as Total" & _
             " FROM VW_TURNOS_VENDEDOR " & _
             " WHERE DATEPROCE='" & Format(datDATEPROCE, "DD/MM/YYYY") & "' AND SITEID='" & strSITEID & "' AND NUMBERTURN=" & intNUMBERTURN & " and SALESPERID='" & strSALESPERID & "'"
    
    Set rs = New Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
        
    Set SeleccionTemporal = 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.SeleccionTemporal", Err.Description

End Function


Public Function SeleccionaEnDetalle(ByVal strSITEID As String, ByVal lngBATNBRTURN As Long, 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 OP_CTRLTURNDET.SIDE AS Cara,OP_CTRLTURNDET.HOSENUMBER as Manguera,DESCR as Articulo,STARTREADING AS Inicial,ENDREADING as Final,QTYSALES as Venta,QTYSERAF as Serafin,QTYOTHER as Otros,TOTQTY as Total " & _
             " FROM OP_CTRLTURNDET JOIN OP_SIDE_FUEL " & _
             " ON OP_CTRLTURNDET.INVTIDBARR=OP_SIDE_FUEL.INVTIDBARR AND OP_CTRLTURNDET.SIDE=OP_SIDE_FUEL.SIDE AND OP_CTRLTURNDET.HOSENUMBER=OP_SIDE_FUEL.HOSENUMBER " & _
             " WHERE OP_CTRLTURNDET.SITEID='" & strSITEID & "' AND BATNBRTURN=" & lngBATNBRTURN
    
    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_INV_MOVIMIENTOS.SeleccionaEnDetalle", Err.Description

End Function

Public Function SeleccionaEnCabecera(ByVal strSITEID As String, ByVal lngBATNBRTURN As Long, Optional VarAux As Variant) As ADODB.Recordset
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " SELECT * " & _
             " FROM OP_CTRLTURN WHERE SITEID='" & strSITEID & "' AND BATNBRTURN=" & lngBATNBRTURN
    
    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_INV_MOVIMIENTOS.SeleccionaEnCabecera", Err.Description

End Function

Public Function CargaVendedores(ByVal strSITEID As String, ByVal datDATEPROCE As Date, ByVal intNUMBERTURN As Integer, Optional VarAux As Variant) As ADODB.Recordset
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    strSQL = " SELECT DISTINCT SALESPERID,SALESPERNAME FROM VW_TURNOS_VENDEDOR " & _
             " WHERE DATEPROCE='" & Format(datDATEPROCE, "DD/MM/YYYY") & "' AND SITEID='" & strSITEID & "' AND NUMBERTURN=" & intNUMBERTURN

    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenStatic
        
    Set CargaVendedores = 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.CargaVendedores", 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 ObtieneLecturaInicial(ByVal strSITEID As String, ByVal datDATEPROCE As Date, _
                                      ByVal intNUMBERTURN As Integer, ByVal strSIDE As String, _
                                      ByVal intHOSENUMBER As Integer, Optional VarAux As Variant) As Double
    Dim strSQL As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    ObtieneLecturaInicial = 0
    
    strSQL = " SELECT ENDREADING  FROM OP_CTRLTURNDET " & _
             " WHERE DATEPROCES='" & Format(datDATEPROCE, "DD/MM/YYYY") & "' AND SITEID='" & strSITEID & "' AND NBRTUR=" & intNUMBERTURN & " AND SIDE='" & strSIDE & "' AND HOSENUMBER=" & intHOSENUMBER

    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenStatic
        
    If rs.RecordCount > 0 Then
        ObtieneLecturaInicial = rs!ENDREADING
    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 ListarContometros(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 OP_CTRLTURN.SITEID as Almacen,BATNBRTURN as Contom,OP_CTRLTURN.SALESPERID as CodVendedor,SALESPERNAME AS Vendedor,DATEPROCES as Fech_Proc,NBRTUR as Turno,CASE STATUS " & _
                 " WHEN 1 THEN 'CERRADO' WHEN 0 THEN 'NO CERRADO' END AS Estado " & _
                 " FROM OP_CTRLTURN INNER JOIN OP_SALESPERSON " & _
                 " ON OP_CTRLTURN.SALESPERID=OP_SALESPERSON.SALESPERID " & _
                 " WHERE DATEPROCES>='" & Format(datFECHAINI, "DD/MM/YYYY") & "' AND DATEPROCES<='" & Format(datFECHAFIN, "DD/MM/YYYY") & "'"
    Else
        
        strSQL = " SELECT OP_CTRLTURN.SITEID as Almacen,BATNBRTURN as Contom,OP_CTRLTURN.SALESPERID as CodVendedor,SALESPERNAME AS Vendedor,DATEPROCES as Fech_Proc,NBRTUR as Turno,CASE STATUS " & _
                 " WHEN 1 THEN 'CERRADO' WHEN 0 THEN 'NO CERRADO' END AS Estado " & _
                 " FROM OP_CTRLTURN INNER JOIN OP_SALESPERSON " & _
                 " ON OP_CTRLTURN.SALESPERID=OP_SALESPERSON.SALESPERID " & _
                 " WHERE DATEPROCES>='" & Format(datFECHAINI, "DD/MM/YYYY") & "' AND DATEPROCES<='" & Format(datFECHAFIN, "DD/MM/YYYY") & "' AND OP_CTRLTURN.SITEID='" & strSITEID & "'"
        
    End If


    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open strSQL, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
            
    Set ListarContometros = 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.ListarContometros", 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
