From 956c9e2299d50cc15747c0c77ce7771d4cded68f Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 19 Feb 2020 09:30:51 -0700 Subject: [PATCH 1/2] el logo del reporte es buscado como png --- General/CATIEPSxEntidadFed.aspx.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/General/CATIEPSxEntidadFed.aspx.cs b/General/CATIEPSxEntidadFed.aspx.cs index 10798c8c0..23354850a 100644 --- a/General/CATIEPSxEntidadFed.aspx.cs +++ b/General/CATIEPSxEntidadFed.aspx.cs @@ -112,10 +112,13 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas protected void LnkPDF_Click(object sender, EventArgs e) { List paramList = new List(); - paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa))); + paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa))); paramList.Add(new ReportParameter("FechaInicio", TxtIEPSfechaInicio.Text)); paramList.Add(new ReportParameter("FechaFin", TxtIEPSfechaFin.Text)); paramList.Add(new ReportParameter("Agrupador", DdlAgrupador.SelectedValue)); + paramList.Add(new ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)); + paramList.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); + paramList.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("d/M/yyyy"))); ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList,"IEPS por entidades federativa",RDSName:"DsInventarios"); } From 0b1963b098e49a3b12cff76d4608368b7a8cd689 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 19 Feb 2020 16:45:47 -0700 Subject: [PATCH 2/2] =?UTF-8?q?consulta=20de=20las=20ventas=20correspondie?= =?UTF-8?q?ntes=20a=20los=20grupos=20de=20tama=C3=B1os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/RepEntradasUsadosClientes.aspx | 70 +++++++++++++++++-- .../RepEntradasUsadosClientes.aspx.vb | 32 +++++---- App_Code/ClsAcumuladores.vb | 23 ++++++ 3 files changed, 109 insertions(+), 16 deletions(-) diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx index 36a2fb0f6..c2da0c83c 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx +++ b/Acumuladores/RepEntradasUsadosClientes.aspx @@ -72,15 +72,77 @@ - + - - - + + + + + + + + + + + + + + diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 8925785f9..75e36daaf 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Dim Acum As New ClsAcumuladores If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then - GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar + GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") End If @@ -61,18 +61,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - 'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then - ' e.Row.CssClass = "SubTotales2" - 'End If - If e.Row.DBCampo("TipoHeader").ToString = "1" Then - e.Row.CssClass = "Totales" - ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then - e.Row.CssClass = "SubTotales" - ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then - e.Row.CssClass = "SubTotales2" - End If - End If + If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then + e.Row.CssClass = "SubTotales2" + End If + End If End Sub Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) @@ -96,4 +89,19 @@ Partial Class Acumuladores_RepEntradasUsadosClientes End Sub + Public Sub CargarVentasGrupo(sender As Object, e As EventArgs) + Dim tempLink As LinkButton = CType(sender, LinkButton) + Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow) + + LbCliente.Text = renglon.DataKey("NombreComercial") + LbTam.Text = renglon.DataKey("Codigo") + Dim ObjAcum As New ClsAcumuladores + If ObjAcum.GetUsadosClasificacionVentas(renglon.DataKey("CveCliente"), renglon.DataKey("Codigo"), TxtFechaI.Text, TxtFechaF.Text) Then + GvVentas.DataSource = ObjAcum.DtResultados + End If + ObjAcum.Dispose() + GvVentas.DataBind() + + RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;") + End Sub End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 0a9418855..3720d4918 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1039,6 +1039,29 @@ Public Class ClsAcumuladores Return Retorno End Function + Public Function GetUsadosClasificacionVentas(CveCliente As Integer, Codigo As String, FechaInicio As String, FechaFin As String) As Boolean + + Dim Retorno As Boolean = False + + SqlDataAdapter("PA_Acum_UsadosClasificacionVentas") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@Codigo", SqlDbType.VarChar).Value = Codigo + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #Region " IDisposable Support "