diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb index d4f4ec8be..3ef308c1f 100644 --- a/App_Code/ClsSisNotificaciones.vb +++ b/App_Code/ClsSisNotificaciones.vb @@ -150,6 +150,11 @@ Public Class ClsSisNotificaciones #End Region #Region "N O T I F I C A C I O N E S" + Public Shared Sub EnviarAlerta(Titulo As String, Mensaje As String, CveUsuario As String, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar, Optional TimeOut As Integer = 0) + Dim hub = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)() + hub.Clients.Client(Notificaciones.UsuariosConexiones(CveUsuario)).alertaVentana(Titulo, Mensaje, DirectCast(Tipo, Integer), TimeOut) + End Sub + Public Sub DispararNotificacion(CveNotificacion As Integer, CvesFiltro As List(Of Object), CveEmpresa As Integer) _CveNotificacion = CveNotificacion @@ -1814,7 +1819,7 @@ Public Class ClsSisNotificaciones 'Next Dim lista As New List(Of String) lista.Add(CveUsuario.ToString()) - Notificaciones.AlertaVentana(Mensaje, lista, Titulo, timeoutseconds) + 'Notificaciones.AlertaVentana(Mensaje, lista, Titulo, timeoutseconds) End Sub 'Public Sub SendNotificacionGPS(context As IHubContext, CveUsuario As Integer, JsonParams As String) ' context.Clients.All.DisparaNotificacionUsuario(CveUsuario,) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index d99ea6bc6..594d3d247 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -751,6 +751,22 @@ Public Class ClsVentas Return Retorno End Function + Public Function UpdateVentaAnticipoAutorizado(CveVenta As Integer, Autorizado As Boolean) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentaAnticipoAutorizadoUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@Autorizado", SqlDbType.Bit).Value = Autorizado + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar el estatus del anticipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function UpdateFechaVencimientoVenta(CveVenta As Integer, FechaVencimiento As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasFechaVencimientoUpdate") diff --git a/App_Code/Notificaciones.vb b/App_Code/Notificaciones.vb index ef5e9cd67..e6c5a9ab4 100644 --- a/App_Code/Notificaciones.vb +++ b/App_Code/Notificaciones.vb @@ -1,4 +1,5 @@ Option Strict Off +Imports System.Collections.Concurrent Imports Extensiones Imports Microsoft.AspNet.SignalR @@ -13,36 +14,55 @@ Public Enum TipoNotificacion As Integer AlertaVentanaNoOcultar = 1 End Enum Public Class Notificaciones - Inherits Hub - Public Overrides Function OnConnected() As System.Threading.Tasks.Task + Inherits Hub + + 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 + 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 + 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 Shared Sub AlertaVentana(Message As String, Para As String, Optional Titulo As String = "", Optional timeoutseconds As Integer = 5, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar) + 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 Shared 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) + 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 - 'Public Shared 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) - ' Dim Clients As Hubs.IHubConnectionContext(Of Object) = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)().Clients - ' Clients.Users(Para).AlertaVentana(Titulo, Message, DirectCast(Tipo, Integer), timeoutseconds) - 'End Sub End Class Public Class MyhubUserIdProvider Implements IUserIdProvider diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index ec3f491a6..518ea5655 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -37,6 +37,9 @@ +
  • + Imprimir Poliza +
  • <%--
  • Imprimir
  • --%> @@ -151,10 +154,14 @@
    + + +
    - +
    @@ -172,16 +179,22 @@
    - +
    - - + + + + + + +
    diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 9551eba19..805486a15 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -38,6 +38,9 @@ Partial Class Bancos_DepositosCaja BtnConsultar.Attributes.Add("onclick", "Consultar(this);") BtnDepositar.Attributes.Add("onclick", "Depositar(this);") + Dim StrEncriptPrueba As String = Encripta($"OP=DC&CveIE={2784391}&CuentaCaja={"TestCuantaCaja"}&CuentaDepo={"Test cuenta"}") + HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={StrEncriptPrueba}" + End If End Sub @@ -350,9 +353,9 @@ Partial Class Bancos_DepositosCaja If Not OcurrioError AndAlso ChkCuentaRetorno.Checked Then CveTransaccionBanco = 13 FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco) - CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Retorno Depósito Bancario", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Retorno Depósito Bancario", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, "", "Retorno", CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, "", "Retorno", CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then OcurrioError = True End If End If @@ -403,6 +406,8 @@ Partial Class Bancos_DepositosCaja documentos += String.Format("Imprimir {1}
    ", StrEncript, "Depósito Bancario") + + End If If Not OcurrioError AndAlso ObjConta.ValidacionesPrePoliza(NuevaCvePrePoliza, UsuarioActual, Opcion:=1) Then diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index b91ea0f79..14c0c445b 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -747,9 +747,7 @@ Partial Class Bancos_IE RBL.Items.Add(New ListItem("Acreedores Diversos", "AC")) End If - - - If TabCancelacion.Visible Then + If TabCancelacion.Visible Or TxtFolio.Text.Contains("_C") Then LnkCancelar.Visible = False End If @@ -775,11 +773,7 @@ Partial Class Bancos_IE ' LnkCancelarComplemento.Visible = False ' LnkCancelarComplementoImporte.Visible = False - - ' UppEliminarIE.Update() - - 'End If DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion IN (2,3)") diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 40f373a8a..edfe9bbf0 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -399,7 +399,7 @@ Partial Class PopUpVerFactura Dim archivoBinario As Byte() = StreamPDF(rutardlc, lrds, params, "Inventario", formato) Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = archivoBinario, .NombreArchivo = String.Format("Inventario {0}.pdf", fechas)}) + LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.archivoBinario = archivoBinario, .NombreArchivo = String.Format("Inventario {0}.pdf", fechas)}) Dim Mail As New ClsSisMail() @@ -1610,7 +1610,9 @@ Partial Class PopUpVerFactura If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then DtMetodosPago = DtCortesVentasResumen.FiltraParametros("MetodoPago <> 'Crédito'") End If + Dim DirFormato As String = "Empresas/Grales/Formatos/RepCortes.rdlc" + If File.Exists(UsuarioActual.Empresa.Ruta + "\Formatos\RepCortes.rdlc") Then DirFormato = UsuarioActual.Empresa.Ruta + "\Formatos\RepCortes.rdlc" End If @@ -5380,6 +5382,15 @@ Partial Class PopUpVerFactura If ObjIE.GetBancosIEMovimientosDepositos(CveIE, UsuarioActual.CveEmpresa) Then Tabla = ObjIE.DtResultados.Copy() End If + + Dim TipoTransaccion As String = "" + Dim Observaciones As String = "" + + If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then + TipoTransaccion = ObjIE.TipoTransaccion + Observaciones = ObjIE.Observaciones + End If + ObjIE.Dispose() If Tabla IsNot Nothing AndAlso Tabla.Rows.Count > 0 Then @@ -5390,6 +5401,8 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CuentaCaja", CuentaCaja)) params.Add(New ReportParameter("CuentaDeposito", CuentaDeposito)) params.Add(New ReportParameter("TipoPago", TipoPago)) + params.Add(New ReportParameter("TipoTransaccion", TipoTransaccion)) + params.Add(New ReportParameter("Observaciones", Observaciones)) If Archivo.Exists Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) @@ -5760,7 +5773,7 @@ Partial Class PopUpVerFactura dtMovs = ObjIE.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312,292 )") If dtMovs IsNot Nothing AndAlso dtMovs.Rows.Count > 0 Then - CvePrePoliza = dtMovs.Rows(0)("CVePrePoliza").ToString.ToEntero + CvePrePoliza = dtMovs.Rows(0)("CvePrePoliza").ToString.ToEntero If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 96c557d53..a0173309e 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -288,7 +288,7 @@
    -
    +
    @@ -310,6 +310,7 @@
    +
    Concepto + <%----%> diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index ff9018951..f3cc6a70e 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1,4 +1,7 @@ Imports System.Data +Imports System.Runtime.CompilerServices +Imports System.Runtime.Remoting + 'Imports DocumentFormat.OpenXml Imports Extensiones Imports GemBox.Spreadsheet @@ -409,6 +412,7 @@ Partial Class ContabilidadC_RegPrePolizaS .Add("EsMonedaExtranjera", Type.GetType("System.Boolean")) .Add("TC", Type.GetType("System.Decimal")) .Add("CvePrePoliza", Type.GetType("System.Int32")) + .Add("CveMovimientoAlmacen", Type.GetType("System.Int32")) End With @@ -429,6 +433,7 @@ Partial Class ContabilidadC_RegPrePolizaS DtMovimientosEliminar.AcceptChanges() End Sub Private Function CargaPrePoliza(tCvePrePoliza As Integer) As Boolean + HplImprimirPDF.Visible = False Dim retorno As Boolean = False Dim ObjContabilidad As New ClsContabilidad If ObjContabilidad.GetPrePoliza(tCvePrePoliza, UsuarioActual.CveEmpresa) Then @@ -453,8 +458,7 @@ Partial Class ContabilidadC_RegPrePolizaS TxtFechaelaboracion.ToolTip = dr("FechaIng").ToString.ToDate.ToString("HH:mm:ss") CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero DdlPlantilla.SelectedValueExist(CvePlantillaPoliza) - HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}" - HplImprimirPDF.Visible = True + If UsuarioActual.CveRol = 1 Then TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then @@ -528,6 +532,23 @@ Partial Class ContabilidadC_RegPrePolizaS RegistraScript("comparar();") LnkExcel.Visible = False + + Dim CveIE As Integer = DtMovimientos.FiltroPrimeroValor("CveIE", " CveIE > 0 ").ToEntero + + If UsuarioActual.Empresa.Funcionalidad(382).ToEntero = 1 AndAlso CveIE > 0 Then + + Dim StrEncript As String = Encripta($"OP=ImprimeMov&CveIE={CveIE}") + 'HplListaProveedores.NavigateUrl = String.Format($"/Compras/PopUpVerFactura.aspx?P={StrEncript}", ) + + HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={StrEncript}" + HplImprimirPDF.Visible = True + Else + HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}" + HplImprimirPDF.Visible = True + End If + + + Else Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia) BtnEliminar.Visible = False @@ -792,7 +813,7 @@ Partial Class ContabilidadC_RegPrePolizaS GvMov.DataSource = DtMovimientos GvMov.DataBind() - GvPrePoliza.DataBind() ''limpio el grid + GvPrePoliza.DataBind() UpPrePoliza.Update() UPMovs.Update() @@ -813,7 +834,7 @@ Partial Class ContabilidadC_RegPrePolizaS e.Row.FCTextBox("TxtAbono").Text = If(e.Row.DBCampo("Abono") = "0", "", e.Row.DBCampo("Abono")) e.Row.FCTextBox("TxtCargo").Text = If(e.Row.DBCampo("Cargo") = "0", "", e.Row.DBCampo("Cargo")) - e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Descripcion") + e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Concepto") If CvePeriodo > 0 Then e.Row.FCTextBox("TxtCargo").Enabled = False @@ -835,7 +856,8 @@ Partial Class ContabilidadC_RegPrePolizaS e.Row.FCDropDownList("DdlSubProyecto").Enabled = True e.Row.FCLinkButton("imgD").Visible = True Else - e.Row.FCDropDownList("DdlSubProyecto").Enabled = False + ' + 'e.Row.FCDropDownList("DdlSubProyecto").Enabled = False End If If e.Row.DBCampo("MultipleSubProyecto") = "True" Then @@ -1667,6 +1689,35 @@ Partial Class ContabilidadC_RegPrePolizaS End If End If + + If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + + Dim x As Integer = 0 + For Each gvRow As GridViewRow In GvMov.Rows + + + DtMovimientos.Rows(x)("ContadoTipoTransaccion") = gvRow.DataKey("ContadoTipoTransaccion").ToEntero + DtMovimientos.Rows(x)("ContadoCuenta") = gvRow.DataKey("ContadoCuenta").ToEntero + DtMovimientos.Rows(x)("ContadoNumeroFolio") = gvRow.DataKey("ContadoNumeroFolio") + DtMovimientos.Rows(x)("ContadoImporte") = gvRow.DataKey("ContadoImporte").ToDecimal + DtMovimientos.Rows(x)("ContadoBeneficiario") = gvRow.DataKey("ContadoBeneficiario") + DtMovimientos.Rows(x)("ContadoObservaciones") = gvRow.DataKey("ContadoObservaciones") + + DtMovimientos.Rows(x)("Concepto") = gvRow.FCTextBox("TxtConcepto").Text + DtMovimientos.Rows(x)("Cargo") = gvRow.FCTextBox("TxtCargo").Text.ToDecimal + DtMovimientos.Rows(x)("Abono") = gvRow.FCTextBox("TxtAbono").Text.ToDecimal + DtMovimientos.Rows(x)("TC") = gvRow.FCTextBox("TxtTC").Text.ToDecimal + DtMovimientos.Rows(x)("ImporteME") = gvRow.FCTextBox("TxtAbonoME").Text.ToDecimal + DtMovimientos.Rows(x)("CveSubProyecto") = gvRow.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero + + x = x + 1 + Next + DtMovimientos.AcceptChanges() + + + End If + + dr("CveCuenta") = DdlCuentaContableE.SelectedValue dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text @@ -1717,11 +1768,22 @@ Partial Class ContabilidadC_RegPrePolizaS End If DtMovimientos.AcceptChanges() - GvPrePoliza.EditIndex = -1 - GvPrePoliza.DataSource = DtMovimientos - GvPrePoliza.DataBind() - UpPrePoliza.Update() - GvPrePoliza.Visible = True + + If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + GvMov.DataSource = DtMovimientos + GvMov.DataBind() + GvPrePoliza.DataBind() + UpPrePoliza.Update() + UPMovs.Update() + Else + GvPrePoliza.EditIndex = -1 + GvPrePoliza.DataSource = DtMovimientos + GvPrePoliza.DataBind() + UpPrePoliza.Update() + GvPrePoliza.Visible = True + End If + + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero diff --git a/Empresas/Grales/Formatos/DepositoCaja.rdlc b/Empresas/Grales/Formatos/DepositoCaja.rdlc index 15daf66f2..7c269cc67 100644 --- a/Empresas/Grales/Formatos/DepositoCaja.rdlc +++ b/Empresas/Grales/Formatos/DepositoCaja.rdlc @@ -1,1089 +1,5 @@ - - - - - - - - 1.27645in - - - 0.96697in - - - 3.81815in - - - 0.98425in - - - 0.84873in - - - - - 0.25in - - - - - true - true - - - - - SerieFolio - - - - - - - Textbox1 - - - - DimGray - - 1pt - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox3 - - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cliente - - - - - - - Textbox5 - - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tipo Pago - - - - - - - Textbox9 - - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox10 - - - - DimGray - - 1pt - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.18in - - - - - true - true - - - - - =Fields!Referencia.Value - - - - - - - Referencia - - - - DimGray - - - DimGray - - - DimGray - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cliente.Value - - - - - - - Cliente - - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TipoPago.Value - - - - - - - TipoPago - - - - DimGray - - 1pt - - - DimGray - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!Importe.Value - - - - - - - DimGray - - - - DimGray - - - - DimGray - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - true - - - - - - - DataSet1 - 1.6342in - 0.43in - 7.89455in - - - - - - true - true - - - - - Fecha Impresion: - - - - - - - Textbox12 - 0.18203cm - 16.12812cm - 0.70936cm - 1.96203cm - 1 - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 0.18203cm - 18.09015cm - 0.70936cm - 1.60515cm - 2 - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - D E P O S I T O D E C A J A - - - - - - - Textbox8 - 1.26209cm - 3.07551cm - 0.5365cm - 13.01733cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Empresa.Value - - - - - - - Textbox8 - 0.092cm - 3.07551cm - 1.17009cm - 13.01733cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuenta de Caja: - - - - - - - Textbox12 - 2.15384cm - 0.12912cm - 0.53299cm - 3.11306cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CuentaCaja.Value - - - - - - - Textbox12 - 2.15384cm - 3.25543cm - 0.53299cm - 8.81574cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total: - - - - - - - Textbox2 - 5.31361cm - 15.35404cm - 0.6cm - 2.53175cm - 7 - - 0.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Sum(Fields!Importe.Value, "DataSet1") - - - - - 0.25pt - - - - - - DimGray - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuenta Deposito: - - - - - - - Textbox12 - 2.86322cm - 0.12912cm - 0.53299cm - 3.11306cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CuentaDeposito.Value - - - - - - - Textbox12 - 2.86322cm - 3.25543cm - 0.53299cm - 8.81574cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaIE.Value - - - - - - - Textbox12 - 2.15386cm - 13.94971cm - 0.70936cm - 2.14313cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - FECHA: - - - - - - - Textbox12 - 2.15386cm - 12.49038cm - 0.70936cm - 1.45933cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo Pago: - - - - - - - - - - - - - - - - Textbox12 - 3.44148cm - 0.12912cm - 0.53299cm - 3.12013cm - 13 - - =(Parameters!TipoPago.Value = "") - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoPago.Value - - - - - - - Textbox12 - 3.44148cm - 3.28453cm - 0.53299cm - 3.76632cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.09cm - - - - - 27.94cm - 21.59cm - 1cm - 0.5cm - 0.5cm - 0.5cm - 1.27cm - - - - + 0 @@ -1132,6 +48,1228 @@ + + + + + + + + + 1.27645in + + + 0.96697in + + + 3.81815in + + + 0.98425in + + + 0.84873in + + + + + 0.25in + + + + + true + true + + + + + SerieFolio + + + + + + + Textbox1 + + + + DimGray + + 1pt + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox3 + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cliente + + + + + + + Textbox5 + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo Pago + + + + + + + Textbox9 + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox10 + + + + DimGray + + 1pt + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.18in + + + + + true + true + + + + + =Fields!Referencia.Value + + + + + + + Referencia + + + + DimGray + + + DimGray + + + DimGray + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cliente.Value + + + + + + + Cliente + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoPago.Value + + + + + + + TipoPago + + + + DimGray + + 1pt + + + DimGray + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Importe.Value + + + + + + + DimGray + + + + DimGray + + + + DimGray + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + true + + + + + + + DataSet1 + 1.6342in + 0.43in + 7.89455in + + + + + + true + true + + + + + Fecha Impresion: + + + + + + + Textbox12 + 0.18203cm + 16.12812cm + 0.70936cm + 1.96203cm + 1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 0.18203cm + 18.09015cm + 0.70936cm + 1.60515cm + 2 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + D E P O S I T O D E C A J A + + + + + + + Textbox8 + 1.26209cm + 3.07551cm + 0.5365cm + 13.01733cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Empresa.Value + + + + + + + Textbox8 + 0.092cm + 3.07551cm + 1.17009cm + 13.01733cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuenta de Caja: + + + + + + + Textbox12 + 2.15384cm + 0.12912cm + 0.53299cm + 3.11306cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CuentaCaja.Value + + + + + + + Textbox12 + 2.15384cm + 3.25543cm + 0.53299cm + 8.81574cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total: + + + + + + + Textbox2 + 5.31361cm + 15.35404cm + 0.6cm + 2.53175cm + 7 + + 0.25pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Sum(Fields!Importe.Value, "DataSet1") + + + + + 0.25pt + + + + + + DimGray + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuenta Deposito: + + + + + + + Textbox12 + 2.86322cm + 0.12912cm + 0.53299cm + 3.11306cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CuentaDeposito.Value + + + + + + + Textbox12 + 2.86322cm + 3.25543cm + 0.53299cm + 8.81574cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaIE.Value + + + + + + + Textbox12 + 2.15386cm + 13.94971cm + 0.53297cm + 2.14313cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha: + + + + + + + Textbox12 + 2.15386cm + 12.24756cm + 0.53297cm + 1.70215cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Pago: + + + + + + + + + + + + + + + + Textbox12 + 3.44148cm + 0.12912cm + 0.53299cm + 3.12013cm + 13 + + =(Parameters!TipoPago.Value = "") + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoPago.Value + + + + + + + Textbox12 + 3.44148cm + 3.28453cm + 0.53299cm + 3.76632cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoTransaccion.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox12 + 2.86322cm + 12.24756cm + 0.53299cm + 2.76048cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Observaciones: + + + + + + + Textbox12 + 6.01944cm + 0.14177cm + 0.53299cm + 2.58822cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.75146cm + + + + + 27.94cm + 21.59cm + 1cm + 0.5cm + 0.5cm + 0.5cm + 1.27cm + + + + + + String @@ -1168,6 +1306,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + Cm 8ca56a24-e4cd-4986-9105-84383a48863b diff --git a/Scripts/Notificaciones.js b/Scripts/Notificaciones.js index ea40c5c57..f2b9ec0b0 100644 --- a/Scripts/Notificaciones.js +++ b/Scripts/Notificaciones.js @@ -14,16 +14,16 @@ var NotificacionesADS = function () { if (Notification.permission !== 'denied') { Notification.requestPermission(function (permission) { // If the user accepts, let's create a notification - //if (permission === "granted") { - //} + if (permission === "granted") { + } }); } } } //-------------------------------------------------------------------- Eventos ---------------------------------------------------------------------- - var AlertaVentana = function (Titulo, Mensaje, Tipo, timeoutseconds, Opciones) { + var AlertaVentana = function (Titulo, Mensaje, Tipo, timeoutseconds) { console.log(Mensaje); - let obj = { metodo: "AlertaVentana", titulo: Titulo, mensaje: Mensaje, timeout: timeoutseconds, tipo: Tipo, opciones: Opciones, tick: (new Date()).getTime() }; + let obj = { metodo: "AlertaVentana", titulo: Titulo, mensaje: Mensaje, timeout: timeoutseconds, tipo: Tipo, tick: (new Date()).getTime() }; let myjson = JSON.stringify(obj); localStorage.setItem("ADSNotificaciones", myjson); execAlertaVentana(obj); @@ -117,11 +117,11 @@ var NotificacionesADS = function () { var proxy = $.connection.notificaciones; /*$.connection.hub.url = '/signalr';*/ $.connection.hub.disconnected(function () { - console.log(' (SignalR) diconnected'); + console.log(' (SignalR) disconnected'); signalrconectionStar(1200); }); - proxy.client.AlertaVentana = AlertaVentana; + proxy.client.alertaVentana = AlertaVentana; proxy.client.Execstring = Execstring; @@ -139,7 +139,7 @@ var NotificacionesADS = function () { nointentos = nointentos + 1; if (nointentos < maxintentos) { $.connection.hub.start().done(function () { console.log('(SignalR)Bienvenido'); nointentos = 0; }) - .fail(function () { console.log(' (SignalR) no conectado (Intento:' + nointentos + ')'); signalrconectionStar(12000); }); + .fail(function () { console.log(' (SignalR) no conectado (Intento:' + nointentos + ')'); signalrconectionStar(1200); }); } }, TimeOut); } diff --git a/Sistemas/SessionesActivas.aspx.vb b/Sistemas/SessionesActivas.aspx.vb index 1dad46c59..65f8bb5f8 100644 --- a/Sistemas/SessionesActivas.aspx.vb +++ b/Sistemas/SessionesActivas.aspx.vb @@ -1,6 +1,7 @@  Imports System.Data Imports Extensiones +Imports Microsoft.AspNet.SignalR Partial Class SessionesActivas Inherits System.Web.UI.Page @@ -189,11 +190,8 @@ Partial Class SessionesActivas RegistraScript("$(""#DivMensaje"").modal();") End Sub Protected Sub LnkEnviar_Click(sender As Object, e As EventArgs) + ClsSisNotificaciones.EnviarAlerta("Aviso", TxtMensaje.Text.Trim(), RCveUsuario, Tipo:=TipoNotificacion.ToastInformacionB) - Dim lista As New List(Of String) - lista.Add(RCveUsuario) - 'Notificaciones.AlertaVentana(TxtMensaje.Text, lista) - Notificaciones.AlertaVentana(TxtMensaje.Text, lista, timeoutseconds:=0) RegistraScript($"$(""#DivMensaje"").modal('hide');console.log('{Decripta(Context.User.Identity.Name)}')") End Sub diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 90b18644b..74d963242 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -2301,6 +2301,12 @@ + + + + + +
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 4626cfcaf..8d7f8b181 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1873,7 +1873,12 @@ Partial Class Clientes GVAnticiposHistorial.DataSource = Nothing DtAnticipoHistorial = Nothing End If - ObjMovtos.Dispose() + ObjMovtos.Dispose() + + If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then + GVAnticipos.Columns(7).Visible = True + End If + GVAnticipos.DataBind() GVAnticiposHistorial.DataBind() @@ -1889,7 +1894,6 @@ Partial Class Clientes RegistraScript("OrdenarGVAnticiposHistorial();") End If - End Sub Private Sub CargaOrdenesServiciosCliente() Dim ObjOS As New ClsOS @@ -2957,10 +2961,24 @@ Partial Class Clientes e.Row.FCHyperLink("HLDevolverDinero").Visible = True e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}" End If + End If + + + If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then + If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString() = "Ant" Then + If e.Row.DBCampo("AnticipoAutorizado").ToString() = "False" Then + e.Row.FCLinkButton("LnkAutorizar").Visible = True + e.Row.FCLinkButton("LnkCancelar").Visible = False + Else + e.Row.FCLinkButton("LnkAutorizar").Visible = False + e.Row.FCLinkButton("LnkCancelar").Visible = True + End If + End If End If End If End Sub + #End Region #Region "R H" @@ -10692,6 +10710,31 @@ Partial Class Clientes End Function + Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) + Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero() + If CveVenta > 0 Then + Using ObjVentas As New ClsVentas + If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then + Alert("El anticipo se autorizó correctamente") + End If + End Using + CargaAnticipos() + End If + End Sub + + Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) + Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero() + If CveVenta > 0 Then + Using ObjVentas As New ClsVentas + If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then + Alert("El anticipo se desautorizó correctamente") + End If + End Using + CargaAnticipos() + End If + End Sub End Class diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index a2e1f750a..247c1236b 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4615,6 +4615,9 @@
    +
    + +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 1208d5d3c..df3d41948 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7193,7 +7193,13 @@ Partial Class Ventas End If ObjCliente.Dispose() - If CveCliente > 0 Then CargaAnticipos(CveCliente) : UpAnticipos.Update() + If CveCliente > 0 Then + CargaAnticipos(CveCliente) + If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then + LnkRecargaAnticipos.Visible = True + End If + UpAnticipos.Update() + End If If CveCliente > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta <= 0 Then DivVentasUsados.Visible = True @@ -16827,6 +16833,12 @@ Partial Class Ventas GVAnticipos.Columns(8).Visible = True End If + If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then + If e.Row.DBCampo("Tipo").ToString() = "Ant" AndAlso e.Row.DBCampo("AnticipoAutorizado").ToString() = "False" Then + e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False + End If + End If + If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = DdlMoneda.SelectedValue.ToEntero() Then e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Visible = False @@ -33525,6 +33537,13 @@ Partial Class Ventas End If Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue + + If TipoDoctoViejo = "PA" AndAlso TipoDoctoNuevo.Contiene("Rem") Then + If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then + DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem")) + End If + End If + DdlTipoComprobante.SelectedValue = TipoDoctoNuevo If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then TxtFecha.Text = NowADS().ToString() @@ -38404,5 +38423,10 @@ Partial Class Ventas + Protected Sub LnkRecargaAnticipos_Click(sender As Object, e As EventArgs) + If CveCliente > 0 Then + CargaAnticipos(CveCliente) + End If + End Sub End Class