E172 Rep Indicador gráfica barras ventas x productos top 10 y resto
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports MoreLinq
|
||||
|
||||
Partial Class General_RepIndicadorResumen
|
||||
Inherits ClsPaginas
|
||||
@@ -136,9 +137,7 @@ Partial Class General_RepIndicadorResumen
|
||||
Private Sub CargaCombos()
|
||||
|
||||
'Carga SubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, lblSubProyecto)
|
||||
|
||||
TxtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||
TxtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
@@ -243,6 +242,7 @@ Partial Class General_RepIndicadorResumen
|
||||
GvCxP192.DataBind()
|
||||
GvComprasAcreed.DataBind()
|
||||
GvCCxC.DataBind()
|
||||
'GvCCxC.HeaderRow.Cells(1).Text = "<a href=""/CxC/RepCxC.aspx"" target=""_blank"">Saldo</a>"
|
||||
GvCxP.DataBind()
|
||||
|
||||
|
||||
@@ -426,7 +426,18 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_vxp = From s In DtVxP.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim top_vxp = From s In DtVxP.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim resto_vxp = From s In DtVxP.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim group_resto_vxp = resto_vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = g.Sum(Function(x) x.Valor),
|
||||
.Color = "#000000",
|
||||
.Moneda = "MXN"
|
||||
})
|
||||
Dim query_vxp = top_vxp.Union(group_resto_vxp)
|
||||
'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.Moneda}).ToList()
|
||||
|
||||
'Compras x Producto TipoProveedor=1
|
||||
DtCxP.Reset()
|
||||
@@ -533,6 +544,7 @@ Partial Class General_RepIndicadorResumen
|
||||
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CCxC = New String() {}})
|
||||
'Alert(json)
|
||||
RegistraScript($"CargaGraficasPastel({json})", "22")
|
||||
RegistraScript($"CargaGraficasBarras({json})", "223")
|
||||
UPPMov.Update()
|
||||
End Sub
|
||||
Private Sub GraficasBarras()
|
||||
|
||||
Reference in New Issue
Block a user