From 7151f961c5c8391e307878c647f7c6df1ae16f84 Mon Sep 17 00:00:00 2001 From: MLopez Date: Thu, 15 Dec 2022 14:11:46 -0700 Subject: [PATCH] =?UTF-8?q?E172=20Rep=20Indicador=20ordenar=20gr=C3=A1fica?= =?UTF-8?q?s=20de=20manera=20descendiente=20-=20Excepto=20cxc=20porque=20s?= =?UTF-8?q?on=20dos=20series,=20tienen=20que=20estar=20en=20el=20orden=20q?= =?UTF-8?q?ue=20vienen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- General/RepIndicadorResumen.aspx.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 6d0f8569b..7f8645f87 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -225,7 +225,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_vxp = top_vxp.Union(group_resto_vxp) + Dim query_vxp = top_vxp.Union(group_resto_vxp).OrderByDescending(Function(x) x.Valor) 'Dim query_vxp = top_vxp.Concat(From e In resto_vxp Group e By e.Texto Into gpo = Group) 'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group 'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList() @@ -255,7 +255,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores) + Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores).OrderByDescending(Function(x) x.Valor) 'Compras TipoProveedor=1 Acreedores (Gastos) DtCompAcreed.Reset() @@ -284,7 +284,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed) + Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed).OrderByDescending(Function(x) x.Valor) 'Cuentas por cobrar x Cliente -- Saldo DtCxC.Reset() @@ -313,7 +313,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxc = top_cxc.Union(group_resto_cxc) + Dim query_cxc = top_cxc.Union(group_resto_cxc) '.OrderByDescending(Function(x) x.Valor) 'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CxC.Rows)) 'Cuentas por cobrar x Cliente -- Recuperado @@ -343,7 +343,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) + Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) '.OrderByDescending(Function(x) x.Valor) 'CxP proveedores DtCxP192.Reset() @@ -372,7 +372,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192) + Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192).OrderByDescending(Function(x) x.Valor) 'CxP NO proveedor DtCxP.Reset() @@ -401,7 +401,7 @@ Partial Class General_RepIndicadorResumen .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Unidad = "MXN" }) - Dim query_cxp = top_cxp.Union(group_resto_cxp) + Dim query_cxp = top_cxp.Union(group_resto_cxp).OrderByDescending(Function(x) x.Valor) 'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CompProductores = query_comp_productores, .CompAcreed = query_comp_acreed, .CxC = query_cxc, .CxCR = query_cxcr, .CxP192 = query_cxp192, .CxP = query_cxp})