From 5a49bc984e954a92ff0e00e387b0723075e7be30 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 5 Oct 2022 15:50:54 -0700 Subject: [PATCH] Limpieza modulos --- App_Code/ClsCompras.vb | 25 ----- App_Code/ClsPaginas.vb | 3 +- App_Code/ClsVentas.vb | 19 +--- Compras/RepPerioricidad.aspx | 153 ------------------------------- Compras/RepPerioricidad.aspx.vb | 111 ---------------------- Ventas/RepArqueosDetalle.aspx | 117 ----------------------- Ventas/RepArqueosDetalle.aspx.vb | 108 ---------------------- 7 files changed, 2 insertions(+), 534 deletions(-) delete mode 100644 Compras/RepPerioricidad.aspx delete mode 100644 Compras/RepPerioricidad.aspx.vb delete mode 100644 Ventas/RepArqueosDetalle.aspx delete mode 100644 Ventas/RepArqueosDetalle.aspx.vb diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 8768624dd..abb33f395 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -921,31 +921,6 @@ Public Class ClsCompras Return Retorno End Function - 'Reporte de Perioricidad - Public Function GetRepComprasPerioricidad(CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, - FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean - - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_ComprasPerioricidadRep") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion - .Add("@CvePS", SqlDbType.Int).Value = CvePS - .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio - .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el Reporte de Perioricidad.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - Return Retorno - End Function 'Reporte de Productos y Servicios Public Function GetRepProductosServicios(CveProyecto As Integer, CveSubProyecto As String, CveCategoria As String, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8dd0f20c4..65ef143b6 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4729,7 +4729,7 @@ Public Class ClsPaginas PaginaDict.Add("/Compras/RepNotasCredito.aspx".ToUpper(), 337) PaginaDict.Add("/Compras/ReembolsosComprobaciones.aspx".ToUpper(), 350) PaginaDict.Add("/Compras/RepProductosServicios.aspx".ToUpper(), 97) - PaginaDict.Add("/Compras/RepPerioricidad.aspx".ToUpper(), 126) + PaginaDict.Add("/Compras/PopUpFacturasPendientesAutorizar.aspx".ToUpper(), 559) PaginaDict.Add("/Compras/RepEvaluacionProveedor.aspx".ToUpper(), 564) PaginaDict.Add("/Compras/RepRembolsoComprobaciones.aspx".ToUpper(), 591) @@ -5517,7 +5517,6 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepVentasResumen.aspx".ToUpper(), 674) PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678) - PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680) PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686) PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687) PaginaDict.Add("/Ventas/CatCobranzaEstatus.aspx".ToUpper(), 7003) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index ebcea89aa..7378428ee 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4806,24 +4806,7 @@ Public Class ClsVentas Return retorno 'compila End Function - Public Function GetRepArqueosDetalle(Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean - Dim retorno As Boolean = False - Dataset = New DataSet() - DataAdapter("PA_Vta_RepArqueosDetalleGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@Fecha", SqlDbType.DateTime).Value = Fecha - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - Try - SqlAdapter.Fill(Dataset) - retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el reporte de arqueos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return retorno - 'compila - End Function + Public Function GetRepVentasMensuales(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, Optional CveSubProyecto As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVendedor As Integer = -1, Optional CveMarca As Integer = -1, Optional Modalidad As Integer = 0) As Boolean Dim retorno As Boolean = False diff --git a/Compras/RepPerioricidad.aspx b/Compras/RepPerioricidad.aspx deleted file mode 100644 index 17ad7be7d..000000000 --- a/Compras/RepPerioricidad.aspx +++ /dev/null @@ -1,153 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPerioricidad.aspx.vb" Inherits="Compras_RepPerioricidad" %> - - - - - - - Reporte Perioricidad de Compra - - - - - - - - -
-
-
- - -
-
-
-
-
- - -
- <%-- - --%> -
-
- - -
- <%--
-
--%> -
-
- - -
-
-
-
-
-
- -
- - -
- -
-
- - - - - -
-
- -
-
- - - - - -
-
-
-
-
-
-
- - - - - <%----%> - <%--ItemStyle-Width="20px"--%> - - - - - - - - - - - -
ConceptoFechaUnidad MedidaCantidadImporteOCActivo Fijo
-
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - - -
-
-
- <%----%> - <%----%> - <%----%> - <%----%> -
-
-
-
-
- - - diff --git a/Compras/RepPerioricidad.aspx.vb b/Compras/RepPerioricidad.aspx.vb deleted file mode 100644 index 013bb99b3..000000000 --- a/Compras/RepPerioricidad.aspx.vb +++ /dev/null @@ -1,111 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones - -Partial Class Compras_RepPerioricidad - Inherits ClsPaginas - - Private Property DtDatos As DataTable - Get - Return CType(ViewState("DtDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - - - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - 'divfiltros.Attributes.CssStyle.Add("display", "none") - RegistraScript(String.Format("$('#{0}').css({{'display':'none'}});", divfiltros.ClientID)) - - txtFechaI.Text = Now.AddMonths(-6).ToShortDateString - txtFechaF.Text = Now.ToShortDateString - CargaCombos() - End If - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - Dim ObjCompras As New ClsCompras - If ObjCompras.GetRepComprasPerioricidad(DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa) Then - DtDatos = ObjCompras.DtResultados - Gv.DataSource = DtDatos - Else - Gv.DataSource = Nothing - End If - ObjCompras.Dispose() - Gv.DataBind() - UPPDatos.Update() - End Sub - - Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DataKey("TipoRenglon").ToEntero = 1 Then - 'e.Row.FindControl("LblSpace").Visible = False - e.Row.FindControl("tr2").Visible = False - e.Row.CssClass = "Totales" - ElseIf e.Row.DataKey("TipoRenglon").ToEntero = 2 Then - 'e.Row.FCLiteral("LblAgrupador").Text = String.Format("    {0}", e.Row.DBCampo("Agrupador")) - e.Row.FindControl("tr2").Visible = False - e.Row.CssClass = "SubTotales2" - 'e.Row.FindControl("tdConcepto") - e.Row.Cells(0).Style.Add("padding-left", "15px;") - Else - e.Row.FindControl("tr1").Visible = False - 'e.Row.BackColor = Drawing.Color.LightSkyBlue - End If - End If - End Sub - - Private Sub CargaCombos() - DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa) - DdlProyecto.DataBind() - If DdlProyecto.Items.Count > 0 Then - DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - End If - - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlPS.Items.Insert(0, New ListItem("Todos", "-1")) - - 'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - 'DdlClasificacion.DataBind() - - If UsuarioActual.Empresa.UsaAC Then - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") - Else - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion") - End If - DdlClasificacion.DataBind() - - If DdlClasificacion.Items.Count > 0 Then - DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1")) - End If - End Sub - - Private Sub CargaPS(CveClasificacion As Integer) - - DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion) - DdlPS.DataBind() - - If DdlPS.Items.Count > 0 Then - DdlPS.Items.Insert(0, New ListItem("Todos", "-1")) - End If - - End Sub - - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) - DdlSubProyecto.DataBind() - If DdlSubProyecto.Items.Count > 0 Then - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - End If - End Sub - - Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged - CargaPS(DdlClasificacion.SelectedValue.ToEntero) - End Sub -End Class diff --git a/Ventas/RepArqueosDetalle.aspx b/Ventas/RepArqueosDetalle.aspx deleted file mode 100644 index 073de9608..000000000 --- a/Ventas/RepArqueosDetalle.aspx +++ /dev/null @@ -1,117 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepArqueosDetalle.aspx.vb" Inherits="Ventas_RepArqueosDetalle" %> - - - - - - - - - - - -
  • - Generar PDF -
  • -
  • - Generar Excel -
  • -
    - - - - -
    -
    - - - - - - - -
    -
    -
    - Ventas -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - CUENTAS -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - - - diff --git a/Ventas/RepArqueosDetalle.aspx.vb b/Ventas/RepArqueosDetalle.aspx.vb deleted file mode 100644 index a9b726fed..000000000 --- a/Ventas/RepArqueosDetalle.aspx.vb +++ /dev/null @@ -1,108 +0,0 @@ -Option Explicit On -Option Strict On - -Imports Extensiones -Imports Microsoft.Reporting.WebForms -Imports System.Data - -Partial Class Ventas_RepArqueosDetalle - Inherits ClsPaginas -#Region "P R O P I E D A D E S" - Private Property DtVentas As DataTable - Get - Return DirectCast(ViewState("DtVentas"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtVentas") = value - End Set - End Property - Private Property DtCuentas As DataTable - Get - Return DirectCast(ViewState("DtCuentas"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtCuentas") = value - End Set - End Property -#End Region - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - Dim CveSubProyecto As Integer = -1 - Dim Fecha As DateTime = Now - If Request("CveSubProyecto") IsNot Nothing Then - CveSubProyecto = Request("CveSubProyecto").ToString().ToEntero() - End If - If Request("Fecha") IsNot Nothing Then - Fecha = Request("Fecha").ToString().ToDate() - End If - CargaDatos(Fecha, CveSubProyecto) - End If - End Sub - Private Sub CargaDatos(Fecha As DateTime, CveSubProyecto As Integer) - LtlTitulo.Text = String.Format("Reporte de Arqueos Detalle: Fecha {0:dd/MM/yyyy}", Fecha) - - Dim ObjVentas As New ClsVentas() - If ObjVentas.GetRepArqueosDetalle(Fecha, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtVentas = ObjVentas.DataSetResultados.Tables(0).Copy() - DtCuentas = ObjVentas.DataSetResultados.Tables(1).Copy() - End If - ObjVentas.Dispose() - GvDatos.DataSource = DtVentas - GvCuentas.DataSource = DtCuentas - GvDatos.DataBind() - GvCuentas.DataBind() - - UPDatos.Update() - End Sub - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("SerieFolio") = "Total" Then - e.Row.CssClass = "Totales" - End If - End If - End Sub - Protected Sub GvCuentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCuentas.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Folio") = "Total" Then - e.Row.CssClass = "Totales" - End If - End If - End Sub - Protected Sub GeneraPDF(Formato As String) - Dim params As List(Of ReportParameter) = New List(Of ReportParameter)() - Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString())) - - params.Add(New ReportParameter("Encabezado", String.Format("Fecha:{0}", Request("Fecha").ToString().ToDate().ToString("dd/MM/yyyy")))) - - - Dim lrds As List(Of ReportDataSource) = New List(Of ReportDataSource)() - Dim rds As ReportDataSource = New ReportDataSource() - rds.Name = "DataSet1" - rds.Value = DtVentas - - Dim rds2 As ReportDataSource = New ReportDataSource() - rds2.Name = "DataSet2" - rds2.Value = DtCuentas - - lrds.Add(rds) - lrds.Add(rds2) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - - ImprimirPDF("Empresas/Grales/Formatos/RepArqueosDetalle.rdlc", lrds, params, "Rep Arqueos Detalle", Formato) - End Sub - Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) - GeneraPDF("PDF") - End Sub - Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) - GeneraPDF("EXCEL") - End Sub -End Class