diff --git a/Ventas/CatAutorizacionLimites.aspx b/Ventas/CatAutorizacionLimites.aspx index 141f85fc6..59ec3b6f7 100644 --- a/Ventas/CatAutorizacionLimites.aspx +++ b/Ventas/CatAutorizacionLimites.aspx @@ -127,26 +127,35 @@ EmptyDataText="No se encontraron autorizaciones" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None"> + <%-- 0--%> + <%-- 1--%> + <%-- 2--%> + <%-- 3--%> - <%-- 30--%> + <%-- 4--%> - + + Folio + + + + <%-- 45--%> diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb index 944b72d84..1af186047 100644 --- a/Ventas/CatAutorizacionLimites.aspx.vb +++ b/Ventas/CatAutorizacionLimites.aspx.vb @@ -62,6 +62,10 @@ Partial Class Ventas_CatAutorizacionLimites DdlEstatus.SelectedValue = "0" + If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then + LnkAgregar.Visible = False + End If + UpModal.Update() End Sub Private Sub CargaDatos() @@ -190,6 +194,12 @@ Partial Class Ventas_CatAutorizacionLimites e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-secondary" End If + If e.Row.DBCampo("CveIEAplicado").ToString().ToEntero() > 0 Then + e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveIEAplicado"), e.Row.DBCampo("FolioIEAplicado")) + Else + e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveVentaAplicada"), e.Row.DBCampo("FacturaAplicada")) + End If + 'If e.Row.DBCampo("Estatus") = "True" Then ' e.Row.Cells(1).ForeColor = Drawing.Color.Green ' e.Row.Cells(1).Font.Bold = True diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9bc9f135d..dc24d778c 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3031,27 +3031,27 @@ Partial Class Clientes 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().Contiene("NC", "Ant") Then - If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) 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 + '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().Contiene("NC", "Ant") Then + ' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) 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 - If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then - If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) 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 + ' If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then + ' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) 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 diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index b870252cf..bb5a2f124 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -978,12 +978,10 @@ Partial Class Ventas_PVCobranza Dim Actualizo As Boolean = False If Tipo.Contiene("NC", "Ant") Then If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then - Alert("El anticipo se desautorizó correctamente") Actualizo = True End If ElseIf Tipo.Contiene("IxC") Then If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then - Alert("El anticipo se desautorizó correctamente") Actualizo = True End If End If @@ -2130,6 +2128,7 @@ Partial Class Ventas_PVCobranza Dim gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow) Dim Folio As String = gvr.DataKey("Folio") Dim Importe As Decimal = gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal + Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal() Dim dtt As DataTable = Nothing Dim ObjProceso As New ClsSisProcesos @@ -2156,22 +2155,17 @@ Partial Class Ventas_PVCobranza Arr.Add(NombreCliente) Arr.Add(Folio) Arr.Add($"$ {Importe}") + EnvioMsg = EnviarNotificacionWhatsAppPlantilla(NumeroTelefono, "solicitud_autorizacion_anticipo", Arr, $"https://grupodiaz.adssistemas.mx.com/Clientes/Clientes.aspx?CveCliente={CveCliente}") - 'EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.") - ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio}
Ir Activar", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB) + Next - If EnvioMsg Then - Alert("Se envió una solicitud de autorización", TipoMensaje.ToastInformacion) - 'Else - ' Alert("No se envió la solicitud de autorización", TipoMensaje.MsgAdvertencia) - End If End If Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero() Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero() Dim ObjVta As New ClsVentas - If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Importe, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then + If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then Dim msgAlert = "La autorización se agregó correctamente." If EnvioMsg Then msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios" @@ -2181,7 +2175,7 @@ Partial Class Ventas_PVCobranza ObjVta.Dispose() - UpAnticipos.Update() + CargaAnticipos(CveVenta) End Sub