RepEstadoActividades.aspx
This commit is contained in:
1836
AC/Reportes/RepEstadoActividadesConta2.rdlc
Normal file
1836
AC/Reportes/RepEstadoActividadesConta2.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
@@ -66,7 +66,25 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
|
||||
|
||||
<label class="col-md-1" runat="server" >Ver con Sub Totales: </label>
|
||||
<div class="col-md-1" >
|
||||
<asp:DropDownList ID="DdlVerConSubTotales" runat="server" CssClass="select2me" >
|
||||
<asp:ListItem Text="Si" Value="1" ></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||
@@ -74,7 +92,6 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1" runat="server" id="DivTipo1" visible="false" >Tipo: </label>
|
||||
<div class="col-md-1" runat="server" id="DivTipo2" visible="false" >
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
|
||||
@@ -84,10 +101,9 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -96,17 +112,18 @@
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<table style="width: 100%;" class="">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
CssClass=" Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
@@ -136,7 +153,8 @@
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
CssClass=" Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -177,7 +195,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPPTotal" runat="server">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>Resultados del Ejercicio:</h4>
|
||||
|
||||
@@ -215,6 +215,104 @@ Partial Class AC_RepEstadoActividades
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
|
||||
If DdlVerConSubTotales.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
Dim idxUtilidadBruta As Integer = 0
|
||||
Dim idxUtilidadOperacion As Integer = 0
|
||||
Dim idxUtilidadAntesImpuestos As Integer = 0
|
||||
|
||||
Dim IndexActual As Integer = 0
|
||||
For Each dRow As DataRow In DtGastos.Rows
|
||||
|
||||
If dRow("Codigo").ToString.Contains("6000000") Then 'Utilidad Bruta indice que se tomara
|
||||
idxUtilidadBruta = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Codigo").ToString.Contains("7000000") Then 'Utilidad de Operación
|
||||
idxUtilidadOperacion = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Nombre").ToString.Contains("TOTAL GASTOS") Then 'Utilidad antes de impuestos
|
||||
idxUtilidadAntesImpuestos = IndexActual
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
Next
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
'DtIngresos
|
||||
|
||||
Dim UtilidadBrutaActual, UtilidadBrutaAcumulada As Decimal
|
||||
Dim UtilidadOperacionActual, UtilidadOperacionAcumulada As Decimal
|
||||
Dim UtilidadAntesImpuestosActual, UtilidadAntesImpuestosAcumulada As Decimal
|
||||
|
||||
UtilidadBrutaActual = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ")
|
||||
UtilidadBrutaAcumulada = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1")
|
||||
|
||||
UtilidadOperacionActual = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
UtilidadOperacionAcumulada = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
|
||||
UtilidadAntesImpuestosActual = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '6%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
UtilidadAntesImpuestosAcumulada = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '6%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
|
||||
Dim dRowUtilidadBruta As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadBrutaVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadOperacion As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadOperacionVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadAntesImpuestos As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadAntesImpuestosVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
|
||||
|
||||
dRowUtilidadBruta("Nombre") = "Utilidad Bruta"
|
||||
dRowUtilidadBruta("ImporteActual") = UtilidadBrutaActual
|
||||
dRowUtilidadBruta("ImporteAcumulado") = UtilidadBrutaAcumulada
|
||||
dRowUtilidadBruta("CtaMayor") = -1
|
||||
dRowUtilidadBruta("Orden") = "600"
|
||||
dRowUtilidadBrutaVacio("CtaMayor") = -1
|
||||
dRowUtilidadBrutaVacio("Orden") = "600"
|
||||
|
||||
dRowUtilidadOperacion("Nombre") = "Utilidad de Operación"
|
||||
dRowUtilidadOperacion("ImporteActual") = UtilidadOperacionActual
|
||||
dRowUtilidadOperacion("ImporteAcumulado") = UtilidadOperacionAcumulada
|
||||
dRowUtilidadOperacion("CtaMayor") = -1
|
||||
dRowUtilidadOperacion("Orden") = "700"
|
||||
dRowUtilidadOperacionVacio("CtaMayor") = -1
|
||||
dRowUtilidadOperacionVacio("Orden") = "700"
|
||||
|
||||
dRowUtilidadAntesImpuestos("Nombre") = "Utilidad antes de impuestos"
|
||||
dRowUtilidadAntesImpuestos("ImporteActual") = UtilidadAntesImpuestosActual
|
||||
dRowUtilidadAntesImpuestos("ImporteAcumulado") = UtilidadAntesImpuestosAcumulada
|
||||
dRowUtilidadAntesImpuestos("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestos("Orden") = "790"
|
||||
dRowUtilidadAntesImpuestosVacio("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestosVacio("Orden") = "790"
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBruta, idxUtilidadBruta)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBrutaVacio, idxUtilidadBruta + 1)
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacion, idxUtilidadOperacion)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacionVacio, idxUtilidadOperacion + 1)
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestos, idxUtilidadAntesImpuestos)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestosVacio, idxUtilidadAntesImpuestos + 1)
|
||||
|
||||
'ImporteActual
|
||||
'ImporteAcumulado
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
End If
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
@@ -278,6 +376,11 @@ Partial Class AC_RepEstadoActividades
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -305,6 +408,12 @@ Partial Class AC_RepEstadoActividades
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -337,12 +446,10 @@ Partial Class AC_RepEstadoActividades
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.Text, DdlEjercicio.SelectedItem.Text)))
|
||||
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividadesConta2.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
' UsuarioActual.Empresa.GrupoEmpresa
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user