diff --git a/App_Code/Notificaciones.vb b/App_Code/Notificaciones.vb index e6c5a9ab4..a0e44a996 100644 --- a/App_Code/Notificaciones.vb +++ b/App_Code/Notificaciones.vb @@ -1,75 +1,75 @@ -Option Strict Off -Imports System.Collections.Concurrent -Imports Extensiones -Imports Microsoft.AspNet.SignalR - -Public Enum TipoNotificacion As Integer - - ToastInformacion = 5 'succes - ToastInformacionB = 6 'info - ToastError = 7 'error - ToastAdventencia = 8 'Warning - - AlertaVentana = 2 - AlertaVentanaNoOcultar = 1 -End Enum -Public Class Notificaciones +Option Strict Off +Imports System.Collections.Concurrent +Imports Extensiones +Imports Microsoft.AspNet.SignalR + +Public Enum TipoNotificacion As Integer + + ToastInformacion = 5 'succes + ToastInformacionB = 6 'info + ToastError = 7 'error + ToastAdventencia = 8 'Warning + + AlertaVentana = 2 + AlertaVentanaNoOcultar = 1 +End Enum +Public Class Notificaciones Inherits Hub - Public Shared UsuariosConexiones As ConcurrentDictionary(Of String, String) = New ConcurrentDictionary(Of String, String) - + Public Shared UsuariosConexiones As ConcurrentDictionary(Of String, String) = New ConcurrentDictionary(Of String, String) + Public Overrides Function OnConnected() As System.Threading.Tasks.Task - NotificarConexion() - Return MyBase.OnConnected() - End Function - - Public Overrides Function OnReconnected() As System.Threading.Tasks.Task - NotificarConexion() - Return MyBase.OnReconnected() - End Function - Public Overrides Function OnDisconnected(stopCalled As Boolean) As Threading.Tasks.Task - Return MyBase.OnDisconnected(stopCalled) + NotificarConexion() + Return MyBase.OnConnected() End Function - Public Sub NotificarConexion() - If Context.User.Identity.IsAuthenticated Then - Dim ConnectionId As String = Context.ConnectionId - Dim CveUsuario As String = Context.User.Identity.Name - If UsuariosConexiones.ContainsKey(CveUsuario) Then - If UsuariosConexiones(CveUsuario) <> Context.ConnectionId Then - UsuariosConexiones.TryUpdate(CveUsuario, Context.ConnectionId, UsuariosConexiones(CveUsuario)) - End If - Else - If CveUsuario.ToEntero > 0 Then - UsuariosConexiones.TryAdd(CveUsuario, ConnectionId) - End If - End If - End If + Public Overrides Function OnReconnected() As System.Threading.Tasks.Task + NotificarConexion() + Return MyBase.OnReconnected() + End Function + Public Overrides Function OnDisconnected(stopCalled As Boolean) As Threading.Tasks.Task + Return MyBase.OnDisconnected(stopCalled) + End Function + + Public Sub NotificarConexion() + If Context.User.Identity.IsAuthenticated Then + Dim ConnectionId As String = Context.ConnectionId + Dim CveUsuario As String = Context.User.Identity.Name + If UsuariosConexiones.ContainsKey(CveUsuario) Then + If UsuariosConexiones(CveUsuario) <> Context.ConnectionId Then + UsuariosConexiones.TryUpdate(CveUsuario, Context.ConnectionId, UsuariosConexiones(CveUsuario)) + End If + Else + If CveUsuario.ToEntero > 0 Then + UsuariosConexiones.TryAdd(CveUsuario, ConnectionId) + End If + End If + End If End Sub - Public Sub TestMessage(message As String) - Clients.All.testMessage(message) - End Sub - - Public Sub AlertaVentana(Message As String, Para As String, Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) - Dim lPara As New List(Of String) - lPara.Add(Para) - AlertaVentana(Message, lPara, Titulo, timeoutseconds, Tipo) - End Sub - Public Sub AlertaVentana(Message As String, Para As List(Of String), Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) - If (Para IsNot Nothing) AndAlso Para.Count > 0 Then - Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients - Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds) - End If - End Sub - -End Class -Public Class MyhubUserIdProvider - Implements IUserIdProvider - - - Private Function IUserIdProvider_GetUserId(request As IRequest) As String Implements IUserIdProvider.GetUserId - Dim userId = Decripta(request.User.Identity.Name) 'MyCustomUserClass.FindUserId(request.User.Identity.Name) - Return userId.ToString() - End Function -End Class + Public Sub TestMessage(message As String) + Clients.All.testMessage(message) + End Sub + + Public Sub AlertaVentana(Message As String, Para As String, Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) + Dim lPara As New List(Of String) + lPara.Add(Para) + AlertaVentana(Message, lPara, Titulo, timeoutseconds, Tipo) + End Sub + Public Sub AlertaVentana(Message As String, Para As List(Of String), Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) + If (Para IsNot Nothing) AndAlso Para.Count > 0 Then + Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients + Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds) + End If + End Sub + +End Class +Public Class MyhubUserIdProvider + Implements IUserIdProvider + + + Private Function IUserIdProvider_GetUserId(request As IRequest) As String Implements IUserIdProvider.GetUserId + Dim userId = Decripta(request.User.Identity.Name) 'MyCustomUserClass.FindUserId(request.User.Identity.Name) + Return userId.ToString() + End Function +End Class diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8449953e1..2beb02694 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3594,9 +3594,14 @@ Partial Class Compras_Compras End If End If +<<<<<<< HEAD CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) + CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) + CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) +>>>>>>> GDiaz 2024.05.21 + LbAgregar.Enabled = True UpPSS.Update() UpPS.Update() @@ -3642,26 +3647,31 @@ Partial Class Compras_Compras PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago End If +<<<<<<< HEAD +======= + + +>>>>>>> GDiaz 2024.05.21 Else Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) End If - Else - Alert("Ocurrió un error al consultar el proveedor.", TipoMensaje.MsgError) - End If +<<<<<<< HEAD +======= +>>>>>>> GDiaz 2024.05.21 If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then - If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then - If ObjProveedor.DtResultados.Rows.Count > 0 Then - Me.RequiereEvaluacion = ObjProveedor.DtResultados.Rows(0)("RequiereEvaluacion").ToString() = "1" - Me.CveUsuarioEvaluador = ObjProveedor.DtResultados.Rows(0)("CveUsuarioEvaluador").ToString().ToEntero() + If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then + If ObjProveedor.DtResultados.Rows.Count > 0 Then + Me.RequiereEvaluacion = ObjProveedor.DtResultados.Rows(0)("RequiereEvaluacion").ToString() = "1" + Me.CveUsuarioEvaluador = ObjProveedor.DtResultados.Rows(0)("CveUsuarioEvaluador").ToString().ToEntero() + End If + End If End If - End If - End If - ObjProveedor.Dispose() + ObjProveedor.Dispose() End Sub Private Sub CargaAnticipos(CveProveedor As Integer, Optional FiltroTipo As String = "-1") diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index a0173309e..6e0db8830 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -155,7 +155,7 @@
- + @@ -335,7 +335,7 @@ Concepto <%----%> - + @@ -1203,9 +1203,17 @@ } + + function valorIE() { } + + function asignaConcepto() { + let valor = $('#TxtConcepto').val(); + $('input[type="text"].selTxtConcepto').val(valor); + } + diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index a674fcf26..708c7219a 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -191,6 +191,12 @@ + +
  • + Cobros en Transcurso +
  • + +
  • Estado de Caja
  • @@ -315,7 +321,7 @@ CssClass="btn btn-circle btn-sm blue" Text="" ToolTip="Imprimir" OnClick="LnkImprimir_Click" Visible="false" />   - + @@ -952,6 +958,46 @@
    + + + + + diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 42949077a..eb52f60bb 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -1099,4 +1099,26 @@ Partial Class Ventas_PVCobranza #End Region + + Protected Sub LnkCobrosEnTranscurso_Click(sender As Object, e As EventArgs) + + Dim ObjMovtos As New ClsMovimientos() + Dim FechaI, FechaF As Date + + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1) + + If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, FechaI, FechaF) Then + + Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND CveUsuarioCobranza > 0 ") + GvModalCobrosEnTranscurso.DataSource = dtt + + End If + + ObjMovtos.Dispose() + GvModalCobrosEnTranscurso.DataBind() + UpDVModalCobrosEnTranscurso.Update() + RegistraScript("$('#DVModalCobrosEnTranscurso').modal('show');") + + End Sub End Class