diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index e3f903e99..c20de80e8 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -789,7 +789,6 @@ Public Class ClsContabilidad
#Region " C O N T A B I L I D A D - P R E P O L I Z A - D E T A L L E "
Public Function GetPlantillaConceptos(CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_GetPlantilla")
@@ -812,7 +811,6 @@ Public Class ClsContabilidad
End Function
Public Function GetPrePolizaOriginal(TipoMovimiento As Integer, CveMovimiento As Integer) As Boolean 'Editado por charlie
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_GetPrePolizaOriginal")
@@ -835,7 +833,6 @@ Public Class ClsContabilidad
End Function
Public Function PrePolizaUnificacion(CvePrePoliza As Integer, CvePrePolizaVieja As Integer) As Boolean 'Editado por charlie
-
Dim Retorno As Boolean = False
SeUnifico = False
@@ -873,9 +870,7 @@ Public Class ClsContabilidad
End Function
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
-
Dim Retorno As Boolean = False
-
DataAdapter("PA_Conta_PrePolizasSimplificacion")
With SqlAdapter.SelectCommand.Parameters
@@ -896,7 +891,6 @@ Public Class ClsContabilidad
End Function
Public Function GetCuentaPrePoliza(Concepto As Integer, CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_IdCuentaPrePolizaGet")
@@ -920,7 +914,6 @@ Public Class ClsContabilidad
End Function
Public Function GetRetCuenta(Concepto As Integer, CveGeneral As Integer, Optional CveSubProyecto As Integer = -1) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_RetCuentaGet")
@@ -1233,7 +1226,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate")
@@ -1572,7 +1564,6 @@ Public Class ClsContabilidad
End Function
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_CuentaDobleContaGet")
@@ -1613,7 +1604,6 @@ Public Class ClsContabilidad
End Function
Public Function GetEncabezadoPrePoliza(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizaEncabezadoGet")
@@ -1654,7 +1644,6 @@ Public Class ClsContabilidad
End Function
Public Function GetCausacionesValores(CvePrePoliza As Integer) As Boolean 'Editado por charlie
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_CausacionesValoresGet")
@@ -3766,7 +3755,7 @@ Public Class ClsContabilidad
End Function
- Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
+ Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoGet")
@@ -3774,7 +3763,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
@@ -3793,8 +3782,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
- Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
+ Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
@@ -3802,7 +3790,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -3841,7 +3829,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
- 'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
Dim Retorno = False
@@ -3947,7 +3934,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
Public Function GetFlujoEfectivo2(FechaF As Date, Tipo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
@@ -3969,7 +3955,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
Public Function GetOrigenAplicacion(FechaI As String, FechaF As String, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean
Dim Retorno = False
@@ -4482,20 +4467,19 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer) As Boolean
+ Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
- .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
- .Add("@CveSubproyecto", SqlDbType.Int).Value = CveSubproyecto
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
- .Add("@Periodo", SqlDbType.Int).Value = Periodo
-
End With
Try
@@ -4936,25 +4920,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
- 'Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
- ' Dim Retorno As Boolean
-
- ' If TipoMovto = 0 Then
- ' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 1 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0}", IdCuenta, Ejercicio), CommandType.Text)
- ' Else
- ' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 0 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0} ", IdCuenta, Ejercicio), CommandType.Text)
- ' End If
-
- ' Try
- ' SqlAdapter.Fill(Data)
- ' 'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
- ' Retorno = True
- ' Catch ex As Exception
- ' Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- ' End Try
-
- ' Return Retorno
- 'End Function
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As Date, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, CveTipoGasto As Integer, Gpo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_PresupuestosEgresosSaldosRep")
@@ -5603,7 +5568,7 @@ Public Class ClsContabilidad
#End Region
#Region "A N E X O - D E L - C A T A L O G O"
- Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean
+ Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogo")
@@ -5611,7 +5576,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -5627,7 +5592,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
+ Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AuxiliarCatalogo")
@@ -5635,7 +5600,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
@@ -5677,12 +5642,12 @@ Public Class ClsContabilidad
End Function
#End Region
- Public Function AddSiguienteCuentaHijo(IdCuentaPadre As Integer, NombreCuenta As String, CveEmpresa As Integer, Optional Tipo As String = "A", Optional CuentaMayor As Integer = 2, Optional IdMoneda As Integer = 1, Optional IdAgrupadorSAT As Integer = -1) As Integer
+ Public Function AddSiguienteCuentaHijo(CveCuentaPadre As Integer, NombreCuenta As String, CveEmpresa As Integer, Optional Tipo As String = "A", Optional CuentaMayor As Integer = 2, Optional IdMoneda As Integer = 1, Optional IdAgrupadorSAT As Integer = -1) As Integer
Dim CodigoCuenta As New StringBuilder
Dim Retorno As Integer = -1
Dim Segmentos() As String = Nothing
- If GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=IdCuentaPadre) Then
+ If GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=CveCuentaPadre) Then
If DtResultados.Rows.Count > 0 Then
'Cuando ya tiene cuentas hijas
@@ -5699,7 +5664,7 @@ Public Class ClsContabilidad
Else
'Cuando es el primero hijo de la cuenta
'obtengo el codigo del padre
- If GetCuentas(IdCuentaPadre, "-1", -1, CveEmpresa) Then
+ If GetCuentas(CveCuentaPadre, "-1", -1, CveEmpresa) Then
Segmentos = Split(DtResultados.MAX("CuentaFormato"), "-")
'recorro para poner el primer digito en el siguiente segmento al que halla tenido valor > 0
For i As Integer = 0 To Segmentos.Length - 1 Step 1
@@ -5718,7 +5683,7 @@ Public Class ClsContabilidad
CodigoCuenta.Append(Segmentos(i)) 'une tokens
Next
- Retorno = AddCuenta(IdCuentaPadre, CodigoCuenta.ToString, NombreCuenta, Tipo, CuentaMayor, 0, IdMoneda, CveAgrupadorSAT:=IdAgrupadorSAT)
+ Retorno = AddCuenta(CveCuentaPadre, CodigoCuenta.ToString, NombreCuenta, Tipo, CuentaMayor, 0, IdMoneda, CveAgrupadorSAT:=IdAgrupadorSAT)
Return Retorno
End Function
@@ -6678,32 +6643,6 @@ Public Class ClsContabilidad
- Public Function GetAnexoCatalogoMensualHorizontal(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
- Dim Retorno = False
-
- DataAdapter("PA_Conta2_AnexoCatalogoMensualHorizontalGet")
-
- With SqlAdapter.SelectCommand.Parameters
- .Add("@FechaI", SqlDbType.Date).Value = FechaI
- .Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
- .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
- .Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
- .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
- .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@SAT", SqlDbType.Int).Value = SAT
- End With
-
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- Me.OnError("Ocurrió un error al obtener el Anexo del Catalogo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
-
- Return Retorno
- End Function
-
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean
Dim Retorno = False
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 36e99b747..22faff267 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -116,23 +116,6 @@ Public Class ClsMovimientos
End Sub
#Region "CxC"
- 'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
- ' Dim Retorno As Boolean = False
- ' 'Data = New DataTable
- ' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
- ' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
- ' DataAdapter("PA_ClienteCxC")
- ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
-
- ' Try
- ' SqlAdapter.Fill(Data)
- ' Retorno = True
- ' Catch ex As SqlException
- ' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
- ' End Try
-
- ' Return Retorno
- 'End Function
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False
diff --git a/Contabilidad2/RepAnexoCatalogoCC.aspx b/Contabilidad2/RepAnexoCatalogoCC.aspx
index 0b43246e7..d459f114b 100644
--- a/Contabilidad2/RepAnexoCatalogoCC.aspx
+++ b/Contabilidad2/RepAnexoCatalogoCC.aspx
@@ -63,52 +63,62 @@