--activación de personalizar columnas de subtotal,iva,ieps, pendiente
This commit is contained in:
@@ -7,7 +7,14 @@ Partial Class Compras_RepCxP
|
||||
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
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
@@ -87,9 +94,9 @@ Partial Class Compras_RepCxP
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
SePersonalizo = 0
|
||||
CargaCombos()
|
||||
CargaGvPersonalizarRaqngoColumnas()
|
||||
ProcesaRequest()
|
||||
@@ -149,8 +156,6 @@ Partial Class Compras_RepCxP
|
||||
DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioResponsable.DataBind()
|
||||
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyectofiltro, divProyecto:=DivProyecto)
|
||||
|
||||
DdlProveedoresClasificaciones.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
|
||||
@@ -179,6 +184,10 @@ Partial Class Compras_RepCxP
|
||||
'End If
|
||||
'ObjSisUsuarios.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "" Then
|
||||
ChkIEPSP.Visible = False
|
||||
End If
|
||||
|
||||
For Each lItem As ListItem In DdlGrupo.Items
|
||||
If lItem.Value.ToEntero = 9 Then
|
||||
lItem.Text = LblSubProyectofiltro.Text & "-Sucursal"
|
||||
@@ -1052,7 +1061,7 @@ Partial Class Compras_RepCxP
|
||||
|
||||
For Each Dt As DataRow In DtDatos.Rows
|
||||
|
||||
For Cont = 9 To NumCol + 1 Step -1
|
||||
For Cont As Integer = 9 To NumCol + 1 Step -1
|
||||
|
||||
Dt($"Columna{Cont}") = Dt($"Columna{Cont - 1}")
|
||||
Dt($"TC{Cont}") = Dt($"TC{Cont - 1}")
|
||||
@@ -1093,7 +1102,7 @@ Partial Class Compras_RepCxP
|
||||
Dim NombreArchivo As String
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim workbook As New ExcelFile()
|
||||
Dim worksheet = workbook.Worksheets.Add("Cxp")
|
||||
Dim worksheet As ExcelWorksheet = workbook.Worksheets.Add("Cxp")
|
||||
Dim Mes(12) As String
|
||||
Dim monthNames As String() = {"", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"}
|
||||
Mes(0) = monthNames(Dr("NomMes1").ToString.ToDate.Month)
|
||||
@@ -1161,8 +1170,8 @@ Partial Class Compras_RepCxP
|
||||
worksheet.Rows(1).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(103, 128, 159), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(RowDolares).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(103, 128, 159), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
|
||||
@@ -1445,8 +1454,8 @@ Partial Class Compras_RepCxP
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
|
||||
Dim Proyecto = ""
|
||||
Dim Sucursal = ""
|
||||
Dim Proyecto As String = ""
|
||||
Dim Sucursal As String = ""
|
||||
|
||||
Select Case UsuarioActual.Empresa.Tipo_CentroCosto
|
||||
Case 1
|
||||
@@ -1463,16 +1472,16 @@ Partial Class Compras_RepCxP
|
||||
Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Sucursal:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
End Select
|
||||
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim Clasificacion = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlProveedoresClasificaciones.SelectedItem.Text}")
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Proveedor As String = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim Clasificacion As String = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlProveedoresClasificaciones.SelectedItem.Text}")
|
||||
Dim Grupo As String = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Grupo:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||
If txtFechaI.Text = "" Then FechaIn = ""
|
||||
If txtFechaF.Text = "" Then FechaFn = ""
|
||||
Dim Registro = If(DdlUsuarioRegistro.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuarioRegistro.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlUsuarioResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlUsuarioResponsable.SelectedItem.Text}")
|
||||
Dim TipoMoneda = If(RblTipoCambio.SelectedValue = "-1", "", $" <b>Tipo Moneda:</b> {RblTipoCambio.SelectedItem.Text}")
|
||||
Dim Registro As String = If(DdlUsuarioRegistro.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuarioRegistro.SelectedItem.Text}")
|
||||
Dim Responsable As String = If(DdlUsuarioResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlUsuarioResponsable.SelectedItem.Text}")
|
||||
Dim TipoMoneda As String = If(RblTipoCambio.SelectedValue = "-1", "", $" <b>Tipo Moneda:</b> {RblTipoCambio.SelectedItem.Text}")
|
||||
|
||||
Dim FVI As String = $" <b>Fecha Venc. Inic.:</b> {txtFechaVI.Text}"
|
||||
Dim FVF As String = $" <b>Fecha Venc. Final:</b> {txtFechaVF.Text}"
|
||||
@@ -1893,4 +1902,49 @@ Partial Class Compras_RepCxP
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PERSONALIZAR COLUMNAS"
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
ActivaColumna(23, ChkSubTotalP.Checked)
|
||||
ActivaColumna(24, ChkIVAP.Checked)
|
||||
ActivaColumna(25, ChkIEPSP.Checked)
|
||||
|
||||
If SePersonalizo = 1 Then
|
||||
ImgExcelPersonalizado.Visible = True
|
||||
Else
|
||||
ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivaColumna(Indice As Integer, Activo As Boolean)
|
||||
|
||||
GvCxP.Columns(Indice).Visible = Activo
|
||||
If Activo Then SePersonalizo = 1
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
Private Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||
|
||||
Dim Cliente As String = If(DdlProveedor.SelectedValue = "-1", "", $" Cliente: {DdlProveedor.SelectedText}")
|
||||
Dim Sucursal As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Grupo As String = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "3", "", $" <b>Agrupado Por:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}")
|
||||
Dim FechaIn As String = If(txtFechaI.Text = "", "", $" Fecha Inicio Docto: {txtFechaI.Text}")
|
||||
Dim FechaFn As String = If(txtFechaF.Text = "", "", $" Fecha Fin Docto: {txtFechaF.Text}")
|
||||
Dim FVI As String = If(txtFechaVI.Text = "", "", $" Fecha Venc. Inic.: {txtFechaVI.Text}")
|
||||
Dim FVF As String = If(txtFechaVF.Text = "", "", $" Fecha Venc. Final: ;{txtFechaVF.Text}")
|
||||
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $"Corte A {txtCorteA.Text}")
|
||||
Dim ClasificacionProv As String = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlProveedoresClasificaciones.SelectedItem.Text}")
|
||||
|
||||
Dim Filtro As String = $"{Cliente}{Sucursal}{Grupo}{FechaIn}{FechaFn}{TipoDocto}{FVI}{FVF}{ClasificacionProv}{CorteA}"
|
||||
|
||||
GvCxP.ExportToExcelGembox("ReporteCxC", UsuarioActual, "REPORTE DE CUENTAS POR PAGAR", DatoTituloExtra:=$"", DatosFiltros:=Filtro)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user