diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 240237025..b986ebb70 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2514,16 +2514,18 @@ Partial Class Bancos_ProveedoresAbonar ElseIf DdlTipoTransaccion.SelectedValue = "17" Then If Dep.DtResultados.Rows.Count > 0 Then - DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'") + DdlCuentaDeposito.DataSource = Dep.DtResultados '.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'") + Else + Alert("El proveedor no tiene cuentas deposito registradas.") End If - If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then - trCuentaDeposito.Visible = True - DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) - Else - BtnIEGuardar.Enabled = False - Alert("El proveedor no tiene ninguna cuenta deposito registrada ante el sistema BBVA BANCOMER", TipoMensaje.MsgAdvertencia) - End If + 'If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then + ' trCuentaDeposito.Visible = True + ' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) + 'Else + ' BtnIEGuardar.Enabled = False + ' Alert("El proveedor no tiene ninguna cuenta deposito registrada ", TipoMensaje.MsgAdvertencia) + 'End If Else DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index f2c51cd15..137f024d4 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -558,7 +558,7 @@ - + @@ -597,6 +597,32 @@ + <%-- + + + + + + + + + + + + + + + + + + + + + + + + --%> + <%-- @@ -617,7 +643,7 @@

- + @@ -631,7 +657,7 @@ - + @@ -678,7 +704,7 @@

- + @@ -692,6 +718,8 @@ + + @@ -771,7 +799,7 @@ - @@ -842,7 +870,7 @@

- + @@ -913,7 +941,7 @@

- + diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index c68aafc6f..c051bc71c 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -740,19 +740,33 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 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 + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMarzo").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/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAbril").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/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJunio").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/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAgosto").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/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLSeptiembre").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/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + 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("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 If End Sub Protected Sub GvGastosMesH_RowDataBound(sender As Object, e As GridViewRowEventArgs) @@ -766,17 +780,29 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 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 + + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMarzo").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/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAbril").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/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJunio").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/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAgosto").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/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLSeptiembre").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/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + 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("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("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 @@ -822,7 +848,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If DtDatosAnualH IsNot Nothing Then CargaGridsAnualH() - SumaTotalesAnualH() + End If End Sub @@ -855,12 +881,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName - GvIngresosAnualH.Columns(IndexGv).Visible = True + 'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName + 'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + GvIngresosAnualH.Columns(IndexGv).Visible = True + CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + 'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName + 'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName GvTotalesAnualH.Columns(IndexGv).Visible = True IndexMax = IndexData @@ -925,9 +956,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If IndexData >= 13 Then If dCoumn.ColumnName.ToEntero > 0 And dCoumn.ColumnName.ToEntero <= DdlEjercicio2.SelectedValue.ToEntero Then + 'HyperLinkField CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + 'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFields = {"CveCuenta", "FechaInicial", "FechaFActual", "CveSubProyecto"} + 'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFormatString = "/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" + + 'CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName + 'CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + GvGastosAnualH.Columns(IndexGv).Visible = True IndexMax = IndexData Else @@ -944,14 +982,14 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Next - For Each dr As DataRow In DtGastosAnualH.FiltraParametros("NOT CtaMayor in (3,4)").Rows + For Each dr As DataRow In DtGastosAnualH.FiltraParametros("Not CtaMayor In (3,4)").Rows TotalActual += dr("ImporteActual").ToString.ToDouble TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble Next IndexData = 13 For IndexData = 13 To IndexMax - Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") + Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") Next Row.Item("Nombre") = "TOTAL GASTOS" @@ -973,28 +1011,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row = DTTotalesAnualH.NewRow - 'Row.Item("Enero") = DtIngresosAnualH.SUM("Enero", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Enero", "NOT CtaMayor in (3,4)") - 'Row.Item("Febrero") = DtIngresosAnualH.SUM("Febrero", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Febrero", "NOT CtaMayor in (3,4)") - 'Row.Item("Marzo") = DtIngresosAnualH.SUM("Marzo", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Marzo", "NOT CtaMayor in (3,4)") - 'Row.Item("Abril") = DtIngresosAnualH.SUM("Abril", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Abril", "NOT CtaMayor in (3,4)") - 'Row.Item("Mayo") = DtIngresosAnualH.SUM("Mayo", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Mayo", "NOT CtaMayor in (3,4)") - 'Row.Item("Junio") = DtIngresosAnualH.SUM("Junio", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Junio", "NOT CtaMayor in (3,4)") - 'Row.Item("Julio") = DtIngresosAnualH.SUM("Julio", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Julio", "NOT CtaMayor in (3,4)") - 'Row.Item("Agosto") = DtIngresosAnualH.SUM("Agosto", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Agosto", "NOT CtaMayor in (3,4)") - 'Row.Item("Septiembre") = DtIngresosAnualH.SUM("Septiembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Septiembre", "NOT CtaMayor in (3,4)") - 'Row.Item("Octubre") = DtIngresosAnualH.SUM("Octubre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Octubre", "NOT CtaMayor in (3,4)") - 'Row.Item("Noviembre") = DtIngresosAnualH.SUM("Noviembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Noviembre", "NOT CtaMayor in (3,4)") - 'Row.Item("Diciembre") = DtIngresosAnualH.SUM("Diciembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Diciembre", "NOT CtaMayor in (3,4)") IndexData = 13 For IndexData = 13 To IndexMax - 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)") + 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 - Row.Item("Nombre") = "Resultados del Ejercicio:" + Row.Item("Nombre") = "Resultados del Ejercicio" 'Row.Item("ImporteActual") = TotalActual.ToString 'Row.Item("PorcentajeActual") = "100.00" - Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,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("CtaMayor") = -1 @@ -1015,21 +1041,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End Sub - Private Sub SumaTotalesAnualH() - ''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 GvIngresosAnualH_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 @@ -1041,14 +1059,25 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 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 + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + + Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero + Dim IndiceInicio As Integer = 1 + Dim IndiceMax As Integer = 1 + CountDinamico + For IndiceInicio = 1 To IndiceMax + Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField + Dim Importe As String = e.Row.Cells(IndiceInicio).Text + e.Row.Cells(IndiceInicio).Text = $"{Importe}" + Next IndiceInicio + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}" + End If + + If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red @@ -1069,14 +1098,22 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 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 + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - 'End If + + Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero + Dim IndiceInicio As Integer = 1 + Dim IndiceMax As Integer = 1 + CountDinamico + For IndiceInicio = 1 To IndiceMax + Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField + Dim Importe As String = e.Row.Cells(IndiceInicio).Text + e.Row.Cells(IndiceInicio).Text = $"{Importe}" + Next IndiceInicio + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}" + End If If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red @@ -1339,14 +1376,31 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.ControlStyle.Font.Size = 13 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 + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + 'Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + + Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero + Dim IndiceInicio As Integer = 1 + Dim IndiceMax As Integer = 1 + CountDinamico + + Dim FEchaMesFinal As Date = New Date(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1).LastDayOfMonth + + For IndiceInicio = 1 To IndiceMax + + Dim CveSubProyectoIntermo As String = CType(GvGastosSubProyectoH.Columns(IndiceInicio), BoundField).DataField + Dim Importe As String = e.Row.Cells(IndiceInicio).Text + + + + e.Row.Cells(IndiceInicio).Text = $"{Importe}" + Next IndiceInicio + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={-1}" + + End If If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red diff --git a/vwd.webinfo b/vwd.webinfo index 1d2829323..c9e193dc4 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -44,6 +44,10 @@ + + + +