From 2a6eff7f804da31ef922f3be36a67c942b8b91af Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 22 Feb 2022 17:39:09 -0700 Subject: [PATCH] E140. Editar condiciones comerciales por permiso --- Ventas/Clientes.aspx | 14 ++++---- Ventas/Clientes.aspx.vb | 73 +++++++++++++++++++++++++++++++++-------- 2 files changed, 66 insertions(+), 21 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 74bccf089..7fab86bab 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -6158,7 +6158,7 @@ - +
@@ -6226,7 +6226,7 @@ <%--table table-striped table-advance table-hover Widthall ScrollAD tabla_correcto grides Widthall mysmallbtn--%> - + @@ -6310,8 +6310,8 @@ - - + + @@ -6327,7 +6327,7 @@
@@ -6365,7 +6365,7 @@ Aplicado - +
@@ -6458,7 +6458,7 @@
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9daf8def2..a0207adfd 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1449,15 +1449,26 @@ Partial Class Clientes ' CargaGridRetenciones() ' CargaDocs() CargaCombos() - CargaDocumentacionCliente() - 'CargaMetodosPago33() - 'CargaFormaPago33() - 'CargaComboCFDI() - 'CargarPagosNoBancarios() - - If UsuarioActual.TienePermisoProceso(279) Then + CargaDocumentacionCliente() + 'CargaMetodosPago33() + 'CargaFormaPago33() + 'CargaComboCFDI() + 'CargarPagosNoBancarios() + + + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then LnkPorcentajeMarcas.Visible = True - LnkPorcentajePrecios.Visible = True + LnkPorcentajePrecios.Visible = True + + If UsuarioActual.TienePermisoProceso(279) Then + TrPreciosPP.Visible = True + TrAgregarPMarca.Visible = True + + BtnGuardarPorcentajesMarca.Visible = True + BtnGuardarPorcentajes.Visible = True + End If + End If @@ -1474,9 +1485,9 @@ Partial Class Clientes If ObjClientes.Pais = "" Then ObjClientes.Pais = "México" - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCliente > 0 Then - LnkAgregarVendedorSucursal.Visible = True - End If + 'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCliente > 0 Then + ' LnkAgregarVendedorSucursal.Visible = True + 'End If 'Campos para Modificación LtlCliente.Text = ObjClientes.Nombre @@ -1517,7 +1528,20 @@ Partial Class Clientes LblFechaCaptura.Text = ObjClientes.FechaIng.ToShortDateString() LblUsuarioCapturo.Text = ObjClientes.Usuario TxtNombreCorto.Text = ObjClientes.NombreCorto - DdlVendedor.SelectedValueExist(ObjClientes.Vendedor.ToString()) + + Dim CveVendedor = ObjClientes.Vendedor.ToEntero() + 'SI YA TIENE UN VALOR ASIGNADO SELECCIONA EL GUARDADO + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + Dim Vendedor = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=1).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedor)) + 'SI NO ENCUENTRA BUSCA EN LOS VENDEDORES DEL PV + If String.IsNullOrEmpty(Vendedor) Then + Vendedor = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedor)) + End If + DdlVendedor.SelectedValueExistInsert(CveVendedor, Vendedor) + Else + DdlVendedor.SelectedValueExist(CveVendedor) + End If + 'TxtVendedor.Text = ObjClientes.Vendedor TxtPlazoCobranza.Text = ObjClientes.PlazoCobranza.ToString() TxtPlazoCobranzaRemision.Text = ObjClientes.PlazoCobranzaRemision.ToString() @@ -8948,8 +8972,28 @@ Partial Class Clientes CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' ")) + End Sub + Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + If UsuarioActual.TienePermisoProceso(279) Then + e.Row.FCLinkButton("imgE").Visible = True + e.Row.FCLinkButton("lnkRemove").Visible = True + End If + + End If + End Sub + + Protected Sub GvP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvP.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + If UsuarioActual.TienePermisoProceso(279) Then + e.Row.FCLinkButton("imgE").Visible = True + e.Row.FCLinkButton("lnkRemove").Visible = True + End If + + End If End Sub - Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing GvM.EditIndex = e.NewEditIndex @@ -10422,6 +10466,7 @@ Partial Class Clientes Alert("Los cambios se guardaron satisfactoriamente.") End Using - End Sub + End Sub + End Class