From be577a924ebf24812d00ab0bfd4f39185a58c4fa Mon Sep 17 00:00:00 2001 From: MLopez Date: Tue, 10 Jan 2023 21:30:10 -0700 Subject: [PATCH] Rep CxP Detalle / EntradasSalidas: limpiar chequeo de estado personalizado de Grid - Arregla un bug en CxP donde mostraba la opcion de descargar Excel personalizado sin que el usuario hubiera personalizado el Grid anteriormente --- Compras/RepCxPDetalle.aspx | 115 +++++++++++++------------ Compras/RepCxPDetalle.aspx.vb | 48 ++--------- Inventarios/RepEntradasSalidas.aspx | 2 +- Inventarios/RepEntradasSalidas.aspx.vb | 17 +--- 4 files changed, 71 insertions(+), 111 deletions(-) diff --git a/Compras/RepCxPDetalle.aspx b/Compras/RepCxPDetalle.aspx index 31fcd036e..e32659bd7 100644 --- a/Compras/RepCxPDetalle.aspx +++ b/Compras/RepCxPDetalle.aspx @@ -15,44 +15,45 @@ } - - - - -
  • - Generar PDF + + + + +
  • + Generar PDF +
  • +
  • + Generar Excel +
  • + +
  • + Excel Personalizado +
  • + +
  • + +
  • -
  • - Generar Excel -
  • - -
  • - Excel Personalizado -
  • - -
  • -
  • - -
  • - Ver Dlls en pesos - -
  • - - -
  • - Programar Recursos - -
  • - -
    - - - - - -
    - +
  • + Ver Dlls en pesos + +
  • + + +
  • + Programar Recursos + +
  • + + + + + + + + +
    Reporte de CxP - Detalle @@ -216,18 +217,18 @@ - -
    - - - -
    - - -
    - - - + +
    + + + +
    + + +
    + + +
    Comprobación:
    @@ -241,19 +242,19 @@
    -
    +
    Moneda:
    -
    - -
    +
    + +
    Aplica NC:
    -
    +
    - -
    + +
    @@ -264,7 +265,7 @@ - <%--0--%> diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 22ed077f9..10ad64961 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -83,18 +83,6 @@ Partial Class RepCxPDetalle ViewState("FechaFin") = value End Set End Property - - - Private Property Personalizo As Integer - Get - Return ViewState("Personalizo").ToString.ToEntero - End Get - - Set(value As Integer) - ViewState("Personalizo") = value - End Set - End Property - Public Property FechaVInicio() As String Get @@ -205,7 +193,6 @@ Partial Class RepCxPDetalle Private Property TCEspecifico As Double - Public Property DTCuentasContables() As DataTable Get If ViewState("DTCuentasContables") Is Nothing Then @@ -218,20 +205,14 @@ Partial Class RepCxPDetalle Set(value As DataTable) ViewState("DTCuentasContables") = value End Set - End Property - - - + End Property #End Region - - 'pRivate ReadOnly Property ColumnasVisibles As - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - Personalizo = 0 - + 'Private ReadOnly Property ColumnasVisibles As + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then ViewState("Opcion") = IfNull(Request("Op"), "S") - MostrarOcultarColumnas() + MostrarOcultarColumnas(False) CargaCombos() If Request("Op") IsNot Nothing Then CargaDatos() @@ -274,7 +255,6 @@ Partial Class RepCxPDetalle DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1")) DdlUsuarioRegistro.SelectedValueExist(UsuarioRegistro) - Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) @@ -309,7 +289,6 @@ Partial Class RepCxPDetalle FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString txtCorteA.Text = $"31/12/{Now.Year}" - If Request("FechaI") <> "-1" AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI") If Request("FechaF") <> "-1" AndAlso IsDate(Request("FechaF")) Then txtFechaF.Text = Request("FechaF") If Request("FechaVI") <> "-1" AndAlso IsDate(Request("FechaVI")) Then txtFechaVI.Text = Request("FechaVI") @@ -349,8 +328,6 @@ Partial Class RepCxPDetalle GvDatos.Columns(11).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0) - - For Each lItem As ListItem In DdlGrupo.Items If lItem.Value.ToEntero = 9 Then @@ -358,7 +335,6 @@ Partial Class RepCxPDetalle End If Next - End Sub Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged @@ -544,11 +520,8 @@ Partial Class RepCxPDetalle End If End If - - End If - If e.Row.DBCampo("CveCompra") = "" Then e.Row.FCLabel("LblMoneda").Text = "" End If @@ -595,7 +568,7 @@ Partial Class RepCxPDetalle #End Region #Region "PERSONALIZAR" - Protected Sub MostrarOcultarColumnas() + Protected Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True) If ChkTipoDocto.Checked Then GvDatos.Columns(0).Visible = True @@ -639,15 +612,12 @@ Partial Class RepCxPDetalle GvDatos.Columns(7).Visible = False End If - If ChkMoneda.Checked Then GvDatos.Columns(8).Visible = True Else GvDatos.Columns(8).Visible = False End If - - If ChkSaldo.Checked Then GvDatos.Columns(9).Visible = True Else @@ -692,12 +662,12 @@ Partial Class RepCxPDetalle GvDatos.Columns(16).Visible = ChkDescripcion.Checked - Personalizo = 1 - If Personalizo = 1 Then + If Personalizo Then ImgExcelPersonalizado.Visible = True Else ImgExcelPersonalizado.Visible = False - End If + End If + UPAcciones.Update() UPDatos.Update() End Sub diff --git a/Inventarios/RepEntradasSalidas.aspx b/Inventarios/RepEntradasSalidas.aspx index 82be31ee6..a6f392e96 100644 --- a/Inventarios/RepEntradasSalidas.aspx +++ b/Inventarios/RepEntradasSalidas.aspx @@ -227,7 +227,7 @@ <%--0--%> - + <%--1--%> <%--2--%> diff --git a/Inventarios/RepEntradasSalidas.aspx.vb b/Inventarios/RepEntradasSalidas.aspx.vb index a11433761..72404a554 100644 --- a/Inventarios/RepEntradasSalidas.aspx.vb +++ b/Inventarios/RepEntradasSalidas.aspx.vb @@ -54,21 +54,11 @@ Partial Class Inventarios_ReporteEntradasSalidas Return (UsuarioActual.CveEmpresa.Contiene(72, 80)) End Get End Property - Private Property Personalizo As Integer - Get - Return ViewState("Personalizo").ToString.ToEntero - End Get - - Set(value As Integer) - ViewState("Personalizo") = value - End Set - End Property #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - Personalizo = 0 If UsuarioActual.CveEmpresa.Contiene(119) Then LnkFormatoInventario.Visible = True @@ -435,7 +425,7 @@ Partial Class Inventarios_ReporteEntradasSalidas #End Region #Region "PERSONALIZAR" - Private Sub MostrarOcultarColumnas() + Private Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True) GvM.Columns(1).Visible = ChkCodigoAlterno.Checked GvM.Columns(2).Visible = ChkCodigoBarras.Checked GvM.Columns(3).Visible = ChkClasificacion2.Checked @@ -510,12 +500,12 @@ Partial Class Inventarios_ReporteEntradasSalidas dvCan.Style.Add("width", "21%") End If - Personalizo = 1 - If Personalizo = 1 Then + If Personalizo Then LnkExcelPersonalizado.Visible = True Else LnkExcelPersonalizado.Visible = False End If + UPAcciones.Update() UpEncabezado.Update() UPPMov.Update() @@ -524,7 +514,6 @@ Partial Class Inventarios_ReporteEntradasSalidas Private Sub BtnPersonalizar_Click(sender As Object, e As EventArgs) Handles BtnPersonalizar.Click MostrarOcultarColumnas() RegistraScript("$('#DivPersonalizar').modal('hide')") - UPAcciones.Update() 'CargaDatos() End Sub