From 30a493fc0aeb504cc012d2dea50f2ed762aa04f4 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 20 Jan 2025 19:40:16 -0700 Subject: [PATCH] --ocultar solicitud de anticipo en ventas --- Ventas/Ventas.aspx.vb | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index fd44294b9..48af166ee 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -17219,7 +17219,7 @@ Partial Class Ventas Private Sub CargaAnticipos(CveCliente As Integer) Dim CargaAnticipos As Boolean = True If UsuarioActual.CveEmpresa = 189 Then - CargaAnticipos = False + CargaAnticipos = UsuarioActual.TienePermisoProceso(406) End If HdnTieneAnticipos.Value = "0" If CveCliente > 0 AndAlso CargaAnticipos Then @@ -17463,11 +17463,11 @@ Partial Class Ventas End If If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then - If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then - e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False - e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado" - e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True - End If + 'If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then + ' e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False + ' e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado" + ' e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True + 'End If End If If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = DdlMoneda.SelectedValue.ToEntero() Then @@ -40467,6 +40467,17 @@ Partial Class Ventas Next End If + Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero() + Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero() + Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal() + + Dim ObjVta As New ClsVentas + If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then + Dim msgAlert = "La autorización se agregó correctamente." + Alert(msgAlert, TipoMensaje.ToastInformacionB) + End If + ObjVta.Dispose() + End Sub #End Region