Estado resultados

This commit is contained in:
Rakcsle Supertramp
2020-09-05 17:01:10 -07:00
parent 774fe44efd
commit 7bb670d100
2 changed files with 341 additions and 7 deletions

View File

@@ -361,6 +361,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
LblTri.Visible = False
DVTri.Visible = False
End If
If Tab.ActiveTabIndex = 1 Then
@@ -382,6 +385,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
DdlPeriodo.SelectedValueExist(12)
LblTri.Visible = True
DVTri.Visible = True
End If
If Tab.ActiveTabIndex = 2 Then
@@ -403,6 +410,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
LblTri.Visible = False
DVTri.Visible = False
End If
If Tab.ActiveTabIndex = 3 Then
@@ -420,6 +430,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
LblTri.Visible = False
DVTri.Visible = False
End If
UpFiltros.Update()
@@ -752,6 +766,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Sub
Private Sub CargaGridsMesH()
DtIngresosMesH = DtDatosMesH.FiltraParametros("Tipo ='H' ")
DtGastosMesH = DtDatosMesH.FiltraParametros("Tipo ='G' ")
DTTotalesMesH = DtDatosMesH.Clone()
@@ -778,7 +793,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row.Item("Septiembre") = DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)")
Row.Item("Octubre") = DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)")
Row.Item("Noviembre") = DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")
Row.Item("Diciembre") = DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
Row.Item("Diciembre") = DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
Row.Item("Tri1") = DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)")
Row.Item("Tri2") = DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)")
Row.Item("Tri3") = DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)")
Row.Item("Tri4") = DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)")
Row.Item("Cua1") = DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)")
Row.Item("Cua2") = DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")
Row.Item("Cua3") = DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")
Row.Item("Nombre") = "TOTAL INGRESOS"
Row.Item("ImporteActual") = TotalActual.ToString
@@ -786,6 +811,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = "100.00"
Row.Item("CtaMayor") = -1
DtIngresosMesH.Rows.Add(Row)
Else
Row.Item("Nombre") = "TOTAL INGRESOS "
@@ -822,6 +848,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row.Item("Noviembre") = DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")
Row.Item("Diciembre") = DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")
Row.Item("Tri1") = DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)")
Row.Item("Tri2") = DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)")
Row.Item("Tri3") = DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)")
Row.Item("Tri4") = DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)")
Row.Item("Cua1") = DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)")
Row.Item("Cua2") = DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")
Row.Item("Cua3") = DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")
Row.Item("Nombre") = "TOTAL GASTOS"
Row.Item("ImporteActual") = TotalActual
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
@@ -852,7 +887,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
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 (-1,3,4)") - DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (-1,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 (-1,3,4)") - DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,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("Tri1") = DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)")
Row.Item("Tri2") = DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)")
Row.Item("Tri3") = DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)")
Row.Item("Tri4") = DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)")
Row.Item("Cua1") = DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)")
Row.Item("Cua2") = DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)")
Row.Item("Cua3") = DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)")
Row.Item("Nombre") = "Resultados del Ejercicio:"
'Row.Item("ImporteActual") = TotalActual.ToString
@@ -874,6 +918,100 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
GvTotalesMesH.DataSource = DTTotalesMesH
GvTotalesMesH.DataBind()
If DdlTri.SelectedValue.ToEntero = 0 Then 'ocultar trimestre cuatrimestre
GvIngresosMesH.Columns(4).Visible = False
GvIngresosMesH.Columns(9).Visible = False
GvIngresosMesH.Columns(14).Visible = False
GvIngresosMesH.Columns(18).Visible = False
GvGastosMesH.Columns(4).Visible = False
GvGastosMesH.Columns(9).Visible = False
GvGastosMesH.Columns(14).Visible = False
GvGastosMesH.Columns(18).Visible = False
GvTotalesMesH.Columns(4).Visible = False
GvTotalesMesH.Columns(9).Visible = False
GvTotalesMesH.Columns(14).Visible = False
GvTotalesMesH.Columns(18).Visible = False
GvIngresosMesH.Columns(6).Visible = False
GvIngresosMesH.Columns(12).Visible = False
GvIngresosMesH.Columns(19).Visible = False
GvGastosMesH.Columns(6).Visible = False
GvGastosMesH.Columns(12).Visible = False
GvGastosMesH.Columns(19).Visible = False
GvTotalesMesH.Columns(6).Visible = False
GvTotalesMesH.Columns(12).Visible = False
GvTotalesMesH.Columns(19).Visible = False
ElseIf DdlTri.SelectedValue.ToEntero = 1 Then 'Mostrar Trimestre
GvIngresosMesH.Columns(4).Visible = True
GvIngresosMesH.Columns(9).Visible = True
GvIngresosMesH.Columns(14).Visible = True
GvIngresosMesH.Columns(18).Visible = True
GvGastosMesH.Columns(4).Visible = True
GvGastosMesH.Columns(9).Visible = True
GvGastosMesH.Columns(14).Visible = True
GvGastosMesH.Columns(18).Visible = True
GvTotalesMesH.Columns(4).Visible = True
GvTotalesMesH.Columns(9).Visible = True
GvTotalesMesH.Columns(14).Visible = True
GvTotalesMesH.Columns(18).Visible = True
GvIngresosMesH.Columns(6).Visible = False
GvIngresosMesH.Columns(12).Visible = False
GvIngresosMesH.Columns(19).Visible = False
GvGastosMesH.Columns(6).Visible = False
GvGastosMesH.Columns(12).Visible = False
GvGastosMesH.Columns(19).Visible = False
GvTotalesMesH.Columns(6).Visible = False
GvTotalesMesH.Columns(12).Visible = False
GvTotalesMesH.Columns(19).Visible = False
ElseIf DdlTri.SelectedValue.ToEntero = 2 Then 'Mostrar Cuatrimestre
GvIngresosMesH.Columns(4).Visible = False
GvIngresosMesH.Columns(9).Visible = False
GvIngresosMesH.Columns(14).Visible = False
GvIngresosMesH.Columns(18).Visible = False
GvGastosMesH.Columns(4).Visible = False
GvGastosMesH.Columns(9).Visible = False
GvGastosMesH.Columns(14).Visible = False
GvGastosMesH.Columns(18).Visible = False
GvTotalesMesH.Columns(4).Visible = False
GvTotalesMesH.Columns(9).Visible = False
GvTotalesMesH.Columns(14).Visible = False
GvTotalesMesH.Columns(18).Visible = False
GvIngresosMesH.Columns(6).Visible = True
GvIngresosMesH.Columns(12).Visible = True
GvIngresosMesH.Columns(19).Visible = True
GvGastosMesH.Columns(6).Visible = True
GvGastosMesH.Columns(12).Visible = True
GvGastosMesH.Columns(19).Visible = True
GvTotalesMesH.Columns(6).Visible = True
GvTotalesMesH.Columns(12).Visible = True
GvTotalesMesH.Columns(19).Visible = True
End If
UpDatosMesH.Update()
End Sub
@@ -910,6 +1048,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".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)
@@ -1009,6 +1156,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLTri4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLCua1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLCua2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString)
e.Row.FCHyperLink("HLCua3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".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)
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"