Estado resultado horizontal por subproyecto grafica pastel negativos y porcentaje acumulado, Rep ventas utilidad porcentaje, Kardex almacen horizontal congelar dos columnas iniciales filtro por producto

This commit is contained in:
rakcsle
2023-10-18 23:13:00 -07:00
parent ce370181ac
commit 87eb99402b
7 changed files with 87 additions and 31 deletions

View File

@@ -1231,6 +1231,11 @@
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="%" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" >
<ItemTemplate>
<asp:Label ID="LblPorcentajeAcumualdo" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
</Columns>
@@ -1407,7 +1412,15 @@
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:TemplateField HeaderText="%" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" >
<ItemTemplate>
<asp:Label ID="LblPorcentajeAcumualdo" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" />--%>
</Columns>
</asp:GridView>
@@ -1565,11 +1578,20 @@
function CargaGraficaPastel() {
let data = cdatos;
let newData = JSON.parse(JSON.stringify(data));
newData = newData.map(function (item) {
if (item.Valor < 0) {
item.Valor = Math.abs(item.Valor);
}
return item;
});
var chart = AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider":
data,
newData,
"valueField": "Valor",
"titleField": "Texto",
"outlineAlpha": 0.4,
@@ -1583,7 +1605,9 @@
}
function ADSBegin() {
$('.DdlGrafica').on('select2:select', function (e) {
var data = e.params.data;
currentid = data.id;
if (currentid == 1) {
CargaGraficaBarras();
@@ -1752,7 +1776,9 @@
});
}
}
function initamgrafica() {
AmCharts.addInitHandler(function (chart) {
function handleCustomMarkerToggle(legendEvent) {
var dataProvider = legendEvent.chart.dataProvider;

View File

@@ -2096,20 +2096,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
DtGastosSubProyectoH = DtDatosSubProyectoH.FiltraParametros("Tipo ='G' ")
DTTotalesSubProyectoH = DtDatosSubProyectoH.Clone()
Dim Row As DataRow = DtIngresosSubProyectoH.NewRow
Dim TotalActual = 0.0, TotalAnterior = 0.0
Dim IndexData As Integer = 0
Dim IndexGv As Integer = 1
Dim IndexMax As Integer = 1
Dim IndexSubProyecto = 0
Dim IndexSubProyectoMax As Integer = DTSubProyectosCabecerasH.Rows.Count - 1
If IndexSubProyectoMax > GvIngresosSubProyectoH.Columns.Count - 2 Then
IndexSubProyectoMax = GvIngresosSubProyectoH.Columns.Count - 2
End If
@@ -2121,7 +2117,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'34
Dim IDX_LIMPIAR As Integer = 1
For IDX_LIMPIAR = 1 To GvIngresosSubProyectoH.Columns.Count - 2
For IDX_LIMPIAR = 1 To GvIngresosSubProyectoH.Columns.Count - 3
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
GvIngresosSubProyectoH.Columns(IDX_LIMPIAR).Visible = False
@@ -2236,13 +2232,11 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Next
Row.Item("Nombre") = "TOTAL INGRESOS "
Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "Not CtaMayor In (3,4)") 'TotalActual.ToString
Row.Item("PorcentajeActual") = "100.00"
Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "Not CtaMayor In (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = "100.00"
Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1
Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico")
CountDinamicoSubProyecto = DtIngresosSubProyectoH.MAX("CountDinamico").ToEntero
@@ -2299,11 +2293,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End If
Next
Dim totalTemp As Decimal = DtIngresosSubProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")
Row.Item("Nombre") = "Resultado del ejercicio"
Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")
Row.Item("CtaMayor") = -2
Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico").ToString.ToEntero
Row.Item("PorcentajeAcumulado") = If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, 100, (totalTemp * 100 / DtIngresosSubProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")))
DTTotalesSubProyectoH.Rows.Add(Row)
End If
@@ -2316,6 +2314,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
GvIngresosSubProyectoH.DataBind()
'GvIngresosSubProyectoH.Columns(55).Visible = True
'GvIngresosSubProyectoH.Columns(56).Visible = True
UpDatosSubProyectoH.Update()
@@ -2469,6 +2470,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Dim lista As New List(Of Object)
Dim colorindex As Integer = 0
For Each campo As String() In listaCampos
'Dim valorCampo As Decimal = If(e.Row.DBCampo(campo(0)).ToDecimal() < 0, (e.Row.DBCampo(campo(0)).ToDecimal() * -1), e.Row.DBCampo(campo(0)).ToDecimal())
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
colorindex = colorindex + 1
If colorindex >= listacolores.Count Then
@@ -2727,3 +2731,4 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Class