This commit is contained in:
Antonio Gonzalez
2020-04-24 14:02:00 -07:00
3 changed files with 63 additions and 40 deletions

View File

@@ -3861,6 +3861,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
Dim Retorno = False Dim Retorno = False

View File

@@ -722,7 +722,7 @@
<asp:TemplateField HeaderText="Acumulado"> <asp:TemplateField HeaderText="Acumulado">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -828,11 +828,11 @@
<%-- <asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%> <%-- <asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
<asp:TemplateField HeaderText="Acumulado"> <asp:TemplateField HeaderText="Acumulado">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" /> <asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" Visible="false" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -1053,17 +1053,18 @@
</asp:TemplateField>--%> </asp:TemplateField>--%>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%> <%--<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
<asp:TemplateField HeaderText="Acumulado"> <asp:TemplateField HeaderText="Importe Actual">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" /> <asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" Visible="false" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<br /> <br />
<br /> <br />
<asp:GridView ID="GvGastosAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvGastosAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None"> <asp:GridView ID="GvGastosAnualH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,FechaInicial,FechaFActual,CveSubProyecto,CountDinamico" OnRowDataBound="GvGastosAnualH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns> <Columns>
@@ -1119,7 +1120,7 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" /> <asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" Visible="false" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -1273,20 +1274,26 @@
<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"> <asp:TemplateField HeaderText="Sin SubProyecto">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HLSinSP" runat="server" Text='<%# Eval("SinSP", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>--%> </asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%> <%--<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
<asp:TemplateField HeaderText="Acumulado"> <asp:TemplateField HeaderText="Acumulado">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%> <%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -430,9 +430,12 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
Dim CveSubProyecto As Integer = If(DdlSubproyecto.SelectedValue.ToEntero = -1, -2, DdlSubproyecto.SelectedValue.ToEntero)
If ObjConta.GetSituacionFinanciera2("01/01/1900".ToDate, FechaF.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, TipoReporte) Then If ObjConta.GetSituacionFinanciera2("01/01/1900".ToDate, FechaF.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, TipoReporte) Then
DtDatos = ObjConta.DtResultados DtDatos = ObjConta.DtResultados
@@ -852,7 +855,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
FechaIMes = $"01/01/1900" FechaIMes = $"01/01/1900"
FechaFMes = $"31/12/{DdlEjercicio.SelectedValue}" FechaFMes = $"31/12/{DdlEjercicio.SelectedValue}"
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero Dim CveSubProyecto As Integer = If(DdlSubproyecto.SelectedValue.ToEntero = -1, -2, DdlSubproyecto.SelectedValue.ToEntero)
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
@@ -1243,7 +1246,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
RowAF.Item("Noviembre") = DT_ACTIVO.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") RowAF.Item("Noviembre") = DT_ACTIVO.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM("Noviembre", "NOT CtaMayor in (-1,3,4)")
RowAF.Item("Diciembre") = DT_ACTIVO.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") RowAF.Item("Diciembre") = DT_ACTIVO.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)")
RowAF.Item("Nombre") = "Resultados del Ejercicio:" RowAF.Item("Nombre") = "TOTALES"
RowAF.Item("CtaMayor") = -1 RowAF.Item("CtaMayor") = -1
RowAF.Item("ImporteAcumulado") = DT_ACTIVO.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") ' TotalAnterior.ToString RowAF.Item("ImporteAcumulado") = DT_ACTIVO.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") ' TotalAnterior.ToString
DT_TOTALES.Rows.Add(RowAF) DT_TOTALES.Rows.Add(RowAF)
@@ -1365,7 +1368,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
FechaIMes = $"01/01/1900" FechaIMes = $"01/01/1900"
FechaFMes = $"31/12/{DdlEjercicio.SelectedValue}" FechaFMes = $"31/12/{DdlEjercicio.SelectedValue}"
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero Dim CveSubProyecto As Integer = If(DdlSubproyecto.SelectedValue.ToEntero = -1, -2, DdlSubproyecto.SelectedValue.ToEntero)
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
@@ -1504,7 +1507,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item(IndexData) = DT_ACTIVO_FIJO.SUM($"[{DT_ACTIVO_FIJO.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") Row.Item(IndexData) = DT_ACTIVO_FIJO.SUM($"[{DT_ACTIVO_FIJO.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Next Next
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL ACTIVO NO CIRCULANTE"
Row.Item("ImporteActual") = DT_ACTIVO_FIJO.SUM("ImporteActual", "NOT CtaMayor in (3,4)") Row.Item("ImporteActual") = DT_ACTIVO_FIJO.SUM("ImporteActual", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeActual") = 100.0 Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DT_ACTIVO_FIJO.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") Row.Item("ImporteAcumulado") = DT_ACTIVO_FIJO.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
@@ -1512,7 +1515,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
DT_ACTIVO_FIJO.Rows.Add(Row) DT_ACTIVO_FIJO.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL ACTIVO NO CIRCULANTE"
Row.Item("ImporteActual") = "0.00" Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00" Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
@@ -1531,15 +1534,15 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item(IndexData) = DT_ACTIVO_DIFERIDO.SUM($"[{DT_ACTIVO_DIFERIDO.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") Row.Item(IndexData) = DT_ACTIVO_DIFERIDO.SUM($"[{DT_ACTIVO_DIFERIDO.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Next Next
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL ACTIVO DIFERIDO"
Row.Item("ImporteActual") = DtIngresosAnualH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") Row.Item("ImporteActual") = DT_ACTIVO_DIFERIDO.SUM("ImporteActual", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeActual") = 100.0 Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") Row.Item("ImporteAcumulado") = DT_ACTIVO_DIFERIDO.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
DT_ACTIVO_DIFERIDO.Rows.Add(Row) DT_ACTIVO_DIFERIDO.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL ACTIVO DIFERIDO"
Row.Item("ImporteActual") = "0.00" Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00" Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
@@ -1557,15 +1560,15 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item(IndexData) = DT_PASIVO_CIRCULANTE.SUM($"[{DT_PASIVO_CIRCULANTE.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") Row.Item(IndexData) = DT_PASIVO_CIRCULANTE.SUM($"[{DT_PASIVO_CIRCULANTE.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Next Next
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL PASIVO CIRCULANTE"
Row.Item("ImporteActual") = DtIngresosAnualH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") Row.Item("ImporteActual") = DT_PASIVO_CIRCULANTE.SUM("ImporteActual", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeActual") = 100.0 Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") Row.Item("ImporteAcumulado") = DT_PASIVO_CIRCULANTE.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
DT_PASIVO_CIRCULANTE.Rows.Add(Row) DT_PASIVO_CIRCULANTE.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL PASIVO CIRCULANTE"
Row.Item("ImporteActual") = "0.00" Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00" Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
@@ -1583,15 +1586,15 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item(IndexData) = DT_PASIVO_NO_CIRCULANTE.SUM($"[{DT_PASIVO_NO_CIRCULANTE.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") Row.Item(IndexData) = DT_PASIVO_NO_CIRCULANTE.SUM($"[{DT_PASIVO_NO_CIRCULANTE.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Next Next
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL PASIVO NO CIRCULANTE"
Row.Item("ImporteActual") = DtIngresosAnualH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") Row.Item("ImporteActual") = DT_PASIVO_NO_CIRCULANTE.SUM("ImporteActual", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeActual") = 100.0 Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") Row.Item("ImporteAcumulado") = DT_PASIVO_NO_CIRCULANTE.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
DT_PASIVO_NO_CIRCULANTE.Rows.Add(Row) DT_PASIVO_NO_CIRCULANTE.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL PASIVO NO CIRCULANTE"
Row.Item("ImporteActual") = "0.00" Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00" Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
@@ -1609,15 +1612,15 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item(IndexData) = DT_CAPITAL_CONTABLE.SUM($"[{DT_CAPITAL_CONTABLE.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") Row.Item(IndexData) = DT_CAPITAL_CONTABLE.SUM($"[{DT_CAPITAL_CONTABLE.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)")
Next Next
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL CAPITAL CONTABLE"
Row.Item("ImporteActual") = DtIngresosAnualH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") Row.Item("ImporteActual") = DT_CAPITAL_CONTABLE.SUM("ImporteActual", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeActual") = 100.0 Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") Row.Item("ImporteAcumulado") = DT_CAPITAL_CONTABLE.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)")
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
DT_CAPITAL_CONTABLE.Rows.Add(Row) DT_CAPITAL_CONTABLE.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL CAPITAL CONTABLE"
Row.Item("ImporteActual") = "0.00" Row.Item("ImporteActual") = "0.00"
Row.Item("ImporteAcumulado") = "0.00" Row.Item("ImporteAcumulado") = "0.00"
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
@@ -1646,7 +1649,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Next Next
Row.Item("Nombre") = "TOTAL ACTIVO" Row.Item("Nombre") = "TOTAL ACTIVO"
Row.Item("ImporteActual") = DT_ACTIVO.SUM("ImporteActual", "NOT CtaMayor in (3,4)") Row.Item("ImporteActual") = DT_ACTIVO.SUM("ImporteActual", "NOT CtaMayor in (-1,3,4)")
Row.Item("PorcentajeActual") = 100.0 Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
@@ -1693,7 +1696,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
If DT_TOTALES.Rows.Count > 0 Then If DT_TOTALES.Rows.Count > 0 Then
Row = DTTotalesAnualH.NewRow Row = DT_TOTALES.NewRow
IndexData = 11 IndexData = 11
@@ -1701,11 +1704,13 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item(IndexData) = DT_ACTIVO.SUM($"[{DT_ACTIVO.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DT_PASIVO.SUM($"[{DT_PASIVO.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"[{DT_CAPITAL_CONTABLE.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") Row.Item(IndexData) = DT_ACTIVO.SUM($"[{DT_ACTIVO.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DT_PASIVO.SUM($"[{DT_PASIVO.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"[{DT_CAPITAL_CONTABLE.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)")
Next Next
Row.Item("Nombre") = "Resultados del Ejercicio" Row.Item("Nombre") = "TOTALES"
Row.Item("CtaMayor") = -1
Row.Item("ImporteActual") = DT_ACTIVO.SUM($"ImporteActual", "Not CtaMayor in (-1,3,4)") - DT_PASIVO.SUM($"ImporteActual", "Not CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"ImporteActual", "Not CtaMayor in (-1,3,4)")
Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DT_PASIVO.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DT_PASIVO.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)")
DTTotalesAnualH.Rows.Add(Row) DT_TOTALES.Rows.Add(Row)
End If End If
@@ -1934,6 +1939,8 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_ACTIVO_CIRCULANTE.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_ACTIVO_CIRCULANTE.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_ACTIVO_CIRCULANTE.SUM("SinSP", "NOT CtaMayor in (3,4)") 'Sin SP
DT_ACTIVO_CIRCULANTE.Rows.Add(Row) DT_ACTIVO_CIRCULANTE.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL ACTIVO CIRCULANTE"
@@ -1965,6 +1972,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_ACTIVO_FIJO.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_ACTIVO_FIJO.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_ACTIVO_FIJO.SUM("SinSP", "NOT CtaMayor in (3,4)") 'Sin SP
DT_ACTIVO_FIJO.Rows.Add(Row) DT_ACTIVO_FIJO.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO NO CIRCULANTE" Row.Item("Nombre") = "TOTAL ACTIVO NO CIRCULANTE"
@@ -1996,6 +2004,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_ACTIVO_DIFERIDO.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_ACTIVO_DIFERIDO.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_ACTIVO_DIFERIDO.SUM("SinSP", "NOT CtaMayor in (3,4)") 'Sin SP
DT_ACTIVO_DIFERIDO.Rows.Add(Row) DT_ACTIVO_DIFERIDO.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO DIFERIDO" Row.Item("Nombre") = "TOTAL ACTIVO DIFERIDO"
@@ -2027,6 +2036,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_PASIVO_CIRCULANTE.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_PASIVO_CIRCULANTE.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_PASIVO_CIRCULANTE.SUM("SinSP", "NOT CtaMayor in (3,4)") 'Sin SP
DT_PASIVO_CIRCULANTE.Rows.Add(Row) DT_PASIVO_CIRCULANTE.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL PASIVO CIRCULANTE" Row.Item("Nombre") = "TOTAL PASIVO CIRCULANTE"
@@ -2064,6 +2074,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteActual") = 0.00 Row.Item("ImporteActual") = 0.00
Row.Item("ImporteAcumulado") = 0.00 Row.Item("ImporteAcumulado") = 0.00
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_PASIVO_NO_CIRCULANTE.SUM("SinSP", "NOT CtaMayor in (3,4)") 'Sin SP
DT_PASIVO_NO_CIRCULANTE.Rows.Add(Row) DT_PASIVO_NO_CIRCULANTE.Rows.Add(Row)
End If End If
@@ -2090,6 +2101,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_CAPITAL_CONTABLE.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_CAPITAL_CONTABLE.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_CAPITAL_CONTABLE.SUM("SinSP", "NOT CtaMayor in (3,4)") 'Sin SP
DT_CAPITAL_CONTABLE.Rows.Add(Row) DT_CAPITAL_CONTABLE.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL CAPITAL CONTABLE" Row.Item("Nombre") = "TOTAL CAPITAL CONTABLE"
@@ -2129,6 +2141,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM("ImporteActual", "NOT CtaMayor in (-1,3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM("ImporteActual", "NOT CtaMayor in (-1,3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_ACTIVO.SUM("SinSP", "NOT CtaMayor in (-1,3,4)") 'Sin SP
DT_ACTIVO.Rows.Add(Row) DT_ACTIVO.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL ACTIVO" Row.Item("Nombre") = "TOTAL ACTIVO"
@@ -2160,6 +2173,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_PASIVO.SUM("ImporteActual", "NOT CtaMayor in (-1,3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DT_PASIVO.SUM("ImporteActual", "NOT CtaMayor in (-1,3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = 100.0 Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("SinSP") = DT_PASIVO.SUM("SinSP", "NOT CtaMayor in (-1,3,4)") 'Sin SP
DT_PASIVO.Rows.Add(Row) DT_PASIVO.Rows.Add(Row)
Else Else
Row.Item("Nombre") = "TOTAL PASIVO" Row.Item("Nombre") = "TOTAL PASIVO"
@@ -2192,6 +2206,7 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") Row.Item("ImporteAcumulado") = DT_ACTIVO.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_PASIVO.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DT_CAPITAL_CONTABLE.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Row.Item("CtaMayor") = -2 Row.Item("CtaMayor") = -2
Row.Item("SinSP") = DT_TOTALES.SUM("SinSP", "NOT CtaMayor in (-1,3,4)") 'Sin SP
DT_TOTALES.Rows.Add(Row) DT_TOTALES.Rows.Add(Row)
@@ -2245,13 +2260,13 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
Dim CveSubProyectoIntermo As String = CType(GvIngresosSubProyectoH.Columns(IndiceInicio), BoundField).DataField Dim CveSubProyectoIntermo As String = CType(GvIngresosSubProyectoH.Columns(IndiceInicio), BoundField).DataField
Dim Importe As String = e.Row.Cells(IndiceInicio).Text Dim Importe As String = e.Row.Cells(IndiceInicio).Text
e.Row.Cells(IndiceInicio).Text = $"<a target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/1900&ER=1&CveSubProyecto={CveSubProyectoIntermo}' >{Importe}</a>" e.Row.Cells(IndiceInicio).Text = $"<a target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/1900&ER=1&CveSubProyecto={CveSubProyectoIntermo}' >{Importe}</a>"
Next IndiceInicio Next IndiceInicio
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/1900&ER=1&CveSubProyecto={-1}" e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/1900&ER=1&CveSubProyecto={-1}"
e.Row.FCHyperLink("HLSinSP").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/1900&ER=1&CveSubProyecto=0"
End If End If
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then