diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 7be58e7ef..952337c9a 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -3871,7 +3871,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0, Optional NivelCuenta As Integer = -1) As Boolean + Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Sat As Integer = 0, Optional NivelCuenta As Integer = -1) As Boolean Dim Retorno = False @@ -3882,6 +3882,7 @@ Public Class ClsContabilidad .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@TipoCuentas", SqlDbType.Int).Value = TipoCuentas .Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@SAT", SqlDbType.Int).Value = Sat @@ -6567,7 +6568,7 @@ Public Class ClsContabilidad #Region "ESTADO RESULTADOS HORIZONTAL" - Public Function GetEstadosMensual(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosMensual(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) As Boolean Dim Retorno = False DataAdapter("PA_Conta2_EstadoResultadosMensual") @@ -6576,6 +6577,7 @@ Public Class ClsContabilidad .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario @@ -6595,7 +6597,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosMensualHorizontal(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) As Boolean Dim Retorno = False DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal") @@ -6604,6 +6606,7 @@ Public Class ClsContabilidad .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario @@ -6652,7 +6655,7 @@ Public Class ClsContabilidad End Function - Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean + 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 DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal") @@ -6661,6 +6664,7 @@ Public Class ClsContabilidad .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario @@ -6682,7 +6686,7 @@ Public Class ClsContabilidad End Function - Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosSubProyectoHorizontal(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) As Boolean Dim Retorno = False DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal") @@ -6691,6 +6695,7 @@ Public Class ClsContabilidad .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 10c90cc59..d24033dfe 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1576,7 +1576,7 @@ Public Class ClsGenerales Return Retorno End Function - Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer, + Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1, Optional ConceptoCIE As String = "-1") As Boolean @@ -1585,6 +1585,7 @@ Public Class ClsGenerales DataAdapter("PA_Gral_CuentasDepositosAdd") With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal @@ -1626,14 +1627,16 @@ Public Class ClsGenerales Return Retorno End Function - Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean + Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, CveEmpresa As Integer, CveUsuarioModifico As Integer) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Gral_CuentasDepositosRemove") - - SqlAdapter.SelectCommand.Parameters.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito - SqlAdapter.SelectCommand.Parameters.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico - + DataAdapter("PA_Gral_CuentasDepositosRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + End With + Try SqlAdapter.Fill(Data) Retorno = True @@ -1655,8 +1658,9 @@ Public Class ClsGenerales DataAdapter("PA_Gral_CuentasDepositosPersonalUpdate") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre .Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta .Add("@CLABE", SqlDbType.VarChar).Value = CLABE @@ -1685,14 +1689,15 @@ Public Class ClsGenerales End Function Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, - RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "", + RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, CveEmpresa As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1, Optional ConceptoCIE As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_CuentasDepositosUpdate") - With SqlAdapter.SelectCommand.Parameters + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre .Add("@Plaza", SqlDbType.VarChar).Value = Plaza .Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 990afa21c..3360ec10d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -577,7 +577,7 @@ Public Class ClsPaginas Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}" If HttpContext.Current.Application(AppNombre) Is Nothing Then Using ObjProveedoresBancos As New ClsGenerales - If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-1, CveCliente:=-2, CvePersonal:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados + If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados End Using End If Dim filtros As New List(Of String) @@ -602,7 +602,7 @@ Public Class ClsPaginas Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}" If Application(AppNombre) Is Nothing Then Dim P As New ClsGenerales - If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-1, CveProveedor:=-2, CvePersonal:=-2) Then Application(AppNombre) = P.DtResultados + If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados P.Dispose() End If Dim Str As New StringBuilder diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index fd28a8ce2..7ae3fd769 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -3099,7 +3099,7 @@ Partial Class Compras_Proveedores If CveProveedor > 0 Then Dim ObjCuentasBancos As New ClsGenerales - If ObjCuentasBancos.GetCuentasDepositos(CveProveedor, CveCliente:=-2, CvePersonal:=-2, CveEmpresa:=UsuarioActual.CveEmpresa) Then + If ObjCuentasBancos.GetCuentasDepositos(CveProveedor, CveEmpresa:=UsuarioActual.CveEmpresa) Then DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados) Else Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia) @@ -3258,7 +3258,7 @@ Partial Class Compras_Proveedores If CveProveedor > 0 Then Dim ObjCuentasBancos As New ClsGenerales If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, - False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, + False, Estatus, CveMoneda, UsuarioActual.CveEmpresa, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor))) @@ -3389,7 +3389,7 @@ Partial Class Compras_Proveedores Dim ObjCuentasBancos As New ClsGenerales If CveProveedor > 0 Then - If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero) Then + If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor))) @@ -6115,7 +6115,7 @@ Partial Class Compras_Proveedores Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs) If ChkPagoElectronico.Checked Then - Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la platoforma", TipoMensaje.MsgAdvertencia) + Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia) End If End Sub diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx index 91061853e..faff6a40a 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ b/Contabilidad2/RepBalanzaComprobacion.aspx @@ -76,10 +76,16 @@