-- mejoras

This commit is contained in:
2022-12-07 11:47:30 -07:00
parent e686462186
commit 361051ac09
2 changed files with 72 additions and 148 deletions

View File

@@ -33,7 +33,7 @@
} }
div[id^=chartdiv] { div[id^=chartdiv] {
width: 100%; width: 100%;
height: 500px; height: 400px;
} }
</style> </style>
</asp:Content> </asp:Content>
@@ -122,13 +122,13 @@
</div> </div>
<div class="portlet-body formnombottom"> <div class="portlet-body formnombottom">
<asp:GridView ID="GvVxP" runat="server" GridLines="None" <asp:GridView ID="GvVxP" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover ScrollAD Widthall" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" /> <asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" /> <asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" /> <asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -167,7 +167,7 @@
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span id="Span8" runat="server" class="caption-subject bold uppercase">Compras por Productos - Proveedor Productor</span> <span id="Span8" runat="server" class="caption-subject bold uppercase">Compras Productores</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
@@ -179,19 +179,18 @@
</div> </div>
<div class="portlet-body formnombottom"> <div class="portlet-body formnombottom">
<asp:GridView ID="GvCxP192" runat="server" GridLines="None" <asp:GridView ID="GvCxP192" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" /> <asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" /> <asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" /> <asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" /> <asp:BoundField DataFormatString="{0:c}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="PUnit/KG" />
<asp:BoundField DataFormatString="{0:n}" DataField="Merma" ItemStyle-CssClass="margenbound" HeaderText="Merma" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<%--<asp:GridView ID="GridView1" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="True" AllowPaging="False" ShowFooter="False">
</asp:GridView>--%>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -223,12 +222,12 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<asp:UpdatePanel ID="UPTablaCxP" runat="server" class="portlet light xspadding bordered " align="left" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPTablaComprasAcreed" runat="server" class="portlet light xspadding bordered " align="left" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span id="Span1" runat="server" class="caption-subject bold uppercase">Compras por Productos </span> <span id="Span1" runat="server" class="caption-subject bold uppercase">Compras para Gastos </span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
@@ -239,14 +238,13 @@
</div> </div>
</div> </div>
<div class="portlet-body formnombottom"> <div class="portlet-body formnombottom">
<asp:GridView ID="GvCxP" runat="server" GridLines="None" <asp:GridView ID="GvComprasAcreed" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:BoundField DataField="Gpo" HeaderText="Prod/Serv" ItemStyle-Width="300px" /> <asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-Width="300px" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" /> <asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" /> <asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataField="Abreviatura" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -255,12 +253,12 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<asp:UpdatePanel ID="UPGraficaCxP" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false"> <asp:UpdatePanel ID="UPGraficaComprasAcreed" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
<ContentTemplate> <ContentTemplate>
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span id="Span2" runat="server" class="caption-subject bold uppercase">Compras por Productos - Gráfica </span> <span id="Span2" runat="server" class="caption-subject bold uppercase">Compras por clasificación - Gráfica </span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
@@ -297,12 +295,11 @@
</div> </div>
<div class="portlet-body formnombottom"> <div class="portlet-body formnombottom">
<asp:GridView ID="GvCCxC" runat="server" GridLines="None" <asp:GridView ID="GvCCxC" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:BoundField DataField="Gpo" HeaderText="Cliente" /> <asp:BoundField DataField="Gpo" HeaderText="Cliente" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" /> <asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataField="CveMoneda" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -336,7 +333,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<asp:UpdatePanel ID="UPTablaCPxP" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPTablaCxP" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
@@ -352,13 +349,12 @@
</div> </div>
</div> </div>
<div class="portlet-body formnombottom"> <div class="portlet-body formnombottom">
<asp:GridView ID="GvCPxP" runat="server" GridLines="None" <asp:GridView ID="GvCxP" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:BoundField DataField="Gpo" HeaderText="Proveedor" /> <asp:BoundField DataField="Gpo" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" /> <asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataField="CveMoneda" ItemStyle-CssClass="margenbound" HeaderText="" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -389,67 +385,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-6">
<asp:UpdatePanel ID="UPIndicadores" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span10" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor Productor</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<asp:GridView ID="GvIndicadores" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="SubTotal" />
<asp:BoundField DataFormatString="{0:c}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="PUnit/KG" />
<asp:BoundField DataFormatString="{0:n}" DataField="Merma" ItemStyle-CssClass="margenbound" HeaderText="Merma" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<%--<div class="col-md-6">
<asp:UpdatePanel ID="UPGraficaIndicadores" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
<ContentTemplate>
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span id="Span11" runat="server" class="caption-subject bold uppercase">Indicadores por Proveedor Productor- Gráfica </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body formnombottom">
<div id="chartdiv_indicadores"></div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>--%>
</div>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:AsyncPostBackTrigger ControlID="btnConsultar" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="btnConsultar" EventName="Click" />

View File

@@ -181,16 +181,16 @@ Partial Class General_RepIndicadorResumen
CxP192 = Nothing CxP192 = Nothing
End If End If
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1, 'If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then ' UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then
CxP = ObjCompras.DtResultados ' CxP = ObjCompras.DtResultados
CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC" ' CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
CxP = CxP.DefaultView.ToTable ' CxP = CxP.DefaultView.ToTable
GvCxP.DataSource = CxP ' GvCxP.DataSource = CxP
Else 'Else
GvCxP.DataSource = Nothing ' GvCxP.DataSource = Nothing
CxP = Nothing ' CxP = Nothing
End If 'End If
Dim FechaCorte As String = $"31/12/{Now.Year}" Dim FechaCorte As String = $"31/12/{Now.Year}"
@@ -206,15 +206,15 @@ Partial Class General_RepIndicadorResumen
CCxC = Nothing CCxC = Nothing
End If End If
If ObjMovtos.GetCxP(TxtFechaI.Text, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, 1, -1, If ObjMovtos.GetCxP(MinFecha, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, 5, -1, 1,
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
CPxP = ObjMovtos.DtResultados CPxP = ObjMovtos.DtResultados
CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC" CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC"
CPxP = CPxP.DefaultView.ToTable CPxP = CPxP.DefaultView.ToTable
GvCPxP.DataSource = CPxP GvCxP.DataSource = CPxP
Else Else
GvCPxP.DataSource = Nothing GvCxP.DataSource = Nothing
CPxP = Nothing CPxP = Nothing
End If End If
@@ -227,15 +227,11 @@ Partial Class General_RepIndicadorResumen
' gv1 = Nothing ' gv1 = Nothing
'End If 'End If
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text) Then If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
Indicadores = ObjCitrus.DtResultados GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(0)
Indicadores.DefaultView.Sort = "Saldo DESC" GvComprasAcreed.DataSource = ObjCitrus.DTSetResultados.Tables(1)
Indicadores = Indicadores.DefaultView.ToTable CxP = ObjCitrus.DTSetResultados.Tables(1)
GvIndicadores.DataSource = Indicadores
Else
GvIndicadores.DataSource = Nothing
Indicadores = Nothing
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
@@ -245,11 +241,10 @@ Partial Class General_RepIndicadorResumen
GvVxP.DataBind() GvVxP.DataBind()
GvCxP192.DataBind() GvCxP192.DataBind()
GvCxP.DataBind() GvComprasAcreed.DataBind()
'GridView1.DataBind()
GvCCxC.DataBind() GvCCxC.DataBind()
GvCPxP.DataBind() GvCxP.DataBind()
GvIndicadores.DataBind()
'Mostrar gráficos solo si hay datos en su respectiva tabla 'Mostrar gráficos solo si hay datos en su respectiva tabla
If GvVxP.Rows.Count > 0 Then If GvVxP.Rows.Count > 0 Then
@@ -257,10 +252,10 @@ Partial Class General_RepIndicadorResumen
Else Else
UPGraficaVxP.Visible = False UPGraficaVxP.Visible = False
End If End If
If GvCxP.Rows.Count > 0 Then If GvComprasAcreed.Rows.Count > 0 Then
UPGraficaCxP.Visible = True UPGraficaComprasAcreed.Visible = True
Else Else
UPGraficaCxP.Visible = False UPGraficaComprasAcreed.Visible = False
End If End If
If GvCxP192.Rows.Count > 0 Then If GvCxP192.Rows.Count > 0 Then
UPGraficaCxP192.Visible = True UPGraficaCxP192.Visible = True
@@ -272,7 +267,7 @@ Partial Class General_RepIndicadorResumen
Else Else
UPGraficaCCxC.Visible = False UPGraficaCCxC.Visible = False
End If End If
If GvCPxP.Rows.Count > 0 Then If GvCxP.Rows.Count > 0 Then
UPGraficaCPxP.Visible = True UPGraficaCPxP.Visible = True
Else Else
UPGraficaCPxP.Visible = False UPGraficaCPxP.Visible = False
@@ -284,7 +279,7 @@ Partial Class General_RepIndicadorResumen
'End If 'End If
'Si no había datos en ninguna tabla no cargar función de gráficos 'Si no había datos en ninguna tabla no cargar función de gráficos
If (GvVxP.Rows.Count = 0 AndAlso GvCxP.Rows.Count = 0 AndAlso GvCxP192.Rows.Count = 0 AndAlso GvCCxC.Rows.Count = 0 AndAlso GvCPxP.Rows.Count = 0) Then Exit Sub If (GvVxP.Rows.Count = 0 AndAlso GvComprasAcreed.Rows.Count = 0 AndAlso GvCxP192.Rows.Count = 0 AndAlso GvCCxC.Rows.Count = 0 AndAlso GvCxP.Rows.Count = 0) Then Exit Sub
GraficasPastel() GraficasPastel()
'GraficasBarras() 'GraficasBarras()
End Sub End Sub
@@ -295,22 +290,21 @@ Partial Class General_RepIndicadorResumen
End If End If
End If End If
End Sub End Sub
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound Protected Sub GvComprasAcreed_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvComprasAcreed.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden") 'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
If e.Row.DBCampo("Orden") = "00ND" Then If e.Row.DBCampo("CveClasificacion") = "" Then
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
End If End If
End If End If
End Sub End Sub
Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden") 'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
If e.Row.DBCampo("Orden") = "00ND" Then 'If e.Row.DBCampo("Orden") = "00ND" Then
e.Row.CssClass = "Totales" ' e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura") ' e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
End If 'End If
End If End If
End Sub End Sub
Protected Sub GvCCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCCxC.RowDataBound Protected Sub GvCCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCCxC.RowDataBound
@@ -319,25 +313,19 @@ Partial Class General_RepIndicadorResumen
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
End If End If
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura 'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" ' e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
End If End If
End Sub End Sub
Protected Sub GvCPxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCPxP.RowDataBound Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Orden") = "" Then If e.Row.DBCampo("Orden") = "" Then
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
End If End If
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura 'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" ' e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
End If End If
End Sub End Sub
Protected Sub GvIndicadores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvIndicadores.RowDataBound
'If e.Row.RowType = DataControlRowType.DataRow Then
' If e.Row.DBCampo("Orden") = "" Then
' e.Row.CssClass = "Totales"
' End If
'End If
End Sub
Private Sub CreaDataTableColor() Private Sub CreaDataTableColor()
DtColor = New DataTable DtColor = New DataTable
DtColor.Columns.Add("Color") DtColor.Columns.Add("Color")
@@ -430,7 +418,7 @@ Partial Class General_RepIndicadorResumen
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Abreviatura").ToString 'Row("Moneda") = Dr("Abreviatura").ToString
DtVxP.Rows.Add(Row) DtVxP.Rows.Add(Row)
RowColorIndex += 1 RowColorIndex += 1
If RowColorIndex = 17 Then If RowColorIndex = 17 Then
@@ -438,7 +426,7 @@ Partial Class General_RepIndicadorResumen
End If End If
End If End If
Next Next
Dim query_vxp = From s In DtVxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} 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()}
'Compras x Producto TipoProveedor=1 'Compras x Producto TipoProveedor=1
DtCxP.Reset() DtCxP.Reset()
@@ -448,13 +436,13 @@ Partial Class General_RepIndicadorResumen
DtCxP.Columns.Add("Moneda") DtCxP.Columns.Add("Moneda")
RowColorIndex = 0 RowColorIndex = 0
For Each Dr As DataRow In CxP.Rows For Each Dr As DataRow In CxP.Rows
If Not Dr("Orden").ToString = "00ND" Then If Dr("CveClasificacion").ToString <> "" Then
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Row = DtCxP.NewRow() Row = DtCxP.NewRow()
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Texto") = Dr("Clasificacion").ToString ' $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
Row("Moneda") = Dr("Abreviatura").ToString Row("Moneda") = Dr("Moneda").ToString
DtCxP.Rows.Add(Row) DtCxP.Rows.Add(Row)
RowColorIndex += 1 RowColorIndex += 1
If RowColorIndex = 17 Then If RowColorIndex = 17 Then
@@ -462,7 +450,7 @@ Partial Class General_RepIndicadorResumen
End If End If
End If End If
Next Next
Dim query_cxp = From s In DtCxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} Dim query_cxp = From s In DtCxP.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Compras x Producto ProveedorClasificacion=192 'Compras x Producto ProveedorClasificacion=192
DtCxP192.Reset() DtCxP192.Reset()
@@ -486,7 +474,7 @@ Partial Class General_RepIndicadorResumen
End If End If
End If End If
Next Next
Dim query_cxp192 = From s In DtCxP192.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} Dim query_cxp192 = From s In DtCxP192.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CCxC.Rows)) 'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CCxC.Rows))
@@ -512,7 +500,7 @@ Partial Class General_RepIndicadorResumen
End If End If
End If End If
Next Next
Dim query_ccxc = From s In DtCCxC.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} Dim query_ccxc = From s In DtCCxC.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'Cuentas por pagar x Proveedor 'Cuentas por pagar x Proveedor
DtCPxP.Reset() DtCPxP.Reset()
@@ -536,7 +524,7 @@ Partial Class General_RepIndicadorResumen
End If End If
End If End If
Next Next
Dim query_cpxp = From s In DtCPxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} Dim query_cpxp = From s In DtCPxP.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172 'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172