diff --git a/Contabilidad2/RepAnexoCatalogoMensual.aspx b/Contabilidad2/RepAnexoCatalogoMensual.aspx index b83546560..eb6562346 100644 --- a/Contabilidad2/RepAnexoCatalogoMensual.aspx +++ b/Contabilidad2/RepAnexoCatalogoMensual.aspx @@ -54,19 +54,41 @@
+ "><%--class="expand"--%> +
- -
+
+
> +
+
+ Divisor: +
+
+ + + - - -
  • Trimestre Cuatrimestre: - +
  • +
    + Trimestre Cuatrimestre: +
    +
    + NO Trimestre Cuatrimestre - - -
  • Cuenta: -
  • -
  • - - - - - - - -
  • - - - - - - - - -
    -
    +
    + + diff --git a/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb b/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb index ab5fb1a91..eb5293a66 100644 --- a/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb @@ -88,10 +88,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual Private Sub InicializaValores() CargaCombos() End Sub - Private Sub CargaCombos() - - - + Private Sub CargaCombos() + Dim Conta As New ClsContabilidad If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then DdlEjercicio.DataSource = Conta.DtResultados @@ -115,13 +113,9 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(Now.Year.ToString) - DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlSubProyecto.SelectedValue = "-1" - - - + CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto) + + End Sub #End Region @@ -182,11 +176,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual GvMensual2.Columns(27).Visible = True GvMensual2.Columns(42).Visible = True - End If - - - - + End If UpMensual.Update() If GvMensual2.Rows.Count > 0 Then @@ -194,10 +184,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual LnkExportar.Visible = True UpAcciones.Update() - End If - - - 'RegistraScript($"LimpiaCeros();") + End If Conta.Dispose() End Sub @@ -208,131 +195,109 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.RowIndex = 0 Then - e.Row.Style.Add("font-weight", "bold") - End If + 'If e.Row.RowIndex = 0 Then + ' e.Row.Style.Add("font-weight", "bold") + 'End If setgrafica(e) - - If e.Row.DataKey("Level").ToEntero = 0 Then + If e.Row.DataKey("Level") = "0" Then e.Row.CssClass = "Totales" - End If - - If e.Row.DataKey("Level").ToEntero = 1 Then + ElseIf e.Row.DataKey("Level") = "1" Then e.Row.CssClass = "SubTotales" End If + 'If e.Row.DBCampo("TipoCuenta").Contiene("3", "4") Then + ' e.Row.CssClass = "Totales" + 'ElseIf e.Row.DBCampo("TipoCuenta").Contiene("1") Then + ' e.Row.CssClass = "SubTotales" + 'End If Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal - Enero = e.Row.DBCampo("Enero").ToDecimal() - Febrero = e.Row.DBCampo("Febrero").ToDecimal() - Marzo = e.Row.DBCampo("Marzo").ToDecimal() - Abril = e.Row.DBCampo("Abril").ToDecimal() - Mayo = e.Row.DBCampo("Mayo").ToDecimal() - Junio = e.Row.DBCampo("Junio").ToDecimal() - Julio = e.Row.DBCampo("Julio").ToDecimal() - Agosto = e.Row.DBCampo("Agosto").ToDecimal() - Septiembre = e.Row.DBCampo("Septiembre").ToDecimal() - Octubre = e.Row.DBCampo("Octubre").ToDecimal() - Noviembre = e.Row.DBCampo("Noviembre").ToDecimal() - Diciembre = e.Row.DBCampo("Diciembre").ToDecimal() + Enero = e.Row.DBCampo("Enero").ToDecimal() + Febrero = e.Row.DBCampo("Febrero").ToDecimal() + Marzo = e.Row.DBCampo("Marzo").ToDecimal() + Abril = e.Row.DBCampo("Abril").ToDecimal() + Mayo = e.Row.DBCampo("Mayo").ToDecimal() + Junio = e.Row.DBCampo("Junio").ToDecimal() + Julio = e.Row.DBCampo("Julio").ToDecimal() + Agosto = e.Row.DBCampo("Agosto").ToDecimal() + Septiembre = e.Row.DBCampo("Septiembre").ToDecimal() + Octubre = e.Row.DBCampo("Octubre").ToDecimal() + Noviembre = e.Row.DBCampo("Noviembre").ToDecimal() + Diciembre = e.Row.DBCampo("Diciembre").ToDecimal() - Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero + Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero + For x = 2 To GvMensual2.Columns.Count - 1 - - For x = 2 To GvMensual2.Columns.Count - 1 - - If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then - e.Row.Cells(x).Text = "-" - ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then - e.Row.Cells(x).ForeColor = Drawing.Color.Red + If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then + e.Row.Cells(x).Text = "-" + ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then + e.Row.Cells(x).ForeColor = Drawing.Color.OrangeRed End If - If x = 2 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" - End If + If x = 2 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If - If x = 3 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }" - End If + If x = 3 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }" + End If - If x = 6 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }" - End If + If x = 6 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }" + End If - If x = 10 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }" - End If + If x = 10 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }" + End If - If x = 14 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }" - End If + If x = 14 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }" + End If - If x = 17 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" - End If + If x = 17 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If - If x = 21 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" - End If + If x = 21 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If If x = 24 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" End If - If x = 28 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If + + + If x = 32 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If + + If x = 35 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If + + If x = 38 Then + e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" + End If + Next + If Enero = 0 Then + e.Row.Cells(2).Text = "-" End If - - If x = 32 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" - End If - - If x = 35 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" - End If - - If x = 38 Then - e.Row.Cells(x).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }" - End If - - - - - Next - - - - - If Enero = 0 Then - e.Row.Cells(2).Text = "-" - Else - - - End If - - - - - - - ' e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em") - - - - ' Level 0 Total 1 SubTotal 1 - End If + End If End Sub Public Sub setgrafica(e As GridViewRowEventArgs)