This commit is contained in:
Antonio Gonzalez
2020-08-08 10:08:54 -07:00
9 changed files with 216 additions and 75 deletions

View File

@@ -4122,7 +4122,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetAnexoCatalogoMensual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean
Public Function GetAnexoCatalogoMensual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer, Periodo As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoMensualGet")
@@ -4134,18 +4134,19 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Periodo", SqlDbType.Int).Value = Periodo
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal CC", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal Mensual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetAnexoCatalogoAnual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, EjercicioFinal As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean
Public Function GetAnexoCatalogoAnual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, EjercicioFinal As Integer, Divisor As Integer, CveUsuario As Integer, Periodo As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoAnualGet")
@@ -4159,6 +4160,7 @@ Public Class ClsContabilidad
.Add("@EjercicioFinal", SqlDbType.Int).Value = EjercicioFinal
.Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Periodo", SqlDbType.Int).Value = Periodo
End With
@@ -4166,12 +4168,13 @@ Public Class ClsContabilidad
SqlAdapter.Fill(DSet)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal CC", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Me.OnError("Ocurrió un error al obtener el Estado Resultados Horizontal Anual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer) As Boolean
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
@@ -4181,6 +4184,10 @@ Public Class ClsContabilidad
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
.Add("@CveSubproyecto", SqlDbType.Int).Value = CveSubproyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Periodo", SqlDbType.Int).Value = Periodo
End With
Try
@@ -6237,7 +6244,7 @@ Public Class ClsContabilidad
End Function
Public Function GetEstadosAnualHorizontal(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
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal")
@@ -6250,6 +6257,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@Periodo", SqlDbType.Int).Value = Periodo
End With

View File

@@ -25,17 +25,38 @@
</div>
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 12px;">
<li>Ejercicio:
<li>Ejercicio Inicio:
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
<li>Ejercicio Fin:
<asp:DropDownList ID="DdlEjercicio2" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
<li> <label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
</asp:DropDownList>
</li>
<li>SubProyecto:
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
</li>
<li>Divisor:
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="Unidad" Value="1"></asp:ListItem>
<asp:ListItem Text="Miles" Value="1000" Selected="True"></asp:ListItem>
<asp:ListItem Text="Millones" Value="1000000"></asp:ListItem>
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me" ClientIDMode="Static">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
@@ -159,7 +180,10 @@
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function LimpiaCeros(Divisor) {
function LimpiaCeros() {
let Divisor = $("#DdlDivisor option:selected").val();
$('.ceros').each(function (i, obj) {
debugger;
@@ -168,12 +192,15 @@
}
if (!($(this).html() == '-' || $(this).html() == '' || ~$(this).html().indexOf("%"))) {
if (Divisor > 1) {
$(this).attr('data-toggle', 'tooltip');
$(this).attr('data-container', 'body');
$(this).attr('title', $(this).html());
}
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
//if (Divisor > 1) {
// $(this).attr('data-toggle', 'tooltip');
// $(this).attr('data-container', 'body');
// $(this).attr('title', $(this).html());
//}
///$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) , ((Divisor == 1) ? 2 : 0)));
}
if (ToDouble($(this).html()) < 0) {

View File

@@ -28,22 +28,27 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim EjercicioParametro, EjercicioParametroFinal, SubProyectoParametro, DivisorParametro As Integer
Dim EjercicioParametro, EjercicioParametroFinal, SubProyectoParametro, DivisorParametro, Periodo As Integer
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
EjercicioParametroFinal = IfNull(Request("Ejerciciofinal"), "-1").ToString.ToEntero
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
EjercicioParametroFinal = IfNull(Request("EjercicioFinal"), "-1").ToString.ToEntero
SubProyectoParametro = IfNull(Request("CveSubproyecto"), "-1").ToString.ToEntero
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
EsVertical = IfNull(Request("V"), "-1").ToString.ToEntero
InicializaValores()
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
DdlEjercicio2.SelectedValueExist(EjercicioParametroFinal.ToString)
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
DdlPeriodo.SelectedValueExist(Periodo)
CargaDatos()
End If
@@ -59,12 +64,15 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Dim Conta As New ClsContabilidad
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
DdlEjercicio.DataSource = Conta.DtResultados
DdlEjercicio2.DataSource = Conta.DtResultados
Else
DdlEjercicio.DataSource = Nothing
DdlEjercicio2.DataSource = Nothing
End If
Conta.Dispose()
DdlEjercicio.DataBind()
DdlEjercicio2.DataBind()
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
@@ -83,7 +91,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Private Sub CargaDatos()
Dim Conta As New ClsContabilidad
If Conta.GetAnexoCatalogoAnual(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If Conta.GetAnexoCatalogoAnual(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio2.SelectedValue.ToEntero, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
GvAnual.DataSource = Conta.DSResultados.Tables(1)
@@ -123,7 +131,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
GvAnual.DataBind()
UpAnual.Update()
RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
RegistraScript($"LimpiaCeros();")
Conta.Dispose()
End Sub

View File

@@ -30,14 +30,34 @@
<li>Ejercicio:
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
<li>SubProyecto:
<li><asp:Label runat="server" ID="LblSubProyecto" ></asp:Label>
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
</li>
<li> <label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Divisor:
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="Unidad" Value="1"></asp:ListItem>
<asp:ListItem Text="Miles" Value="1000" Selected="True"></asp:ListItem>
<asp:ListItem Text="Millones" Value="1000000"></asp:ListItem>
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
@@ -51,7 +71,10 @@
<asp:UpdatePanel ID="UpCC" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
<div class="row">
<div class="col-md-12" style="overflow:auto!important">
<asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
<Columns>
<asp:BoundField HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
@@ -190,7 +213,12 @@
<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="50px" />
</Columns>
</asp:GridView>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -20,17 +20,28 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro As Integer
CveCuenta = IfNull(Request("C"), "-1").ToString.ToEntero
EjercicioParametro = IfNull(Request("E"), "-1").ToString.ToEntero
SubProyectoParametro = IfNull(Request("S"), "-1").ToString.ToEntero
DivisorParametro = IfNull(Request("D"), "-1").ToString.ToEntero
'Dim EjercicioParametro, SubProyectoParametro, DivisorParametro As Integer
'CveCuenta = IfNull(Request("C"), "-1").ToString.ToEntero
'EjercicioParametro = IfNull(Request("E"), "-1").ToString.ToEntero
'SubProyectoParametro = IfNull(Request("S"), "-1").ToString.ToEntero
'DivisorParametro = IfNull(Request("D"), "-1").ToString.ToEntero
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo As Integer
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
SubProyectoParametro = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
InicializaValores()
InicializaValores()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
DdlPeriodo.SelectedValueExist(Periodo)
CargaDatos()
@@ -55,23 +66,25 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
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"
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
'DdlSubProyecto.DataBind()
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
'DdlSubProyecto.SelectedValue = "-1"
End Sub
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnCargaAsignados_Click(sender As Object, e As EventArgs) Handles BtnCargaAsignados.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim Conta As New ClsContabilidad
If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubproyecto.selectedvalue.toentero, UsuarioActual.CveEmpresa) Then
If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero) Then
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
GvCC.DataSource = Conta.DSResultados.Tables(1)

View File

@@ -34,14 +34,34 @@
<li>Ejercicio:
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
<li>
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
</asp:DropDownList>
</li>
<li>SubProyecto:
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
</li>
<li>Divisor:
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="Unidad" Value="1"></asp:ListItem>
<asp:ListItem Text="Miles" Value="1000" Selected="True"></asp:ListItem>
<asp:ListItem Text="Millones" Value="1000000"></asp:ListItem>
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
@@ -111,7 +131,10 @@
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function LimpiaCeros(Divisor) {
function LimpiaCeros() {
let Divisor = 1;
$('.ceros').each(function (i, obj) {
debugger;

View File

@@ -21,18 +21,19 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro As Integer
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo As Integer
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
SubProyectoParametro = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
DivisorParametro = IfNull(Request("Divisor"), "-1").ToString.ToEntero
Periodo = IfNull(Request("Periodo"), "-1").ToString.ToEntero
InicializaValores()
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
DdlPeriodo.SelectedValueExist(Periodo)
CargaDatos()
End If
@@ -72,7 +73,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
Private Sub CargaDatos()
Dim Conta As New ClsContabilidad
If Conta.GetAnexoCatalogoMensual(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
If Conta.GetAnexoCatalogoMensual(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then
GvMensual2.DataSource = Conta.DtResultados
Else
GvMensual2.DataSource = Nothing
@@ -80,7 +81,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
GvMensual2.DataBind()
UpMensual.Update()
RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
RegistraScript($"LimpiaCeros();")
Conta.Dispose()
End Sub

View File

@@ -60,10 +60,10 @@
</div>
<label class="col-md-2" style="width: 80px;" runat="server" id="LiSubProyectoLbl" >SubProyecto: </label>
<div class="col-md-2 " runat="server" id="LiSubProyectoDdl">
<label class="col-md-2" style="width: 80px;" runat="server" id="LiSubProyectoLbl"><asp:Label runat="server" ID="LblSubProyecto" ></asp:Label> </label>
<div class="col-md-1 " 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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
@@ -768,7 +768,8 @@
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
<%--<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>--%>
<asp:HyperLink ID="HLNombre" runat="server" Text='<%# Eval("Nombre")%>' CssClass="Texto" Target="_blank" ></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
<HeaderTemplate>

View File

@@ -247,10 +247,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'TxtFechaFin.Text = Date.Now.ToShortDateString
CargaEjercicios()
DdlSubproyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubproyecto.DataBind()
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
TabSubProyecto.HeaderText = LblSubProyecto.Text & " H."
'DdlSubproyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
'DdlSubproyecto.DataBind()
' CargaDatos()
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
ValidaEjercicios()
End If
End Sub
@@ -284,12 +291,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LiEjercicioDdl2.Visible = False
LiEjercicioLbl2.Visible = False
LiPeriodoDdl.Visible = False
LiPeriodoLbl.Visible = False
LiPeriodoDdl.Visible = True
LiPeriodoLbl.Visible = True
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
DdlPeriodo.SelectedValueExist(12)
End If
@@ -306,8 +314,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
LiEjercicioDdl2.Visible = True
LiEjercicioLbl2.Visible = True
LiPeriodoDdl.Visible = False
LiPeriodoLbl.Visible = False
LiPeriodoDdl.Visible = True
LiPeriodoLbl.Visible = True
LiDivisorDdl.Visible = True
LiDivisorLbl.Visible = True
@@ -637,7 +645,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
FechaIMes = $"01/01/{DdlEjercicio.SelectedValue}"
FechaFMes = $"31/12/{DdlEjercicio.SelectedValue}"
Dim FechaFin As Date = $"01/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}".ToDate
FechaFMes = $"{FechaFin.LastDayOfMonth.Day.ToString("00")}/{DdlPeriodo.SelectedValue.ToEntero.ToString("00")}/{DdlEjercicio.SelectedValue}"
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
@@ -803,7 +812,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensualHorizontal.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1"
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto=-1"
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
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)
@@ -819,7 +828,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
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)
' 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}"
End If
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Or e.Row.DBCampo("Nombre") = "TOTAL INGRESOS" Then
@@ -895,7 +907,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensualHorizontal.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1"
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto=-1"
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoMensual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
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)
@@ -910,7 +922,8 @@ 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("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 = 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}"
End If
@@ -1046,7 +1059,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim ObjConta As New ClsContabilidad
If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero, Periodo:=DdlPeriodo.SelectedValue.ToEntero) Then
DtDatosAnualH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
Else
DtDatosAnualH = Nothing
@@ -1274,7 +1287,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto=-1"
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
@@ -1287,7 +1300,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'e.Row.Cells(IndiceInicio).ForeColor = If(Importe < 0, Drawing.Color.Red, e.Row.Cells(IndiceInicio).ForeColor)
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}"
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}"
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
@@ -1330,7 +1346,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto=-1"
'e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto=-1&EjercicioFinal={DdlEjercicio2.SelectedValue}"
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1
Dim IndiceMax As Integer = 1 + CountDinamico
@@ -1341,7 +1359,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'e.Row.Cells(IndiceInicio).ForeColor = If(Importe < 0, Drawing.Color.Red, e.Row.Cells(IndiceInicio).ForeColor)
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}"
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}"
e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogoAnual.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&EjercicioFinal={DdlEjercicio2.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then
@@ -1426,6 +1446,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Dim IndexSubProyectoMAx As Integer = DTSubProyectosCabecerasH.Rows.Count - 1
Dim IndexTotatles As Integer = 13 + IndexSubProyectoMAx
'34
Dim IDX_LIMPIAR As Integer = 1
For IDX_LIMPIAR = 1 To 34
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
Next
If DtIngresosSubProyectoH.Rows.Count > 0 Then
For Each dCoumn As DataColumn In DtIngresosSubProyectoH.Columns
@@ -1615,6 +1645,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"./RepAnexoCatalogoCC.aspx?CveCuenta={e.Row.DBCampo("CveCuenta").ToString}&Ejercicio={DdlEjercicio.SelectedValue}&Divisor={DdlDivisor.SelectedValue}&CveSubProyecto={DdlSubproyecto.SelectedValue}&Periodo={DdlPeriodo.SelectedValue}"
Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero
Dim IndiceInicio As Integer = 1