Estado resultados Lateral subProyectos, IE asignar Folio al seleccionar cuenta cuando no esta timbrado
This commit is contained in:
@@ -6215,7 +6215,7 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function GetEstadosAnuallHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal")
|
DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal")
|
||||||
@@ -6241,5 +6241,34 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean
|
||||||
|
Dim Retorno = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@Divisor", SqlDbType.Int).Value = Divisor
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(DSet)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
Me.OnError("Ocurrió un error al obtener el Estado de resultados anual horizontal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
End Class
|
End Class
|
||||||
@@ -1372,10 +1372,17 @@ Partial Class Bancos_IE
|
|||||||
BtnGuardar.Enabled = True
|
BtnGuardar.Enabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
|
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
|
||||||
'si solo es de egreso el movimiento debe de generar el siguiente folio.
|
'si solo es de egreso el movimiento debe de generar el siguiente folio.
|
||||||
|
|
||||||
|
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||||
|
Dim ActualizaCuenta As Boolean = False
|
||||||
|
|
||||||
|
If (Not ExistenComplementosVigentes) And UsuarioActual.TienePermisoProceso(99) And BtnActualizar.Visible = True Then
|
||||||
|
ActualizaCuenta = True
|
||||||
|
End If
|
||||||
|
|
||||||
If HdnTipoTransaccion.Value = "Egs" AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Or Opcion = "DevDinC" Then
|
If HdnTipoTransaccion.Value = "Egs" AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Or Opcion = "DevDinC" Or ActualizaCuenta Then
|
||||||
|
|
||||||
Dim Folio As Long
|
Dim Folio As Long
|
||||||
Dim Banco As New ClsBancos
|
Dim Banco As New ClsBancos
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiSubProyectoLbl" >SubProyecto: </label>
|
<label class="col-md-2" style="width: 80px;" runat="server" id="LiSubProyectoLbl" >SubProyecto: </label>
|
||||||
<div class="col-md-2 " runat="server" id="LiSubProyectoDdl">
|
<div class="col-md-2 " runat="server" id="LiSubProyectoDdl">
|
||||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -764,17 +764,247 @@
|
|||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabSubProyecto" runat="server" HeaderText="Sub Proyecto H.">
|
<ajax:TabPanel ID="TabSubProyecto" runat="server" HeaderText="Sub Proyecto H.">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
|
|
||||||
|
|
||||||
|
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" padding="0">
|
||||||
|
<asp:UpdatePanel ID="UpDatosSubProyectoH" UpdateMode="Conditional" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<asp:GridView ID="GvIngresosSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresosSubProyectoH_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||||
|
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>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
|
<%--<asp:TemplateField HeaderText="Período Actual">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>--%>
|
||||||
|
|
||||||
|
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
|
||||||
|
<asp:TemplateField HeaderText="Acumulado">
|
||||||
|
<ItemTemplate>
|
||||||
|
<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:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<asp:GridView ID="GvGastosSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastosSubProyectoH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover 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>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <asp:TemplateField HeaderText="Período Actual">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>--%>
|
||||||
|
|
||||||
|
<%-- <asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
|
||||||
|
<asp:TemplateField HeaderText="Acumulado">
|
||||||
|
<ItemTemplate>
|
||||||
|
<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:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||||
|
</Columns>
|
||||||
|
|
||||||
|
</asp:GridView>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<asp:GridView ID="GvTotalesSubProyectoH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvTotalesSubProyectoH_RowDataBound" ShowHeader="true" CssClass="table table-striped table-hover 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>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="Totales"></asp:Label>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="400px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Acumulado">
|
||||||
|
<ItemTemplate>
|
||||||
|
<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:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||||
|
</Columns>
|
||||||
|
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<table class="table table-striped table-hover Widthall" style="display: none">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h4>Resultados del Ejercicio:</h4>
|
||||||
|
</td>
|
||||||
|
<td width="30%" align="right">
|
||||||
|
<asp:Label runat="server" Font-Bold="true" ID="Label3"></asp:Label>
|
||||||
|
</td>
|
||||||
|
<td width="30%" align="right">
|
||||||
|
<asp:Label runat="server" Font-Bold="true" ID="Label4"></asp:Label>
|
||||||
|
</td>
|
||||||
|
<td width="12%" align="right"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,62 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region " S U B P R O Y E C T O H O R I Z O N T A L "
|
||||||
|
|
||||||
|
Private Property DtDatosSubProyectoH As DataTable
|
||||||
|
Get
|
||||||
|
DtDatosSubProyectoH = DirectCast(ViewState("DtDatosSubProyectoH"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtDatosSubProyectoH") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DtIngresosSubProyectoH As DataTable
|
||||||
|
Get
|
||||||
|
DtIngresosSubProyectoH = DirectCast(ViewState("DtIngresosSubProyectoH"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtIngresosSubProyectoH") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DtGastosSubProyectoH As DataTable
|
||||||
|
Get
|
||||||
|
DtGastosSubProyectoH = DirectCast(ViewState("DtGastosSubProyectoH"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtGastosSubProyectoH") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DTTotalesSubProyectoH As DataTable
|
||||||
|
Get
|
||||||
|
DTTotalesSubProyectoH = DirectCast(ViewState("DTTotalesSubProyectoH"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DTTotalesSubProyectoH") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DTSubProyectosCabecerasH As DataTable
|
||||||
|
|
||||||
|
Get
|
||||||
|
DTSubProyectosCabecerasH = DirectCast(ViewState("DTSubProyectosCabecerasH"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DTSubProyectosCabecerasH") = value
|
||||||
|
End Set
|
||||||
|
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
@@ -188,6 +244,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
'TxtFechaFin.Text = Date.Now.ToShortDateString
|
'TxtFechaFin.Text = Date.Now.ToShortDateString
|
||||||
CargaEjercicios()
|
CargaEjercicios()
|
||||||
|
|
||||||
|
DdlSubproyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||||
|
DdlSubproyecto.DataBind()
|
||||||
|
|
||||||
' CargaDatos()
|
' CargaDatos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -312,7 +371,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
'SUBPROYECTO
|
'SUBPROYECTO
|
||||||
If Tab.ActiveTabIndex = 3 Then
|
If Tab.ActiveTabIndex = 3 Then
|
||||||
|
CargaDatosSubProyectoH()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -520,7 +579,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
If DtDatosMesH IsNot Nothing Then
|
If DtDatosMesH IsNot Nothing Then
|
||||||
CargaGridsMesH()
|
CargaGridsMesH()
|
||||||
SumaTotalesMesH()
|
SumaTotalesMesH()
|
||||||
|
Else
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -615,23 +676,23 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
Row = DTTotalesMesH.NewRow
|
Row = DTTotalesMesH.NewRow
|
||||||
|
|
||||||
Row.Item("Enero") = DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Enero", "NOT CtaMayor in (3,4)")
|
Row.Item("Enero") = DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Enero", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Febrero") = DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)")
|
Row.Item("Febrero") = DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Marzo") = DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)")
|
Row.Item("Marzo") = DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Marzo", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Abril") = DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Abril", "NOT CtaMayor in (3,4)")
|
Row.Item("Abril") = DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Mayo") = DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)")
|
Row.Item("Mayo") = DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Mayo", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Junio") = DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Junio", "NOT CtaMayor in (3,4)")
|
Row.Item("Junio") = DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Julio") = DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Julio", "NOT CtaMayor in (3,4)")
|
Row.Item("Julio") = DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Julio", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Agosto") = DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)")
|
Row.Item("Agosto") = DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Septiembre") = DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)")
|
Row.Item("Septiembre") = DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Septiembre", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Octubre") = DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)")
|
Row.Item("Octubre") = DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Noviembre") = DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")
|
Row.Item("Noviembre") = DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)")
|
||||||
Row.Item("Diciembre") = DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)") - DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
|
Row.Item("Diciembre") = DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)")
|
||||||
|
|
||||||
Row.Item("Nombre") = "Resultados del Ejercicio:"
|
Row.Item("Nombre") = "Resultados del Ejercicio:"
|
||||||
'Row.Item("ImporteActual") = TotalActual.ToString
|
'Row.Item("ImporteActual") = TotalActual.ToString
|
||||||
'Row.Item("PorcentajeActual") = "100.00"
|
'Row.Item("PorcentajeActual") = "100.00"
|
||||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
Row.Item("ImporteAcumulado") = DtIngresosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") ' TotalAnterior.ToString
|
||||||
'Row.Item("PorcentajeAcumulado") = "100.00"
|
'Row.Item("PorcentajeAcumulado") = "100.00"
|
||||||
'Row.Item("CtaMayor") = -1
|
'Row.Item("CtaMayor") = -1
|
||||||
|
|
||||||
@@ -750,7 +811,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetEstadosAnuallHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
DtDatosAnualH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
DtDatosAnualH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||||
Else
|
Else
|
||||||
DtDatosAnualH = Nothing
|
DtDatosAnualH = Nothing
|
||||||
@@ -926,13 +987,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
|
|
||||||
IndexData = 13
|
IndexData = 13
|
||||||
For IndexData = 13 To IndexMax
|
For IndexData = 13 To IndexMax
|
||||||
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
|
Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Row.Item("Nombre") = "Resultados del Ejercicio:"
|
Row.Item("Nombre") = "Resultados del Ejercicio:"
|
||||||
'Row.Item("ImporteActual") = TotalActual.ToString
|
'Row.Item("ImporteActual") = TotalActual.ToString
|
||||||
'Row.Item("PorcentajeActual") = "100.00"
|
'Row.Item("PorcentajeActual") = "100.00"
|
||||||
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (3,4)")
|
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
|
||||||
'Row.Item("PorcentajeAcumulado") = "100.00"
|
'Row.Item("PorcentajeAcumulado") = "100.00"
|
||||||
'Row.Item("CtaMayor") = -1
|
'Row.Item("CtaMayor") = -1
|
||||||
|
|
||||||
@@ -1038,7 +1099,293 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "S U B P R O Y E C T O H O R I Z O N T A L"
|
||||||
|
|
||||||
|
Private Sub CargaDatosSubProyectoH()
|
||||||
|
|
||||||
|
|
||||||
|
FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}"
|
||||||
|
FechaFMes = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}"
|
||||||
|
FechaFMes = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaFMes))).ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
|
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If ObjConta.GetEstadosSubProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
|
DTSubProyectosCabecerasH = ObjConta.DSResultados.Tables(0)
|
||||||
|
DtDatosSubProyectoH = ObjConta.DSResultados.Tables(1).FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||||
|
Else
|
||||||
|
DtDatosSubProyectoH = Nothing
|
||||||
|
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
If DtDatosSubProyectoH IsNot Nothing And DTSubProyectosCabecerasH IsNot Nothing Then
|
||||||
|
CargaGridsSubProyectoH()
|
||||||
|
SumaTotalesSubProyectoH()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaGridsSubProyectoH()
|
||||||
|
|
||||||
|
DtIngresosSubProyectoH = DtDatosSubProyectoH.FiltraParametros("Tipo ='H' ")
|
||||||
|
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
|
||||||
|
Dim IndexTotatles As Integer = 13 + IndexSubProyectoMAx
|
||||||
|
|
||||||
|
If DtIngresosSubProyectoH.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For Each dCoumn As DataColumn In DtIngresosSubProyectoH.Columns
|
||||||
|
|
||||||
|
If IndexData >= 13 Then
|
||||||
|
|
||||||
|
If IndexSubProyecto <= IndexSubProyectoMAx Then
|
||||||
|
|
||||||
|
CType(GvIngresosSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
|
||||||
|
GvIngresosSubProyectoH.Columns(IndexGv).Visible = True
|
||||||
|
|
||||||
|
CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
|
||||||
|
GvTotalesSubProyectoH.Columns(IndexGv).Visible = True
|
||||||
|
|
||||||
|
If IndexSubProyecto <= IndexSubProyectoMAx Then
|
||||||
|
CType(GvIngresosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
|
||||||
|
CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
|
||||||
|
CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
GvIngresosSubProyectoH.Columns(IndexGv).Visible = False
|
||||||
|
GvTotalesSubProyectoH.Columns(IndexGv).Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
IndexGv = IndexGv + 1
|
||||||
|
IndexSubProyecto = IndexSubProyecto + 1
|
||||||
|
IndexMax = IndexMax + 1
|
||||||
|
|
||||||
|
End If
|
||||||
|
IndexData = IndexData + 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
For Each dr As DataRow In DtIngresosSubProyectoH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
|
||||||
|
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||||
|
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||||
|
Next
|
||||||
|
|
||||||
|
IndexData = 13
|
||||||
|
For IndexData = 13 To IndexTotatles
|
||||||
|
Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
|
||||||
|
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("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
|
||||||
|
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||||
|
Row.Item("CtaMayor") = -1
|
||||||
|
DtIngresosSubProyectoH.Rows.Add(Row)
|
||||||
|
Else
|
||||||
|
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||||
|
Row.Item("ImporteActual") = "0.00"
|
||||||
|
Row.Item("ImporteAcumulado") = "0.00"
|
||||||
|
Row.Item("CtaMayor") = -1
|
||||||
|
DtIngresosSubProyectoH.Rows.Add(Row)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim T1 = TotalActual, T2 = TotalAnterior
|
||||||
|
|
||||||
|
TotalActual = 0
|
||||||
|
TotalAnterior = 0
|
||||||
|
|
||||||
|
Row = DtGastosSubProyectoH.NewRow
|
||||||
|
|
||||||
|
If DtGastosSubProyectoH.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
IndexData = 0
|
||||||
|
IndexGv = 1
|
||||||
|
IndexMax = 0
|
||||||
|
IndexSubProyecto = 0
|
||||||
|
|
||||||
|
For Each dCoumn As DataColumn In DtIngresosSubProyectoH.Columns
|
||||||
|
If IndexData >= 13 Then
|
||||||
|
If IndexSubProyecto <= IndexSubProyectoMAx Then
|
||||||
|
CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
|
||||||
|
GvGastosSubProyectoH.Columns(IndexGv).Visible = True
|
||||||
|
CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName
|
||||||
|
GvTotalesSubProyectoH.Columns(IndexGv).Visible = True
|
||||||
|
Else
|
||||||
|
GvIngresosSubProyectoH.Columns(IndexGv).Visible = False
|
||||||
|
GvTotalesSubProyectoH.Columns(IndexGv).Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
IndexGv = IndexGv + 1
|
||||||
|
IndexSubProyecto = IndexSubProyecto + 1
|
||||||
|
End If
|
||||||
|
IndexData = IndexData + 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For Each dr As DataRow In DtGastosSubProyectoH.FiltraParametros("NOT CtaMayor in (3,4)").Rows
|
||||||
|
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||||
|
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||||
|
Next
|
||||||
|
|
||||||
|
IndexData = 13
|
||||||
|
For IndexData = 13 To IndexTotatles
|
||||||
|
Row.Item(IndexData) = DtGastosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
|
||||||
|
Next
|
||||||
|
|
||||||
|
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||||
|
Row.Item("ImporteActual") = TotalActual
|
||||||
|
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||||
|
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||||
|
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||||
|
Row.Item("CtaMayor") = -1
|
||||||
|
DtGastosSubProyectoH.Rows.Add(Row)
|
||||||
|
Else
|
||||||
|
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||||
|
Row.Item("ImporteActual") = "0.00"
|
||||||
|
Row.Item("ImporteAcumulado") = "0.00"
|
||||||
|
Row.Item("CtaMayor") = -1
|
||||||
|
DtGastosSubProyectoH.Rows.Add(Row)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DtIngresosSubProyectoH.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
Row = DTTotalesSubProyectoH.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IndexData = 13
|
||||||
|
For IndexData = 13 To IndexTotatles
|
||||||
|
Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") - DtGastosSubProyectoH.SUM($"[{DtGastosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)")
|
||||||
|
Next
|
||||||
|
|
||||||
|
Row.Item("Nombre") = "Resultados del Ejercicio:"
|
||||||
|
'Row.Item("ImporteActual") = TotalActual.ToString
|
||||||
|
'Row.Item("PorcentajeActual") = "100.00"
|
||||||
|
Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosSubProyectoH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
|
||||||
|
'Row.Item("PorcentajeAcumulado") = "100.00"
|
||||||
|
'Row.Item("CtaMayor") = -1
|
||||||
|
|
||||||
|
DTTotalesSubProyectoH.Rows.Add(Row)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
GvIngresosSubProyectoH.DataSource = DtIngresosSubProyectoH
|
||||||
|
GvIngresosSubProyectoH.DataBind()
|
||||||
|
|
||||||
|
GvGastosSubProyectoH.DataSource = DtGastosSubProyectoH
|
||||||
|
GvGastosSubProyectoH.DataBind()
|
||||||
|
|
||||||
|
GvTotalesSubProyectoH.DataSource = DTTotalesSubProyectoH
|
||||||
|
GvTotalesSubProyectoH.DataBind()
|
||||||
|
|
||||||
|
UpDatosSubProyectoH.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SumaTotalesSubProyectoH()
|
||||||
|
'Llena Lb´s Totales
|
||||||
|
'*********************************************************************************
|
||||||
|
LbTotalActual.Text = TotalActualMes.ToString.FormatoNumero
|
||||||
|
LbTotalAnterior.Text = TotalAnteriorMes.ToString.FormatoNumero
|
||||||
|
|
||||||
|
LbTotalActual.ForeColor = If(TotalActualMes < 0, Drawing.Color.Red, Color.Black)
|
||||||
|
LbTotalAnterior.ForeColor = If(TotalAnteriorMes < 0, Drawing.Color.Red, Color.Black)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvIngresosSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||||
|
TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||||
|
TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||||
|
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||||
|
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||||
|
e.Row.ControlStyle.Font.Bold = True
|
||||||
|
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||||
|
'e.Row.CssClass = "SubTotales3"
|
||||||
|
e.Row.ControlStyle.Font.Bold = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||||
|
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
|
||||||
|
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||||
|
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||||
|
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvGastosSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||||
|
TotalActualMes -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||||
|
TotalAnteriorMes -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||||
|
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||||
|
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||||
|
e.Row.ControlStyle.Font.Bold = True
|
||||||
|
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||||
|
'e.Row.CssClass = "SubTotales"
|
||||||
|
e.Row.ControlStyle.Font.Bold = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||||
|
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
|
||||||
|
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||||
|
' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||||
|
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvTotalesSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.Header Then
|
||||||
|
' e.Row.Attributes.Add("style", "display:none")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
e.Row.Attributes.Add("style", "Font-weight: bold")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user