--activación de personalizar columnas de subtotal,iva,ieps, pendiente
This commit is contained in:
@@ -7,10 +7,18 @@ Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class RepCxPDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
|
||||
Public Property SePersonalizo() As Integer
|
||||
Get
|
||||
Return ViewState("SePersonalizo").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("SePersonalizo") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property CveProveedor() As Integer
|
||||
Get
|
||||
Return ViewState("CveProveedor").ToString.ToEntero
|
||||
@@ -211,8 +219,9 @@ Partial Class RepCxPDetalle
|
||||
'Private ReadOnly Property ColumnasVisibles As
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
SePersonalizo = 0
|
||||
ViewState("Opcion") = IfNull(Request("Op"), "S")
|
||||
MostrarOcultarColumnas(False)
|
||||
MostrarOcultarColumnas()
|
||||
CargaCombos()
|
||||
If Request("Op") IsNot Nothing Then
|
||||
CargaDatos()
|
||||
@@ -257,10 +266,10 @@ Partial Class RepCxPDetalle
|
||||
|
||||
Dim CveSucursal As Integer = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
|
||||
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(1, New ListItem("Sin Sucursal", "0"))
|
||||
'DdlSubProyecto.SelectedValueExist(CveSucursal)
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "" Then
|
||||
ChkIEPS.Visible = True
|
||||
ChkIEPSPend.Visible = True
|
||||
End If
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyectofiltro)
|
||||
DdlSubProyecto.Items.Insert(1, New ListItem("Sin Sucursal", "0"))
|
||||
@@ -535,109 +544,44 @@ Partial Class RepCxPDetalle
|
||||
#End Region
|
||||
|
||||
#Region "PERSONALIZAR"
|
||||
Protected Sub MostrarOcultarColumnas(Optional Personalizo As Boolean = True)
|
||||
Protected Sub MostrarOcultarColumnas()
|
||||
|
||||
If ChkTipoDocto.Checked Then
|
||||
GvDatos.Columns(0).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(0).Visible = False
|
||||
End If
|
||||
ActivaColumna(0, ChkTipoDocto.Checked)
|
||||
ActivaColumna(1, ChkFolio.Checked)
|
||||
ActivaColumna(3, ChkSubTotal.Checked)
|
||||
ActivaColumna(4, ChkIVA.Checked)
|
||||
ActivaColumna(5, ChkIEPS.Checked)
|
||||
ActivaColumna(6, ChkDescuento.Checked)
|
||||
ActivaColumna(7, ChkTotal.Checked)
|
||||
ActivaColumna(8, ChkMoneda.Checked)
|
||||
ActivaColumna(9, ChkSaldo.Checked)
|
||||
ActivaColumna(10, ChkFechaVencimiento.Checked)
|
||||
ActivaColumna(11, ChkDiasVencidos.Checked)
|
||||
ActivaColumna(12, ChkProveedor.Checked)
|
||||
ActivaColumna(13, ChkCuenta.Checked)
|
||||
ActivaColumna(14, ChkObservaciones.Checked)
|
||||
ActivaColumna(15, UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0)
|
||||
ActivaColumna(16, ChkDescripcion.Checked)
|
||||
ActivaColumna(17, ChkSubTotalPend.Checked)
|
||||
ActivaColumna(18, ChkIVAPend.Checked)
|
||||
ActivaColumna(19, ChkIEPSPend.Checked)
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
GvDatos.Columns(1).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(1).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
GvDatos.Columns(3).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(3).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIVA.Checked Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(4).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(6).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
Else
|
||||
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
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkFechaVencimiento.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDiasVencidos.Checked Then
|
||||
GvDatos.Columns(11).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(11).Visible = False
|
||||
End If
|
||||
|
||||
If ChkProveedor.Checked Then
|
||||
GvDatos.Columns(12).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(12).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCuenta.Checked Then
|
||||
GvDatos.Columns(13).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(13).Visible = False
|
||||
End If
|
||||
|
||||
If ChkObservaciones.Checked Then
|
||||
GvDatos.Columns(14).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(14).Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then
|
||||
GvDatos.Columns(15).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
GvDatos.Columns(16).Visible = ChkDescripcion.Checked
|
||||
|
||||
If Personalizo Then
|
||||
If SePersonalizo = 1 Then
|
||||
ImgExcelPersonalizado.Visible = True
|
||||
Else
|
||||
ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
UPAcciones.Update()
|
||||
|
||||
|
||||
UPAcciones.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivaColumna(Indice As Integer, Activo As Boolean)
|
||||
|
||||
GvDatos.Columns(Indice).Visible = Activo
|
||||
If Activo Then SePersonalizo = 1
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
MostrarOcultarColumnas()
|
||||
RegistraScript("$('#DivPersonalizar').modal('hide');")
|
||||
@@ -678,7 +622,7 @@ Partial Class RepCxPDetalle
|
||||
FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), "-1")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
@@ -686,18 +630,18 @@ Partial Class RepCxPDetalle
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
'PARA REPORTE
|
||||
Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Sucursal:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedores.SelectedText}")
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Sucursal As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Sucursal:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Proveedor As String = If(DdlProveedores.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedores.SelectedText}")
|
||||
Dim Grupo As String = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
||||
Dim FechaFn As String = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
||||
Dim FechaInV As String = If(txtFechaVI.Text = "", "", $" <b>Fecha Inicio Venc:</b> {txtFechaVI.Text}")
|
||||
Dim FechaFnV As String = If(txtFechaVF.Text = "", "", $" <b>Fecha Fin Venc:</b> {txtFechaVF.Text}")
|
||||
Dim Responsable = If(DdlUsuarioResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlUsuarioResponsable.SelectedItem.Text}")
|
||||
Dim Estatus = If(DdlEstatusCompra.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatusCompra.SelectedItem.Text}")
|
||||
Dim Registro = If(DdlUsuarioRegistro.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuarioRegistro.SelectedItem.Text}")
|
||||
Dim Clasificacion = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlProveedoresClasificaciones.SelectedItem.Text}")
|
||||
Dim TipoMoneda = If(RblTipoCambio.SelectedValue = "-1", "", $" <b>Tipo Moneda:</b> {RblTipoCambio.SelectedItem.Text}")
|
||||
Dim Responsable As String = If(DdlUsuarioResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlUsuarioResponsable.SelectedItem.Text}")
|
||||
Dim Estatus As String = If(DdlEstatusCompra.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatusCompra.SelectedItem.Text}")
|
||||
Dim Registro As String = If(DdlUsuarioRegistro.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuarioRegistro.SelectedItem.Text}")
|
||||
Dim Clasificacion As String = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlProveedoresClasificaciones.SelectedItem.Text}")
|
||||
Dim TipoMoneda As String = If(RblTipoCambio.SelectedValue = "-1", "", $" <b>Tipo Moneda:</b> {RblTipoCambio.SelectedItem.Text}")
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Grupo}{Proveedor}{FechaIn}{FechaFn}{FechaInV}{FechaFnV}{Responsable}{Estatus}{Registro}{Clasificacion}{Sucursal}{TipoMoneda}"))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
@@ -721,14 +665,12 @@ Partial Class RepCxPDetalle
|
||||
End If
|
||||
|
||||
UPFiltros.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
RegistraScript("$('#DivPersonalizar').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
Reference in New Issue
Block a user