-- unificación de módulos de Contabilidad a una sola carpeta. como principal ContaSIG
This commit is contained in:
@@ -1,179 +0,0 @@
|
||||
<%@ Page Title="Contabilidad2 - Catálogo Ejercicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatContaEjercicios.aspx.vb" Inherits="Contabilidad2_CatContaEjercicios" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Contabilidad Ejercicio.
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Contabilidad Ejercicio"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
DataKeyNames="CveEjercicio,Ejercicio,PeriodoActualNumero,CuentaNombre,CveCuentaCierre,PolizaFolio,PrePolizaCierreFolio,Estatus" AutoGenerateColumns="False"
|
||||
Style="text-align: center; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PeriodoActual" HeaderText="Periodo Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="CuentaNombre" HeaderText="Cuenta Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField DataTextField ="PrePolizaCierreFolio" target="_blank" DataNavigateUrlFields ="CvePrePolizaCierre" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" HeaderText="Póliza Cierre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgC" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="PolizaCierre"
|
||||
CssClass="btn btn-primary btn-circle btn-sm" Text="<i class='glyphicon glyphicon-ok'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo"
|
||||
CssClass="btn green btn-circle btn-sm" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgEE" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRow" CommandName="Delete"
|
||||
CssClass="btn btn-danger btn-circle btn-sm" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModal">
|
||||
<ContentTemplate>
|
||||
<div id="ModalCat" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 150px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalModulos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Conta Ejercicios</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEjercicio" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" Style="width: 100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVClave" runat="server" ControlToValidate="TxtEjercicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨Ejercicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEjercicio.ClientID.ToString()%>">Ejercicio:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPeriodoActual" runat="server" CssClass="form-control input-sm select2me" Style="width: 50%">
|
||||
<asp:ListItem Value="0" Text="seleccione"/>
|
||||
<asp:ListItem Value="1" Text="Enero"/>
|
||||
<asp:ListItem Value="2" Text="Febrero"/>
|
||||
<asp:ListItem Value="3" Text="Marzo"/>
|
||||
<asp:ListItem Value="4" Text="Abril"/>
|
||||
<asp:ListItem Value="5" Text="Mayo"/>
|
||||
<asp:ListItem Value="6" Text="Junio"/>
|
||||
<asp:ListItem Value="7" Text="Julio"/>
|
||||
<asp:ListItem Value="8" Text="Agosto"/>
|
||||
<asp:ListItem Value="9" Text="Septiembre"/>
|
||||
<asp:ListItem Value="10" Text="Octubre"/>
|
||||
<asp:ListItem Value="11" Text="Noviembre"/>
|
||||
<asp:ListItem Value="12" Text="Diciembre"/>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPeriodoActual.ClientID.ToString()%>">Periodo Actual:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" data-toggle="toggle"/>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpModulo" />
|
||||
<button id="BtnCancelarProyecto" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalGenerarPoliza" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 150px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpdatePanel1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlMGPTitulo" runat="server">Conta Ejercicios</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CuentaFormatoNombre" Style="width: 50%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlCuentas.ClientID.ToString()%>">Cuenta:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LbGenerarPoliza" runat="server" class="btn btn-success" Text="Generar" ValidationGroup="GrpModulo" />
|
||||
<button id="Button1" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,144 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad2_CatContaEjercicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveEjercicio() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEjercicio")), -1, CInt(ViewState("CveEjercicio")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveEjercicio") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Ejercicio() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("Ejercicio")), -1, CInt(ViewState("Ejercicio")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("Ejercicio") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PeriodoActualNumero() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("PeriodoActualNumero")), -1, CInt(ViewState("PeriodoActualNumero")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("PeriodoActualNumero") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Estatus() As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("Estatus"))
|
||||
End Get
|
||||
Set
|
||||
ViewState("Estatus") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetContaEjercicio(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentas.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
DdlCuentas.DataBind()
|
||||
DdlCuentas.Items.Insert(0, New ListItem("seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
|
||||
TxtEjercicio.Text = ""
|
||||
ChkEstatus.Checked = False
|
||||
DdlPeriodoActual.SelectedValue = "0"
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim errorString As String = ""
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
If Not ObjConta.AddContaEjercicio(TxtEjercicio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero) Then
|
||||
errorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
If Not ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=TxtEjercicio.Text.ToEntero, PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero,
|
||||
Estatus:=ChkEstatus.Checked) Then
|
||||
errorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
RegistraScript("$('#ModalCat').modal('hide');")
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
If errorString.Length > 0 Then
|
||||
Alert(errorString)
|
||||
Else
|
||||
If LbAgregar.Text = "Agregar" Then
|
||||
Alert("Agregado correctamente")
|
||||
ElseIf LbAgregar.Text = "Actualizar" Then
|
||||
Alert("Actualizado correctamente")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveEjercicio = GvRow.DataKey("CveEjercicio").ToEntero
|
||||
TxtEjercicio.Text = GvRow.DataKey("Ejercicio")
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") = "True"
|
||||
DdlPeriodoActual.SelectedValue = GvRow.DataKey("PeriodoActualNumero")
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.RemoveContaEjercicio(GvRow.DataKey("CveEjercicio").ToEntero) Then
|
||||
Alert("eliminado correctamente")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub PolizaCierre(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Ejercicio = GvRow.DataKey("Ejercicio").ToEntero
|
||||
PeriodoActualNumero = GvRow.DataKey("PeriodoActualNumero").ToEntero
|
||||
|
||||
RegistraScript("$('#ModalGenerarPoliza').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LbGenerarPoliza_Click(sender As Object, e As EventArgs) Handles LbGenerarPoliza.Click
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim FechaI As String = $"01/01/{NowADS().Year}"
|
||||
Dim FechaF As String = $"{DateTime.DaysInMonth(NowADS().Year, 12)}/12/{NowADS().Year}"
|
||||
Dim CvePrePolizaCierre As Integer = -1
|
||||
CvePrePolizaCierre = ObjConta.CierreEjercicio(UsuarioActual.CveEmpresa, Ejercicio, DdlCuentas.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CvePersonal)
|
||||
If CvePrePolizaCierre > 0 Then
|
||||
If ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=Ejercicio, PeriodoActual:=PeriodoActualNumero, CveCuentaCierre:=DdlCuentas.SelectedValue.ToEntero,
|
||||
CvePrePoliza:=CvePrePolizaCierre, Estatus:=Estatus) Then
|
||||
Alert("Cierre de ejercicio correcto")
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,308 +0,0 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentas.aspx.vb" Inherits="Contabilidad2_CatCuentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
#treeviewarbolmiarbol, .catcuentascontarbol .catcuentasarbol {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#listviewbuscar {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.aradd {
|
||||
margin-left: 15px;
|
||||
background-color: #1caf9a;
|
||||
color: #ffffff;
|
||||
font-weight: 300;
|
||||
padding: 2px 7px 3px 8px;
|
||||
text-align: center;
|
||||
height: 15px;
|
||||
border-radius: 18px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aradd::before {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: 9px !important;
|
||||
content: "\f067";
|
||||
}
|
||||
|
||||
.aredit {
|
||||
margin-left: 15px;
|
||||
background-color: #E87E04;
|
||||
color: #ffffff;
|
||||
font-weight: 300;
|
||||
padding: 2px 7px 3px 8px;
|
||||
text-align: center;
|
||||
height: 15px;
|
||||
border-radius: 18px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.aredit::before {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: 9px !important;
|
||||
content: "\f040";
|
||||
}
|
||||
|
||||
#select2-C_DdlCuentaContable-results{
|
||||
max-width:300px!important
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cuentas Contables
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Cuentas</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upcuentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="updatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="catcuentascontarbol">
|
||||
<fieldset>
|
||||
<legend>Cuentas</legend>
|
||||
<div class="catcuentasarbol">
|
||||
<div id="treeviewarbolmiarbol">
|
||||
<asp:Literal ID="Literal1" Visible="false" runat="server"></asp:Literal>
|
||||
<ADS:Arbol runat="server" ID="ArbolCuentas"></ADS:Arbol>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<%-- <asp:Button ID="BtnCambiaAgrupadorSAT" OnClick="BtnCambiaAgrupadorSAT_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%>
|
||||
|
||||
<div class="catcuentasform">
|
||||
|
||||
|
||||
<asp:TextBox ID="Textbuscar" Style="display: none;" runat="server"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="" ClientIDMode="Static" />
|
||||
<asp:Button ID="editar" runat="server" Style="display: none;" Text="Buscar" />
|
||||
<asp:Button ID="agregar" Style="display: none;" runat="server" Text="Buscar" />
|
||||
<asp:Button ID="borrar" Style="display: none;" runat="server" Text="borrar" />
|
||||
<fieldset>
|
||||
<legend>Información de la cuenta</legend>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtCuenta" Style="width: 200px" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="TxtCuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tnombre" Style="width: 100%;" runat="server" MaxLength="50"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Subcuenta de</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="Tsubcuenta" runat="server" Enabled="False" Width="140px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" style="max-width:160px"
|
||||
DataValueField="Id" Width="160px" Visible="false">
|
||||
</asp:DropDownList>
|
||||
<br />
|
||||
<asp:Label ID="LblSubCuenta" runat="server" Text="" Font-Italic="True" Font-Size="7pt" ClientIDMode="Static"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Tipo de Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DTcuenta" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Deudora " Value="A"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Acreedora " Value="B"></asp:ListItem>
|
||||
<asp:ListItem Text="Pasivo Deudora " Value="C"></asp:ListItem>
|
||||
<asp:ListItem Text="Pasivo Acreedora " Value="D"></asp:ListItem>
|
||||
<asp:ListItem Text="Capital Deudora " Value="E"></asp:ListItem>
|
||||
<asp:ListItem Text="Capital Acreedora " Value="F"></asp:ListItem>
|
||||
<asp:ListItem Text="Resultados Deudora " Value="G"></asp:ListItem>
|
||||
<asp:ListItem Text="Resultados Acreedora" Value="H"></asp:ListItem>
|
||||
<asp:ListItem Text="Estadisticas Deudora" Value="I"></asp:ListItem>
|
||||
<asp:ListItem Text="Estadisticas Acredora " Value="J"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden Deudora " Value="K"></asp:ListItem>
|
||||
<asp:ListItem Text="Orden Acreedora " Value="L"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Cuenta Mayor</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DcuentaMayor" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione " Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor " Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No " Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Titulo " Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="SubTitulo " Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Agrupador SAT</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAgrupadorSAT" DataTextField="CodigoNombre" DataValueField="CveAgrupadorSAT" CssClass="form-control input-sm input-small select2me" Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Moneda</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Dígito agrupador</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtDigAgrup" Style="width: 40px;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Nombre en ingles</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtNomIngles" Style="width: 100%;" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-line">
|
||||
<div class="catcuentas left">Concepto</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlConcepto" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" AutoPostBack="true" Width="100%"
|
||||
OnSelectedIndexChanged="DdlConcepto_SelectedIndexChanged" CssClass="form-control input-sm input-small select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="PnlOpcion1" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Proveedor:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Clasificación"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion4" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Cuenta Bancaria "></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="ddlBancos" Width="100%" CssClass="select2me" DataValueField="CveCuenta" DataTextField="NumCuenta" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion5" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Almacén"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" Width="100%" DataValueField="CveAlmacen" DataTextField="Almacen" CssClass="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion6" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Cliente:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Porcentaje Impuesto:"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlOpcion8" Visible="false" CssClass="form-line">
|
||||
<div class="catcuentas left">
|
||||
<asp:Label runat="server" Text="Personal"></asp:Label></div>
|
||||
<div class="catcuentas right">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione el personal (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<br />
|
||||
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
|
||||
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
|
||||
</fieldset>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="content7" ContentPlaceHolderID="JS" runat="server">
|
||||
<script>
|
||||
function buscararbolito(inputid, ulid) {
|
||||
|
||||
var texto = $("input#" + inputid).val();
|
||||
if ((texto == '') && ($('ul#' + ulid))) {
|
||||
$('ul#' + ulid + '').removeClass("listainvicible");
|
||||
}
|
||||
else {
|
||||
if ($('ul#' + ulid).hasClass('listainvicible') == false) {
|
||||
$('ul#' + ulid).addClass("listainvicible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' li.livisible')) {
|
||||
$('ul#' + ulid + ' li.livisible').removeClass("livisible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' input:checked')) {
|
||||
$('ul#' + ulid + ' input:checked').prop('checked', false);
|
||||
}
|
||||
if ($('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]')) {
|
||||
$('ul#' + ulid + ' li:contains("' + texto + '") > input[type=checkbox]').prop('checked', true);
|
||||
}
|
||||
if ($('ul#' + ulid + ' li:contains("' + texto + '")')) {
|
||||
$('ul#' + ulid + ' li:contains("' + texto + '")').addClass("livisible");
|
||||
}
|
||||
if ($('ul#' + ulid + ' label:contains("' + texto + '") ~ ul li')) {
|
||||
$('ul#' + ulid + ' label:contains(""' + texto + '"") ~ ul li').addClass("livisible");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
|
||||
});
|
||||
});
|
||||
|
||||
function Afectable(btn) {
|
||||
debugger;
|
||||
$('#C_nuevacuenta').attr('data-toggle', 'confirmation');
|
||||
$('#C_nuevacuenta').attr('data-popout', 'true');
|
||||
$('#C_nuevacuenta').attr('data-original-title', '<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>');
|
||||
$('#C_nuevacuenta').attr('data-btn-ok-label', 'si');
|
||||
}
|
||||
|
||||
function NoAfectable() {
|
||||
debugger;
|
||||
$('#C_nuevacuenta').attr('data-toggle', '');
|
||||
$('#C_nuevacuenta').attr('data-popout', '');
|
||||
$('#C_nuevacuenta').attr('data-original-title', '');
|
||||
$('#C_nuevacuenta').attr('data-btn-ok-label', '');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,749 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad2_CatCuentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtConceptosconta As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtConceptosconta"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtConceptosconta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IDSelected As Integer
|
||||
Get
|
||||
Return ViewState("idsel").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("idsel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CvePadre As Integer
|
||||
Get
|
||||
Return ViewState("CvePadre").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePadre") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Afectable As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("Afectable").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Afectable") = value
|
||||
End Set
|
||||
End Property
|
||||
#Region "Contabilidadnew"
|
||||
Private Property CveProveedor As Integer
|
||||
Get
|
||||
Return ViewState("CveProveedor").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProveedor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCliente").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveClasificacion As Integer
|
||||
Get
|
||||
Return ViewState("CveClasificacion").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClasificacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveBancoCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveBancoCuenta").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveBancoCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveAlmacen As Integer
|
||||
Get
|
||||
Return ViewState("CveAlmacen").ToString.ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_ConceptosContables(1)
|
||||
DtConceptosconta = objconta.DtResultados
|
||||
End Using
|
||||
Using ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1) Then
|
||||
ddlBancos.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
ddlBancos.DataBind()
|
||||
ddlBancos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
DdlConcepto.DataSource = DtConceptosconta
|
||||
DdlConcepto.DataBind()
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'Else
|
||||
' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
' MEECuenta.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgrupadorSAT()
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetAgrupadoresSAT() Then
|
||||
DdlAgrupadorSAT.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
DdlAgrupadorSAT.DataBind()
|
||||
DdlAgrupadorSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####"
|
||||
'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
'End If
|
||||
|
||||
MEECuenta.Mask = Mascara '.Replace("0", "9")
|
||||
MEECuenta.AutoComplete = True
|
||||
MEECuenta.AutoCompleteValue = Mascara
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
ArbolCuentas.nivel = "CtaInicial"
|
||||
ArbolCuentas.nodoid = "CveCuenta"
|
||||
ArbolCuentas.padre = "CvePadre"
|
||||
ArbolCuentas.titulo = "CuentaFormatoNombre"
|
||||
ArbolCuentas.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Function getNodosHijos(nodo As Integer) As DataTable
|
||||
' Return DtDatos.FiltraParametros(String.Format("IdPadre = {0}", nodo))
|
||||
'End Function
|
||||
Private Function getNodospadreHijos(nodo As Integer) As DataTable
|
||||
Return DtDatos.FiltraParametros(String.Format("CveCuenta = {0}", nodo))
|
||||
End Function
|
||||
Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick
|
||||
LimpiarCampos()
|
||||
|
||||
Tsubcuenta.Visible = True
|
||||
DdlCuentaContable.Visible = False
|
||||
|
||||
Dim dt As New DataTable
|
||||
|
||||
'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve;
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
'obj.FindControl(String.Format("ul{0}", obj.Cve))
|
||||
'obj.Controls.Add(New TextBox())
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString)
|
||||
Tsubcuenta.Text = dr("CuentaFormato").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
LblSubCuenta.Text = dr("Nombre").ToString
|
||||
Afectable = CBool(dr("Afectable").ToString)
|
||||
CvePadre = dr("CvePadre").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If Afectable Then
|
||||
RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID))
|
||||
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
RegistraScript("NoAfectable();")
|
||||
|
||||
End If
|
||||
TxtCuenta.Enabled = True
|
||||
|
||||
'Tcuenta.Enabled = True
|
||||
nuevacuenta.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub limpiavalorescontables()
|
||||
|
||||
|
||||
DdlConcepto.SelectedValueExist(-1)
|
||||
onconceptochange()
|
||||
CveProveedor = -1
|
||||
DdlProveedores.SelectedText = ""
|
||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||
CveCliente = -1
|
||||
DdlClientesWS.SelectedText = ""
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
Dim PorcentajeImpuesto As Decimal = -1
|
||||
DdlClasificacion.SelectedValueExist(PorcentajeImpuesto)
|
||||
CveClasificacion = -1
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
CveBancoCuenta = -1
|
||||
CveAlmacen = -1
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
End Sub
|
||||
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
|
||||
LimpiarCampos()
|
||||
limpiavalorescontables()
|
||||
CargaCuentasContables()
|
||||
|
||||
Tsubcuenta.Visible = False
|
||||
DdlCuentaContable.Visible = True
|
||||
|
||||
Dim dt As DataTable
|
||||
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
|
||||
IDSelected = obj.Cve
|
||||
dt = getNodospadreHijos(IDSelected)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dt.Rows(0)
|
||||
TxtCuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
'Tcuenta.Text = dr("CuentaFormato").ToString.Replace("-", "").ToString
|
||||
Tnombre.Text = dr("Nombre").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString)
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa)
|
||||
If objconta.DtResultados.Rows.Count > 0 Then
|
||||
Dim rowcc As DataRow = objconta.DtResultados.Rows(0)
|
||||
DdlConcepto.SelectedValue = "-1"
|
||||
DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero())
|
||||
onconceptochange()
|
||||
CveProveedor = rowcc("CveProveedor").ToString().ToEntero()
|
||||
DdlProveedores.SelectedText = rowcc("Proveedor").ToString()
|
||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||
CveCliente = rowcc("CveCliente").ToString().ToEntero()
|
||||
DdlClientesWS.SelectedText = rowcc("Cliente").ToString
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100
|
||||
TxtPorcentaje.Text = PorcentajeImpuesto.ToString
|
||||
CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero()
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
|
||||
ddlBancos.SelectedValue = "-1"
|
||||
ddlBancos.SelectedValueExist(CveBancoCuenta)
|
||||
CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero()
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||
DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Else
|
||||
DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString)
|
||||
End If
|
||||
|
||||
|
||||
TxtDigAgrup.Text = dr("DigAgrup").ToString
|
||||
TxtNomIngles.Text = dr("NomIdioma").ToString
|
||||
|
||||
Dim Hijos As Integer = DtDatos.FiltraParametros(String.Format("CvePadre = {0}", IDSelected)).Rows.Count
|
||||
|
||||
If Hijos = 0 Then BtnEliminar.Visible = True
|
||||
|
||||
dt = getNodospadreHijos(dr("CvePadre").ToString.ToEntero)
|
||||
If dt.Rows.Count > 0 Then
|
||||
Dim drt As DataRow = dt.Rows(0)
|
||||
Tsubcuenta.Text = drt("Codigo").ToString
|
||||
DdlCuentaContable.SelectedValueExist(drt("CveCuenta").ToString)
|
||||
LblSubCuenta.Text = drt("Nombre").ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
TxtCuenta.Enabled = True
|
||||
Guardar.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
|
||||
DdlCuentaContable.ClearSelection()
|
||||
DdlCuentaContable.Items.Clear()
|
||||
DdlCuentaContable.SelectedValue = Nothing
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaContable.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlCuentaContable.DataBind()
|
||||
DdlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
|
||||
DdlCuentaContable.SelectedValueExist("-1")
|
||||
|
||||
End Sub
|
||||
Protected Sub Guardar_Click(sender As Object, e As EventArgs) Handles Guardar.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim CveProveedor As Integer = DdlProveedores.SelectedValue.ToEntero()
|
||||
Dim CveCliente As Integer = DdlClientesWS.SelectedValue.ToEntero()
|
||||
Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero()
|
||||
Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
|
||||
Dim CveBancoCuenta As Integer = ddlBancos.SelectedValue.ToEntero
|
||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' ObjContaEmpresa.Dispose()
|
||||
' ObjConta.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
' Dim IdAgrupador As Integer
|
||||
|
||||
' If ObjConta2.GetAgrupadoresSAT() Then
|
||||
' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
' End If
|
||||
' If Id > 0 Then
|
||||
' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
'End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("Nombre") = Tnombre.Text
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaDatos()
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
Dim item As CheckBox = DirectCast(ArbolCuentas.FindControl(String.Format("chk{0}", IDSelected)), CheckBox)
|
||||
item.Text = String.Format("{0} - {1}", customerRow("CuentaFormato").ToString, Tnombre.Text)
|
||||
'updatos.Visible = False
|
||||
'Guardar.Visible = False
|
||||
LimpiarCampos()
|
||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||
updatos.Update()
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click
|
||||
|
||||
If Tnombre.Text.Trim = "" Then Alert("Ingrese nombre de la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
If TxtCuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
'If Tcuenta.Text.Trim = "" Then Alert("Ingrese la cuenta", TipoMensaje.MsgError) : Exit Sub
|
||||
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
TxtCuenta.Text.Replace("-", "")
|
||||
Dim idnew As Integer = 0
|
||||
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim row As DataRow = Nothing
|
||||
Dim CveTipoSaldo As Integer = 0
|
||||
Dim PorcentajeIVA As Decimal = -1
|
||||
Dim drt As DataRow
|
||||
Dim CveConceptoAdmin As Integer
|
||||
Dim CveProveedor As Integer
|
||||
Dim CveCliente As Integer
|
||||
Dim CveClasificacion As Integer
|
||||
Dim PorcentajeImpuesto As Decimal
|
||||
Dim CveBancoCuenta As Integer
|
||||
'Dim CveAlmacen As Integer = -1
|
||||
'Dim CvePersonal As Integer = -1
|
||||
Dim NombreCuenta As String
|
||||
Dim TipoCuenta As String
|
||||
Dim CuentaMayor As Integer
|
||||
Dim CveMoneda As Integer
|
||||
Dim DigAgrup As Integer
|
||||
Dim CveAgrupadorSat As Integer
|
||||
Dim NomIdioma As String
|
||||
Dim TieneError As Boolean = False
|
||||
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If CveConceptoContable > 0 Then
|
||||
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||
End If
|
||||
If Not IsNothing(row) Then
|
||||
If CveTipoSaldo = 3 Then
|
||||
PorcentajeIVA = TxtPorcentaje.Text.ToDecimal / 100D
|
||||
End If
|
||||
End If
|
||||
ObjConta.IniciaTransacSQL()
|
||||
If Afectable Then
|
||||
If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected))
|
||||
CveConceptoAdmin = If(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero)
|
||||
CveProveedor = If(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero)
|
||||
CveCliente = If(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero)
|
||||
CveClasificacion = If(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero)
|
||||
PorcentajeImpuesto = If(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero)
|
||||
CveBancoCuenta = If(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
|
||||
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
|
||||
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
|
||||
NombreCuenta = If(drt("Nombre").ToString = "", "", drt("Nombre").ToString)
|
||||
TipoCuenta = If(drt("Tipo").ToString = "", "", drt("Tipo").ToString)
|
||||
CuentaMayor = If(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero)
|
||||
CveMoneda = If(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero)
|
||||
DigAgrup = If(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero)
|
||||
CveAgrupadorSat = If(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero)
|
||||
NomIdioma = If(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString)
|
||||
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
|
||||
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
|
||||
If idnew > 0 Then
|
||||
If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
|
||||
If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda,
|
||||
DigAgrup, CveAgrupadorSat, NomIdioma) Then
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If idnew > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||
Dim IdAgrupador As Integer
|
||||
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta2.IniciaTransacSQL()
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
|
||||
If IdPadre > 0 Then
|
||||
Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, 1, IdPadre, IdAgrupador)
|
||||
|
||||
If idnew2 > 0 Then
|
||||
If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
ObjConta2.RollBack()
|
||||
ObjConta.RollBack()
|
||||
Alert("Ocurrio un error al vincultar la cuenta con SIG y Compaq", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjConta2.Commit()
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
ObjConta2.RollBack()
|
||||
Alert("Ocurrio un error al crear la cuenta en Compaq", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta2.Dispose()
|
||||
End If
|
||||
If Not TieneError Then
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
dr("CveCuenta") = idnew
|
||||
dr("CuentaFormato") = TxtCuenta.Text
|
||||
'dr("CuentaFormato") = Tcuenta.Text
|
||||
dr("Nombre") = Tnombre.Text
|
||||
dr("CuentaFormatoNombre") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)
|
||||
dr("Tipo") = DTcuenta.SelectedValue.ToString
|
||||
dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString
|
||||
dr("CvePadre") = IDSelected
|
||||
dr("Codigo") = Tnombre.Text
|
||||
dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero
|
||||
dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero
|
||||
dr("NomIdioma") = TxtNomIngles.Text.Trim
|
||||
DtDatos.Rows.Add(dr)
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
'.Attributes.Add("data-hijos","0");
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
|
||||
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
|
||||
If (IsNothing(objul)) Then
|
||||
objul = New ADServerControl.DragableUL
|
||||
objul.ID = String.Format("ul{0}", item.Cve)
|
||||
item.Controls.Add(objul)
|
||||
End If
|
||||
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text))
|
||||
|
||||
End If
|
||||
End If
|
||||
If ObjConta2 IsNot Nothing Then ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
ObjConta.RollBack()
|
||||
Alert("Ocurrio un error al crear la cuenta", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjConta.Commit()
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiarCampos()
|
||||
TxtCuenta.Text = ""
|
||||
'Tcuenta.Text = ""
|
||||
Tnombre.Text = ""
|
||||
DTcuenta.SelectedValue = "-1"
|
||||
DcuentaMayor.SelectedValue = "-1"
|
||||
DdlAgrupadorSAT.SelectedValue = "-1"
|
||||
Tsubcuenta.Text = ""
|
||||
TxtDigAgrup.Text = ""
|
||||
Guardar.Visible = False
|
||||
nuevacuenta.Visible = False
|
||||
TxtCuenta.Enabled = False
|
||||
'Tcuenta.Enabled = False
|
||||
DdlCuentaContable.SelectedValueExist(-1)
|
||||
DdlCuentaContable.Visible = False
|
||||
Tsubcuenta.Visible = True
|
||||
BtnEliminar.Visible = False
|
||||
End Sub
|
||||
|
||||
Protected Sub borrar_Click(sender As Object, e As EventArgs) Handles borrar.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'ObjConta.IniciaTransacSQL()
|
||||
|
||||
If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
customerRow("CvePadre") = "-5"
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
|
||||
Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem)
|
||||
padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString
|
||||
ArbolCuentas.Controls.Remove(item)
|
||||
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))
|
||||
|
||||
LimpiarCampos()
|
||||
upcuentas.Update()
|
||||
Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
|
||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
|
||||
If Id > 0 Then
|
||||
If ObjConta2.RemoveCuenta(Id) Then
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
Else
|
||||
Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError)
|
||||
' ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs)
|
||||
' CargaAgrupadorSAT()
|
||||
'End Sub
|
||||
Protected Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
onconceptochange()
|
||||
End Sub
|
||||
Private Sub onconceptochange(Optional CveCuenta As Integer = -1)
|
||||
PnlOpcion1.Visible = False
|
||||
pnlOpcion2.Visible = False
|
||||
pnlOpcion3.Visible = False
|
||||
pnlOpcion4.Visible = False
|
||||
pnlOpcion5.Visible = False
|
||||
pnlOpcion6.Visible = False
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
Dim row As DataRow = Nothing
|
||||
Dim CveTipoSaldo As Integer = 0
|
||||
Dim CveParejaContable As Integer = 0
|
||||
If CveConceptoContable > 0 Then
|
||||
row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
|
||||
CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
|
||||
CveParejaContable = row("CveParejaContable").ToString().ToEntero()
|
||||
End If
|
||||
If Not IsNothing(row) Then
|
||||
Select Case CveTipoSaldo
|
||||
Case 1
|
||||
PnlOpcion1.Visible = True
|
||||
Case 2
|
||||
pnlOpcion2.Visible = True
|
||||
Case 3
|
||||
pnlOpcion2.Visible = True
|
||||
pnlOpcion3.Visible = True
|
||||
'If DdlClasificacion.Items.Count < 2 Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
'End If
|
||||
Case 4
|
||||
pnlOpcion4.Visible = True
|
||||
Case 5
|
||||
pnlOpcion5.Visible = True
|
||||
|
||||
Case 6
|
||||
pnlOpcion6.Visible = True
|
||||
Case 8
|
||||
pnlOpcion8.Visible = True
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs)
|
||||
Imprime("Excel")
|
||||
End Sub
|
||||
Private Sub Imprime(Formato As String)
|
||||
If DtDatos IsNot Nothing Then
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,280 +0,0 @@
|
||||
<%@ Page Title="Contabilidad2 - Catálogo Cuentas Asignación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCuentasAsignaciones.aspx.vb" Inherits="Contabilidad2_CatCuentasAsignaciones" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cuentas Asignación.
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarAsignacion" data-toggle="tooltip" data-placement="left" title="Agregar Cuenta" Text="<i class='fa fa-plus'></i>Agregar Cuenta Asignación"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarGlobal" data-toggle="tooltip" data-placement="left" title="Agregar Global" Text="<i class='fa fa-plus'></i>Agregar Global"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label runat="server" id="LblTipo" class="col-md-1 truncate">Opción:</label>
|
||||
<div runat="server" id="DivTipo" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Unicas" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificaciones" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Bancos" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Almacenes" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Personales" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Proveedores" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Clientes" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Activos Fijos" Value="9"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label runat="server" id="Lbl" class="col-md-1 truncate">Opción:</label>
|
||||
<div runat="server" id="Div1" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Asignadas" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin Asignar" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label runat="server" id="Lblcon" class="col-md-1 truncate">Concepto:</label>
|
||||
<div runat="server" id="DivCon" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlConceptos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo2" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto,CveCredito,CveColectiva" AutoGenerateColumns="False"
|
||||
Style=" width:100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="PorcentajeIVA" HeaderText="PorcentajeIVA" />
|
||||
<asp:BoundField DataField="TipoGasto" HeaderText="TipoGasto" Visible="false" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="49px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="ActualizaModulo" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="49px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" Visible='<%# Eval("CveCuentaAsignacion").ToString <> "" %>' CausesValidation="False" OnClick="EliminarRow" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<asp:GridView runat="server" ID="GvGlobal" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
|
||||
DataKeyNames="CveEmpresa,CveCuenta,CveConceptoContable,CveCuentaAsignacion,CveConceptoNomina, CveProveedor,CveClasificacion,CveAlmacen, IdCuenta, PorcentajeIVA, CveBancoCuenta, CveCliente, CvePersonal" AutoGenerateColumns="False"
|
||||
Style=" width:100%" GridLines="None" Caption="Globales">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="250px" HeaderText="Concepto Contable" />
|
||||
<asp:BoundField DataField="TipoGlobalStr" ItemStyle-Width="50px" HeaderText="Tipo Global" />
|
||||
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" />
|
||||
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
|
||||
<asp:BoundField DataField="PorcentajeImpuesto" HeaderText="%" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="49px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRowGlobal" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpModal">
|
||||
<ContentTemplate>
|
||||
<div id="ModalCat" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalModulos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Cuentas Asignación</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align:center">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:HiddenField ID="HdnCveCuentaAsignacion" runat="server" />
|
||||
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
|
||||
<label for="<%= DdlCuenta.ClientID.ToString()%>">Cuenta Contable: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divProveedor" runat="server" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" CssClassDdl="select2me" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" data-metodo="getproveedores" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="240px" ValidationGroup="GrpModulo" ></ADS:Dropdownlost>
|
||||
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divCliente" runat="server" visible="false">
|
||||
<label for="<%= DdlClientes.ClientID.ToString()%>">Cliente: </label><br />
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="90%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divBancos" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlCuentaBancaria" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlCuentaBancaria.ClientID.ToString()%>">Cuenta Bancaria: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright" id="divPersonal" runat="server" visible="false">
|
||||
<label for="<%= DdlPersonal.ClientID.ToString()%>">Personal: </label><br />
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlPersonal" Width="90%" data-metodo="getpersonal" runat="server" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssStyle="width: 100%;" Enabled="false"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divClasificacion" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divAlmacen" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlAlmacen" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacén: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divPorcentajeIVA" runat="server" visible="false">
|
||||
<asp:TextBox ID="TxtPorcentajeIVA" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divConceptoNomina" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
|
||||
<label for="<%= DdlConceptoNomina.ClientID.ToString()%>">Concepto nómina: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divActivoFijo" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlActivoFijo" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Descripcion" DataValueField="CveActivoFijo" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divColectivas" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlColectivas" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Colectiva" DataValueField="CveColectiva" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlColectivas.ClientID.ToString()%>">Colectivas: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divCredito" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlCreditos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Referencia" DataValueField="CveCredito" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlCreditos.ClientID.ToString()%>">Crédito: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divSubProyectos" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divTipoGasto" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
|
||||
<label for="<%= DdlTipoGasto.ClientID.ToString()%>">Tipo Gasto: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="divRegeneraCuenta" runat="server" visible="false">
|
||||
<asp:CheckBox ID="chkRegeneraCuenta" runat="server" />
|
||||
<label for="<%= chkRegeneraCuenta.ClientID.ToString()%>">Regenera Cuenta: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpModulo" />
|
||||
<button id="BtnCancelarProyecto" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:CheckBox ID="ChkSeguirRegistrando" Checked="true" Text="Seguir Registrando" runat="server" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UppModalGlobal">
|
||||
<ContentTemplate>
|
||||
<div id="ModalGlobal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UppGlobal2" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal1" runat="server">Cuentas Globales</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align:center">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:HiddenField ID="HiddenField1" runat="server" />
|
||||
<asp:DropDownList ID="DdlConceptoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo2" ></asp:DropDownList>
|
||||
<label for="<%= DdlConceptoGlobal.ClientID.ToString()%>">Concepto Contable: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright" id="div3" runat="server" >
|
||||
<asp:DropDownList ID="DdlTipoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" autopostback="true" Width="240px" ValidationGroup="GrpModulo2" >
|
||||
<asp:ListItem Text="Mayor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Desglosado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoGlobal.ClientID.ToString()%>">Tipo Global: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="width:50%;text-align:left">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuentaGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo2"></asp:DropDownList>
|
||||
<label for="<%= DdlCuentaGlobal.ClientID.ToString()%>">Cuenta Contable: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LBAgregaGlobal" runat="server" class="btn btn-success" Text="Agregar" OnClick="LBAgregaGlobal_Click" ValidationGroup="GrpModulo2" />
|
||||
<button id="Button1" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:CheckBox ID="CheckBox1" Checked="true" Text="Seguir Registrando" runat="server" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,435 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveConceptoAsignacion() As Integer 'Guardamos el ID de registro para saber cual registro Editar
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveConceptoAsignacion")), -1, CInt(ViewState("CveConceptoAsignacion")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveConceptoAsignacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property OpAgregar As Boolean
|
||||
Get
|
||||
If ViewState("OpAgregar") Is Nothing Then
|
||||
ViewState("OpAgregar") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("OpAgregar").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("OpAgregar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
HttpContext.Current.Application("GlobalDTContaConceptosContables") = Nothing
|
||||
DdlConceptos.DataSource = GlobalDTContaConceptosContables(-1)
|
||||
DdlConceptos.DataBind()
|
||||
DdlConceptos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargaDatosModal()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs)
|
||||
CargaDatosSistema()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaDatos()
|
||||
' Dim ObjConta As New ClsContabilidad
|
||||
' If ObjConta.GetCuentasAsignaciones(UsuarioActual.CveEmpresa) Then
|
||||
' GvDatos.DataSource = ObjConta.DtResultados
|
||||
' End If
|
||||
' ObjConta.Dispose()
|
||||
' GvDatos.DataBind()
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaDatosSistema()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, DdlTipo.SelectedValue.ToEntero, DdlOpcion.SelectedValue.ToEntero, DdlConceptos.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0
|
||||
GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0
|
||||
GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> ""
|
||||
|
||||
If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then
|
||||
GvGlobal.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
GvGlobal.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosModal()
|
||||
DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
|
||||
DdlConceptoNomina.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim Con As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Con.SincronizaCuentas(UsuarioActual.CveEmpresa)
|
||||
Con.Dispose()
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetConta_ConceptosContables() Then
|
||||
DdlCconceptosContables.DataSource = ObjConta.DtResultados.FiltraParametros("EsSistema = True ")
|
||||
DdlConceptoGlobal.DataSource = ObjConta.DtResultados.FiltraParametros(" EsSistema = True AND EsGlobal = True")
|
||||
End If
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuenta.DataSource = ObjConta.DtResultados
|
||||
DdlCuentaGlobal.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlClientes.setEsWebService(True)
|
||||
|
||||
DdlPersonal.setEsWebService(True)
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("-", "0"))
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaBancaria.DataSource = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
DdlCuentaBancaria.DataBind()
|
||||
DdlCconceptosContables.DataBind()
|
||||
DdlConceptoGlobal.DataBind()
|
||||
DdlCuenta.DataBind()
|
||||
DdlCuentaGlobal.DataBind()
|
||||
DdlProveedor.DataBind()
|
||||
'DdlPersonal.DataBind()
|
||||
DdlClasificacion.DataBind()
|
||||
DdlAlmacen.DataBind()
|
||||
DdlSubProyectos.DataBind()
|
||||
|
||||
DdlCuentaBancaria.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlConceptoNomina.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCconceptosContables.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
OpAgregar = False
|
||||
LimpiarDatos()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("")
|
||||
Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero
|
||||
HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
DdlCconceptosContables.Enabled = False
|
||||
DdlSubProyectos.Enabled = False
|
||||
DdlClasificacion.Enabled = False
|
||||
DdlPersonal.Enabled = False
|
||||
RecargaConcepto(CveConceptoContable)
|
||||
|
||||
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
|
||||
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
||||
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
||||
If GvRow.DataKey("CveProveedor").ToEntero > 0 Then
|
||||
DdlProveedor.ddl.Items.Clear()
|
||||
DdlProveedor.ddl.ClearSelection()
|
||||
Dim NomProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=GvRow.DataKey("CveProveedor").ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
DdlProveedor.ddl.Items.Add(New ListItem(NomProv, GvRow.DataKey("CveProveedor")))
|
||||
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor")
|
||||
End If
|
||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
|
||||
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
|
||||
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
|
||||
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero)
|
||||
DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero)
|
||||
DdlActivoFijo.Enabled = False
|
||||
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
DdlColectivas.SelectedValueExist(GvRow.DataKey("CveColectiva").ToEntero)
|
||||
|
||||
If CveCliente > 0 Then
|
||||
Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre")
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente.ToString))
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlClientes.SelectedText = drp
|
||||
End If
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto")
|
||||
DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal.ToString))
|
||||
DdlPersonal.SelectedValue = CvePersonal.ToString
|
||||
DdlPersonal.SelectedText = drp
|
||||
End If
|
||||
|
||||
If GvRow.DataKey("CveCredito").ToEntero > 0 Then
|
||||
DdlCreditos.Items.Clear()
|
||||
DdlCreditos.ClearSelection()
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito")
|
||||
End If
|
||||
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RecargaConcepto(CveConceptoContable As Integer)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
|
||||
divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
|
||||
divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
|
||||
divPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString)
|
||||
divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString)
|
||||
divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString)
|
||||
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
|
||||
divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
|
||||
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
If Dr("AplicaActivoFijo").ToString = "True" Then
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlActivoFijo.DataBind() ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlActivoFijo.Enabled = True
|
||||
Else
|
||||
DdlActivoFijo.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
||||
|
||||
If CveConceptoContable = 51 Then
|
||||
divTipoGasto.Visible = True
|
||||
DdlTipoGasto.Items.Clear()
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGasto.DataBind()
|
||||
DdlTipoGasto.Items.Add(New ListItem("-", "-1"))
|
||||
End If
|
||||
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||
divRegeneraCuenta.Visible = True
|
||||
End If
|
||||
|
||||
If Dr("AplicaCredito").ToString = "True" Then
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
|
||||
If OpAgregar Then
|
||||
DdlCreditos.Enabled = True
|
||||
Else
|
||||
DdlCreditos.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If Dr("AplicaColectiva").ToString = "True" Then
|
||||
Dim ObjG As New ClsGenerales
|
||||
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
|
||||
DdlColectivas.DataSource = ObjG.DtResultados
|
||||
End If
|
||||
ObjG.Dispose()
|
||||
DdlColectivas.DataBind()
|
||||
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlColectivas.Enabled = True
|
||||
Else
|
||||
DdlColectivas.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRow(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.RemoveCuentasAsignaciones(GvRow.DataKey("CveCuentaAsignacion").ToEntero) Then
|
||||
Alert("se elimino correctamente")
|
||||
End If
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarGlobal_Click(sender As Object, e As EventArgs) Handles BtnAgregarGlobal.Click
|
||||
|
||||
UppModalGlobal.Update()
|
||||
RegistraScript("$('#ModalGlobal').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveConceptoContable").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then
|
||||
Alert("se elimino correctamente")
|
||||
End If
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
|
||||
OpAgregar = True
|
||||
|
||||
LimpiarDatos()
|
||||
DdlCconceptosContables.Enabled = True
|
||||
DdlSubProyectos.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
DdlPersonal.Enabled = True
|
||||
LbAgregar.Text = "Agregar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarDatos()
|
||||
CveConceptoAsignacion = -1
|
||||
DdlCconceptosContables.SelectedValue = "-1"
|
||||
DdlCuenta.SelectedValue = "-1"
|
||||
DdlProveedor.SelectedValue = "-1"
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
DdlConceptoNomina.SelectedValue = "-1"
|
||||
DdlCuentaBancaria.SelectedValueExist("-1")
|
||||
TxtPorcentajeIVA.Text = ""
|
||||
DdlClientes.ddl.DataSource = ""
|
||||
DdlClientes.ddl.DataBind()
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlPersonal.ddl.DataSource = ""
|
||||
DdlPersonal.ddl.DataBind()
|
||||
DdlPersonal.setEsWebService(True)
|
||||
HdnCveCuentaAsignacion.Value = ""
|
||||
|
||||
If OpAgregar Then
|
||||
divCliente.Visible = False
|
||||
divProveedor.Visible = False
|
||||
divPersonal.Visible = False
|
||||
divPorcentajeIVA.Visible = False
|
||||
divClasificacion.Visible = False
|
||||
divBancos.Visible = False
|
||||
divAlmacen.Visible = False
|
||||
divSubProyectos.Visible = False
|
||||
divActivoFijo.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim ErrorString As String = ""
|
||||
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
|
||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');")
|
||||
|
||||
If ErrorString.Length > 0 Then
|
||||
ObjConta.RollBack()
|
||||
Alert(ErrorString)
|
||||
Else
|
||||
ObjConta.Commit()
|
||||
Alert("Agregado correctamente")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LBAgregaGlobal_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ErrorString As String = ""
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If ErrorString.Length > 0 Then
|
||||
Alert(ErrorString)
|
||||
Else
|
||||
Alert("Agregado correctamente")
|
||||
End If
|
||||
CargaDatosSistema()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlCconceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCconceptosContables.SelectedIndexChanged
|
||||
RecargaConcepto(DdlCconceptosContables.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub DdlTipoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoGlobal.SelectedIndexChanged
|
||||
Dim Afectables As Integer = 1
|
||||
If DdlTipoGlobal.SelectedValue = "2" Then 'cuando es detallado, que de la opción de seleccionar una de mayor y/o no afectable
|
||||
Afectables = -1
|
||||
End If
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", Afectables, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentaGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("", Orderby:="Codigo")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCuentaGlobal.DataBind()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,323 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="MovimientosconProveedores.aspx.vb" Inherits="MovimientosconProveedores" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>F. I.</li>
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 93px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>F. F. </li>
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 94px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>Tipo de Cuentas:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" onchange="Enable();">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" runat="server" Width="150px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</li>
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte" visible="true">Tipo:
|
||||
</li>
|
||||
<%--</label>--%>
|
||||
<%--<div class="col-md-9">--%>
|
||||
<li runat="server" id="tdTipoReporte2" visible="true">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<%--style="display:none;"--%>
|
||||
<%--<div class="row">--%>
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>
|
||||
|
||||
<%--<div class="" style="line-height:1;">--%>
|
||||
<%--<label class="col-md-1 text-right text-size-12">--%>
|
||||
Cuentas:
|
||||
<%--</label>--%>
|
||||
<%--</div>--%>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<%--<div class="col-md-2" style="width: 250px;">--%>
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--</div>--%>
|
||||
</li>
|
||||
<%--<label class="col-md-1">Cuenta:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<asp:HiddenField ID="HdnCveCuenta2" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta2" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</div>--%>
|
||||
</ul>
|
||||
<%--</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigoSAT" runat="server" Text='<%# Eval("CodigoSAT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombreSAT" runat="server" Text='<%# Eval("NombreSAT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
document.getElementById("TxtCuenta").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
document.getElementById("TxtCuenta").value = " ";
|
||||
document.getElementById("TxtCuenta").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,299 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class MovimientosconProveedores
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As Integer
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
|
||||
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
|
||||
FechaFin = NowADS()
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
' TipoReporte = 1
|
||||
' tdTipoReporte.Visible = True
|
||||
' tdTipoReporte2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas '.FiltraParametros("Afectable = 1")
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}{3}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""), If(dr("Afectable").ToString = "1", " *", ""))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "-1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If Request("TipoReporte") IsNot Nothing Then
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Else
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
End If
|
||||
'Dim CveSubProyecto As String
|
||||
If Request("CveSubProyecto") IsNot Nothing Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString.ToEntero
|
||||
Else
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveSubProyecto.ToEntero, UsuarioActual.CveEmpresa, TipoReporte, 1) Then
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
Else
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
' 'e.Row.ControlStyle.Font.Size = 9
|
||||
' 'e.Row.ControlStyle.Height = 30
|
||||
'Else
|
||||
' e.Row.ControlStyle.Font.Bold = False
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
'If e.Row.DBCampo("Tipo") <> "D" Then
|
||||
' 'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, " ")
|
||||
' e.Row.FCLabel("LbSaldoInicial2").Visible = True
|
||||
' e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
'End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
' e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "AnexoCatalogo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,311 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
<%-- function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}--%>
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
//document.getElementById("TxtCuenta").disabled = false;
|
||||
document.getElementById("C_DdlCuentas").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
//document.getElementById("TxtCuenta").value = " ";
|
||||
//document.getElementById("TxtCuenta").disabled = true;
|
||||
$get("C_DdlCuentas").value = "-1";
|
||||
document.getElementById("C_DdlCuentas").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,315 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC2_RepAnexoCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
'Private Property DTCuentas As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DTCuentas"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DTCuentas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Private Property CveProyecto As String
|
||||
Get
|
||||
CveProyecto = ViewState("CveProyecto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As String
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
|
||||
' Response.Redirect($"/Contabilidad/RepAnexoCatalogo.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros = True
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
|
||||
FechaInicio = NowADS().FirstDayOfMonth
|
||||
FechaFin = NowADS()
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
' TipoReporte = 1
|
||||
' tdTipoReporte.Visible = True
|
||||
' tdTipoReporte2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
If Request("ER") IsNot Nothing AndAlso Request("ER").ToString = "1" Then
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
Else
|
||||
FechaInicio = ("1900/01/01").ToDate
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
|
||||
CveProyecto = Request("CveProyecto").ToString
|
||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
DdlSubproyecto.SelectedValueExist(CveSubProyecto)
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
' DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If Request("TipoReporte") IsNot Nothing Then
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Else
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
End If
|
||||
'Dim CveSubProyecto As String
|
||||
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToString
|
||||
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveProyecto.ToEntero, CveSubProyecto.ToEntero, UsuarioActual.CveEmpresa, TipoReporte) Then
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
Else
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
'e.Row.ControlStyle.Font.Size = 9
|
||||
'e.Row.ControlStyle.Height = 30
|
||||
Else
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("Tipo") <> "D" Then
|
||||
'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, " ")
|
||||
e.Row.FCLabel("LbSaldoInicial2").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}&TP={5}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx")
|
||||
'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "AnexoCatalogo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("usuarioImprimio", UsuarioActual.Nombre))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
IdCuenta = DdlCuentas.SelectedValue.ToEntero
|
||||
CargaDatos()
|
||||
End If
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,569 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoAnual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoAnual" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Anual
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" CssClass="btn btn-default" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio Inicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio Fin:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio2" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" 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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="div1" runat="server">
|
||||
<asp:Label ID="LblDiv" runat="server">Divisor:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true"--%>
|
||||
|
||||
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnual" runat="server" DataKeyNames="Level,CveCuenta" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300" data-sort="true" OnDataBound="GvAnual_DataBound" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).closest('tr').text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica');
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros() {
|
||||
|
||||
let Divisor = $("#DdlDivisor option:selected").val();
|
||||
|
||||
$('.ceros').each(function (i, obj) {
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
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)));
|
||||
|
||||
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()), ((Divisor == 1) ? 2 : 0)));
|
||||
}
|
||||
|
||||
if (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
|
||||
var tmpNum = Importe;
|
||||
|
||||
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
|
||||
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
|
||||
});
|
||||
|
||||
return tmpNum;
|
||||
}
|
||||
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,437 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoAnual
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property EsVertical As Integer
|
||||
Get
|
||||
Return ViewState("EsVertical").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("EsVertical") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property listaCamposanios As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCamposanios"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCamposanios") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property DtHeadersCount As Integer
|
||||
Get
|
||||
If ViewState("DtHeadersCount") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("DtHeadersCount").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("DtHeadersCount") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property DTHeaders As DataTable
|
||||
|
||||
Get
|
||||
|
||||
If ViewState("DTHeaders") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTHeaders"), DataTable)
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTDatos As DataTable
|
||||
|
||||
Get
|
||||
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCamposanios = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
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
|
||||
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)
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
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
|
||||
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DdlCuentas.DataSource = Conta.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio2.DataBind()
|
||||
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
|
||||
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()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DTHeaders = New DataTable
|
||||
DTDatos = New DataTable
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
DtHeadersCount = 0
|
||||
|
||||
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)
|
||||
DTHeaders = Conta.DSResultados.Tables(0)
|
||||
DTDatos = Conta.DSResultados.Tables(1)
|
||||
|
||||
|
||||
DtHeadersCount = DTHeaders.Rows.Count
|
||||
GvAnual.DataSource = Conta.DSResultados.Tables(1)
|
||||
|
||||
Dim Index As Integer = 2
|
||||
For Index = 2 To GvAnual.Columns.Count - 1
|
||||
GvAnual.Columns(Index).Visible = False
|
||||
Next Index
|
||||
|
||||
listaCamposanios.Clear()
|
||||
Index = 2
|
||||
For Each Dr As DataRow In DTHeaders.Rows
|
||||
GvAnual.Columns(Index).Visible = True
|
||||
CType(GvAnual.Columns(Index), BoundField).DataField = String.Format("Ejercicio{0}", Dr("Ejercicio"))
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
listaCamposanios.Add(New String() {String.Format("Ejercicio{0}", Dr("Ejercicio")), Dr("Ejercicio").ToString()})
|
||||
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
If EsVertical <> 1 Then
|
||||
GvAnual.Columns(Index + 1).Visible = True
|
||||
CType(GvAnual.Columns(Index + 1), BoundField).DataField = String.Format("Ejercicio{0}VariacionImporte", Dr("Ejercicio"))
|
||||
GvAnual.Columns(Index + 1).HeaderText = "$"
|
||||
End If
|
||||
|
||||
GvAnual.Columns(Index + 2).Visible = True
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = String.Format("Ejercicio{0}{1}Porcentaje", Dr("Ejercicio"), If(EsVertical = 1, "", "Variacion"))
|
||||
GvAnual.Columns(Index + 2).HeaderText = "%"
|
||||
End If
|
||||
|
||||
Index += 3
|
||||
Next
|
||||
|
||||
GvAnual.DataBind()
|
||||
UpAnual.Update()
|
||||
|
||||
Else
|
||||
GvAnual.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvAnual.DataBind()
|
||||
UpAnual.Update()
|
||||
|
||||
'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
|
||||
|
||||
'RegistraScript($"LimpiaCeros();")
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
|
||||
|
||||
If GvAnual.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
setgraficaCC(e)
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
Dim inicial As Boolean = True
|
||||
Dim Index As Integer = 2
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"Ejercicio{DRow("Ejercicio")}").ToDecimal
|
||||
Dim Anio As Integer = DRow("Ejercicio").ToString.ToEntero
|
||||
|
||||
If Importe <> 0 Then
|
||||
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{Anio}&FI=01/01/{Anio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
|
||||
|
||||
e.Row.Cells(Index + 1).Text = "-"
|
||||
|
||||
ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
|
||||
e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index + 2).Text = "-"
|
||||
ElseIf e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index + 2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
'If inicial Then
|
||||
' Index = Indice + 1
|
||||
' inicial = False
|
||||
' Continue For
|
||||
'End If
|
||||
|
||||
Index += 3
|
||||
Next
|
||||
|
||||
|
||||
|
||||
'e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCamposanios
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
|
||||
|
||||
GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, "Anexo del Catálogo - Anual", DatoTituloExtra:=$"Periodo{DdlPeriodo.SelectedItem.Text}", DatosFiltros:=SbFiltros.ToString())
|
||||
'GvAnual.ExportToExcelGembox("AnexoCatálogoAnual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio2.SelectedValue}", "Anexo del Catálogo - Anual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub GvAnual_DataBound(sender As Object, e As EventArgs)
|
||||
|
||||
'If DtHeadersCount > 0 Then
|
||||
|
||||
|
||||
' '96 32
|
||||
|
||||
' Dim NColumns As Integer = GvAnual.Columns.Count
|
||||
' Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
|
||||
|
||||
' Dim cell1 As New TableHeaderCell()
|
||||
' cell1.Text = ""
|
||||
' cell1.ColumnSpan = 1
|
||||
' row.Controls.Add(cell1)
|
||||
|
||||
' Dim cell2 As New TableHeaderCell()
|
||||
' cell2.Text = ""
|
||||
' cell2.ColumnSpan = 1
|
||||
' row.Controls.Add(cell2)
|
||||
|
||||
|
||||
' Dim cell3 As New TableHeaderCell()
|
||||
' cell3.Text = ""
|
||||
' cell3.ColumnSpan = 1
|
||||
' row.Controls.Add(cell3)
|
||||
|
||||
' Dim cell4 As New TableHeaderCell()
|
||||
' cell4.Text = ""
|
||||
' cell4.ColumnSpan = 1
|
||||
' row.Controls.Add(cell4)
|
||||
|
||||
' For x = 0 To DtHeadersCount
|
||||
|
||||
' Dim cell As New TableHeaderCell()
|
||||
' cell.Text = ""
|
||||
' cell.ColumnSpan = 1
|
||||
' row.Controls.Add(cell)
|
||||
|
||||
' Dim cellColspan2 = New TableHeaderCell()
|
||||
' cellColspan2.ColumnSpan = 2
|
||||
' cellColspan2.Text = "Variación"
|
||||
' row.Controls.Add(cellColspan2)
|
||||
|
||||
' x = x + 1
|
||||
|
||||
' Next
|
||||
|
||||
' GvAnual.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,593 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo de Catálogo - Centro Costo
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Divisor:
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpCC" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div>
|
||||
<div style="background-color: #fff;">
|
||||
<asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
DataKeyNames="Level,CveCuenta" CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).closest('tr').text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica');
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('Grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros(Divisor) {
|
||||
$('.ceros').each(function (i, obj) {
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
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 (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
|
||||
var tmpNum = Importe;
|
||||
|
||||
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
|
||||
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
|
||||
});
|
||||
|
||||
return tmpNum;
|
||||
}
|
||||
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,291 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTHeaders As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DTHeaders") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTHeaders"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTDatos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
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()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlCuentas.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
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()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DTHeaders = New DataTable
|
||||
DTDatos = New DataTable
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
DTHeaders = Conta.DSResultados.Tables(0)
|
||||
DTDatos = Conta.DSResultados.Tables(1)
|
||||
GvCC.DataSource = Conta.DSResultados.Tables(1)
|
||||
|
||||
Dim Index = 4
|
||||
For Index = 4 To GvCC.Columns.Count - 1
|
||||
GvCC.Columns(Index).Visible = False
|
||||
Next Index
|
||||
listaCampos.Clear()
|
||||
|
||||
Index = 4
|
||||
For Each Dr As DataRow In DTHeaders.Rows
|
||||
GvCC.Columns(Index).Visible = True
|
||||
CType(GvCC.Columns(Index), BoundField).DataField = String.Format("SubProyecto{0}", Dr("SubProyecto"))
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
|
||||
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
|
||||
|
||||
'GvCC.Columns(Index + 1).Visible = True
|
||||
'CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
|
||||
'GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
'Index += 2
|
||||
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
GvCC.DataBind()
|
||||
UpCC.Update()
|
||||
|
||||
Else
|
||||
GvCC.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If GvCC.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
setgraficaCC(e)
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Level").ToEntero = 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
|
||||
Dim Index As Integer = 2
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
|
||||
|
||||
If e.Row.CssClass = "Totales" And Index = 2 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.ColorTranslator.FromHtml("#337ab7")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index).Text = "-"
|
||||
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
Dim inicial As Boolean = True
|
||||
Index = 4
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
|
||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(Index).Text = "-"
|
||||
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If Importe <> 0 Then
|
||||
'' pendiente.. ' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Index += 1
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaCC(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
|
||||
colorindex = colorindex + 1
|
||||
If colorindex >= listacolores.Count Then
|
||||
colorindex = 0
|
||||
End If
|
||||
Next
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
|
||||
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
'SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
|
||||
|
||||
|
||||
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,743 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensual.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoMensual" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
/*#C_GvMensual2 > tbody > tr:nth-child(1) > th:nth-child(1), #C_GvMensual2 > tbody > tr:nth-child(2) > td:nth-child(1) {
|
||||
width: 500px !important;
|
||||
}*/
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Anexo del Catálogo - Mensual
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 100px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="display:none;">
|
||||
Periodo:
|
||||
</div>
|
||||
<div class="col-md-1" style="display:none;">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" 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" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Divisor:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlDivisor" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Trimestre Cuatrimestre:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTri" runat="server" CssClass="select2me" Width="100px" >
|
||||
<asp:ListItem Value="0">NO</asp:ListItem>
|
||||
<asp:ListItem Value="1">Trimestre</asp:ListItem>
|
||||
<asp:ListItem Value="2">Cuatrimestre</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpMensual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="background-color: #fff;">
|
||||
<asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
|
||||
DataKeyNames="Level,CveCuenta"
|
||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<%--<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>--%>
|
||||
<asp:HyperLink ID="hpl2" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" >
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<%--<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />--%>
|
||||
<asp:HyperLink ID="hpl2" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" >
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px" ControlStyle-Width="250px">
|
||||
<HeaderTemplate>
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionFebreroImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionFebreroPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionMarzoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionMarzoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<asp:BoundField HeaderText="T1" DataField="Tri1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionAbrilImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionAbrilPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<asp:BoundField HeaderText="C1" DataField="Cua1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionMayoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionMayoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionJunioImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionJunioPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<asp:BoundField HeaderText="T2" DataField="Tri2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionJulioImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionJulioPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionAgostoImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionAgostoPorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<asp:BoundField HeaderText="C2" DataField="Cua2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionSeptiembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionSeptiembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<asp:BoundField HeaderText="T3" DataField="Tri3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionOctubreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionOctubrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionNoviembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionNoviembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="$" DataField="VariacionDiciembreImporte" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField HeaderText="%" DataField="VariacionDiciembrePorcentaje" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
|
||||
<asp:BoundField HeaderText="T4" DataField="Tri1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="C4" DataField="Cua1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" CssClass="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
|
||||
|
||||
<select id="DdlGrafica" class="DdlGrafica select2me" >
|
||||
<option value="column">Barras</option>
|
||||
<option value="line">Lineas</option>
|
||||
<option value="pie">Pastel</option>
|
||||
</select>
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" ClientIDMode="Static" AppendDataBoundItems="true" Class="DdlGrafica select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="line"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="pie"></asp:ListItem>
|
||||
<asp:ListItem Text="Lineas" Value="column"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<%--<div id="chartdiv" runat="server">
|
||||
</div>--%>
|
||||
<div runat="server" id="chartdiv2"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#DdlGrafica').change(function () {
|
||||
recargaGrafica();
|
||||
});
|
||||
});
|
||||
|
||||
var hplControl = "";
|
||||
|
||||
function recargaGrafica() {
|
||||
$(`#${hplControl}`).click();
|
||||
}
|
||||
|
||||
|
||||
function graficahighchartsFinan(idcontainer, titulo, subtitulo, ytitulo, datos, xtitulo, labelpoint, media, datospie1, datospie2, idChkSeleccionado,ControlID) {
|
||||
|
||||
|
||||
let tipoGrafico = $(`#DdlGrafica`).val();
|
||||
let esPie = tipoGrafico == 'pie'?true:false;
|
||||
hplControl = ControlID;
|
||||
|
||||
if(idChkSeleccionado=='' & esPie ){
|
||||
$('#DdlGrafica').val('column');
|
||||
tipoGrafico = $(`#DdlGrafica`).val();
|
||||
esPie = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$('#LblTituloGrafica').text(titulo)
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".chartcheckboxes").remove();
|
||||
});
|
||||
|
||||
var Monedas = '';
|
||||
if (datospie1.length > 0) {
|
||||
Monedas = 'Monedas';
|
||||
}
|
||||
|
||||
let datosSeries = [];
|
||||
let datosCategorias = [];
|
||||
let datosRaw = [];
|
||||
|
||||
|
||||
if (idChkSeleccionado.trim().length > 0) {
|
||||
|
||||
let dataName = $(`#${idChkSeleccionado}`).data('name');
|
||||
let dataData = $(`#${idChkSeleccionado}`).data('data');
|
||||
datosRaw = dataData
|
||||
datosCategorias = $(`#${idChkSeleccionado}`).data('categorias');
|
||||
|
||||
|
||||
let serieDato = {
|
||||
name: dataName,
|
||||
data: dataData
|
||||
}
|
||||
datosSeries.push(serieDato);
|
||||
console.log("data-name:", dataName);
|
||||
console.log("data-data:", dataData);
|
||||
|
||||
|
||||
} else {
|
||||
$(document).ready(function () {
|
||||
$('.chksel').each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
|
||||
var dataName = $(this).data('name');
|
||||
var dataData = $(this).data('data');
|
||||
datosCategorias = $(this).data('categorias');
|
||||
|
||||
let serieDato = {
|
||||
name: dataName,
|
||||
data: dataData
|
||||
}
|
||||
datosSeries.push(serieDato);
|
||||
console.log("data-name:", dataName);
|
||||
console.log("data-data:", dataData);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
console.log("serieDato:", datosSeries);
|
||||
console.log("datosCategorias:", datosCategorias);
|
||||
|
||||
if(esPie){
|
||||
let datosPie = [];
|
||||
|
||||
for (let i = 0; i < datosCategorias.length; i++) {
|
||||
|
||||
let objpie = {
|
||||
name: datosCategorias[i],
|
||||
y:datosRaw[i]
|
||||
}
|
||||
datosPie.push(objpie);
|
||||
}
|
||||
|
||||
|
||||
datosSeries = [{
|
||||
name: 'Importe',
|
||||
colorByPoint : true,
|
||||
data : datosPie
|
||||
}]
|
||||
|
||||
|
||||
}
|
||||
|
||||
Highcharts.chart(idcontainer, {
|
||||
|
||||
chart: {
|
||||
type: tipoGrafico
|
||||
},
|
||||
|
||||
title: {
|
||||
text: titulo,
|
||||
align: 'left'
|
||||
},
|
||||
|
||||
subtitle: {
|
||||
text: subtitulo,
|
||||
align: 'left'
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
title: {
|
||||
text: ytitulo
|
||||
}
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
categories: datosCategorias,
|
||||
title: {
|
||||
text: xtitulo
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
layout: 'vertical',
|
||||
align: 'right',
|
||||
verticalAlign: 'middle'
|
||||
},
|
||||
|
||||
plotOptions: {
|
||||
series: {
|
||||
label: {
|
||||
connectorAllowed: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
series: datosSeries ,
|
||||
|
||||
responsive: {
|
||||
rules: [{
|
||||
condition: {
|
||||
maxWidth: 500
|
||||
},
|
||||
chartOptions: {
|
||||
legend: {
|
||||
layout: 'horizontal',
|
||||
align: 'center',
|
||||
verticalAlign: 'bottom'
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<%-- <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).closest('tr').text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica')
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros() {
|
||||
|
||||
let Divisor = 1;
|
||||
|
||||
$('.ceros').each(function (i, obj) {
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
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 (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
|
||||
var tmpNum = Importe;
|
||||
|
||||
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
|
||||
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
|
||||
});
|
||||
|
||||
return tmpNum;
|
||||
}
|
||||
|
||||
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>--%>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,409 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports DocumentFormat.OpenXml.EMMA
|
||||
Imports DocumentFormat.OpenXml.Office2010.ExcelAc
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listacolores As List(Of String)
|
||||
Get
|
||||
Return DirectCast(ViewState("listacolores"), List(Of String))
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
ViewState("listacolores") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property listaCampos As List(Of String())
|
||||
Get
|
||||
Return DirectCast(ViewState("listaCampos"), List(Of String()))
|
||||
End Get
|
||||
Set(value As List(Of String()))
|
||||
ViewState("listaCampos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
listacolores = New List(Of String)
|
||||
listaCampos = New List(Of String())
|
||||
listacolores.Add("#FF0F00")
|
||||
listacolores.Add("#FF6600")
|
||||
listacolores.Add("#F8FF01")
|
||||
listacolores.Add("#04D215")
|
||||
listacolores.Add("#2A0CD0")
|
||||
listacolores.Add("#8A0CCF")
|
||||
listacolores.Add("#CD0D74")
|
||||
listacolores.Add("#754DEB")
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo, TRCU 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
|
||||
TRCU = IfNull(Request("TRCU"), "-1").ToString.ToEntero
|
||||
|
||||
InicializaValores()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
|
||||
DdlSubproyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
DdlPeriodo.SelectedValueExist(Periodo)
|
||||
DdlTri.SelectedValueExist(TRCU)
|
||||
|
||||
If CveCuenta > 0 Then
|
||||
DdlCuentas.SelectedValueExist(CveCuenta)
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Conta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DdlCuentas.DataSource = Conta.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValueExist(NowADS().Year.ToString)
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
|
||||
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()
|
||||
|
||||
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
If Conta.GetAnexoCatalogoMensual(DdlCuentas.SelectedValue.ToEntero, 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
|
||||
End If
|
||||
|
||||
GvMensual2.DataBind()
|
||||
|
||||
If DdlTri.SelectedValue.ToEntero = 0 Then
|
||||
|
||||
GvMensual2.Columns(9).Visible = False
|
||||
GvMensual2.Columns(20).Visible = False
|
||||
GvMensual2.Columns(31).Visible = False
|
||||
GvMensual2.Columns(41).Visible = False
|
||||
|
||||
GvMensual2.Columns(13).Visible = False
|
||||
GvMensual2.Columns(27).Visible = False
|
||||
GvMensual2.Columns(42).Visible = False
|
||||
|
||||
ElseIf DdlTri.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
|
||||
GvMensual2.Columns(9).Visible = True
|
||||
GvMensual2.Columns(20).Visible = True
|
||||
GvMensual2.Columns(31).Visible = True
|
||||
GvMensual2.Columns(41).Visible = True
|
||||
|
||||
GvMensual2.Columns(13).Visible = False
|
||||
GvMensual2.Columns(27).Visible = False
|
||||
GvMensual2.Columns(42).Visible = False
|
||||
|
||||
ElseIf DdlTri.SelectedValue.ToEntero = 2 Then
|
||||
|
||||
GvMensual2.Columns(9).Visible = False
|
||||
GvMensual2.Columns(20).Visible = False
|
||||
GvMensual2.Columns(31).Visible = False
|
||||
GvMensual2.Columns(41).Visible = False
|
||||
|
||||
GvMensual2.Columns(13).Visible = True
|
||||
GvMensual2.Columns(27).Visible = True
|
||||
GvMensual2.Columns(42).Visible = True
|
||||
|
||||
End If
|
||||
UpMensual.Update()
|
||||
|
||||
If GvMensual2.Rows.Count > 0 Then
|
||||
|
||||
LnkExportar.Visible = True
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
setgrafica(e)
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Style.Add("font-weight", "bold")
|
||||
'End If
|
||||
setgrafica(e)
|
||||
|
||||
If e.Row.DataKey("Level") = "0" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
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()
|
||||
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
|
||||
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.OrangeRed
|
||||
End If
|
||||
|
||||
|
||||
If x = 2 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 3 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 6 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 10 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 14 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Mayo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Mayo.ToString("###,###,##0"), Mayo.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 17 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Junio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Junio.ToString("###,###,##0"), Junio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 21 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Julio < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Julio.ToString("###,###,##0"), Julio.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 24 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Agosto < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Agosto.ToString("###,###,##0"), Agosto.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 28 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Septiembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Septiembre.ToString("###,###,##0"), Septiembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 32 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Octubre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Octubre.ToString("###,###,##0"), Octubre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 35 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Noviembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Noviembre.ToString("###,###,##0"), Noviembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 38 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Diciembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Diciembre.ToString("###,###,##0"), Diciembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Next
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'Dim Lista2 As New List(Of String)
|
||||
'Lista2.Add($"['{"Enero"}',{e.Row.DBCampo("Enero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Febrero"}',{e.Row.DBCampo("Febrero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Marzo"}',{e.Row.DBCampo("Marzo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Abril"}',{e.Row.DBCampo("Abril").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Mayo"}',{e.Row.DBCampo("Mayo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Junio"}',{e.Row.DBCampo("Junio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Julio"}',{e.Row.DBCampo("Julio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Agosto"}',{e.Row.DBCampo("Agosto").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Septiembre"}',{e.Row.DBCampo("Septiembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Octubre"}',{e.Row.DBCampo("Octubre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Noviembre"}',{e.Row.DBCampo("Noviembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Diciembre"}',{e.Row.DBCampo("Diciembre").ToDecimal()}]")
|
||||
|
||||
Dim ListaDatos As New List(Of String)
|
||||
Dim ListaCategorias As New List(Of String)
|
||||
|
||||
ListaDatos.Add(e.Row.DBCampo("Enero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Febrero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Marzo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Abril").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Mayo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Junio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Julio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Agosto").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Septiembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Octubre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Noviembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Diciembre").ToDecimal.ToString("###########0.00"))
|
||||
|
||||
ListaCategorias.Add($"""Enero""")
|
||||
ListaCategorias.Add($"""Febrero""")
|
||||
ListaCategorias.Add($"""Marzo""")
|
||||
ListaCategorias.Add($"""Abril""")
|
||||
ListaCategorias.Add($"""Mayo""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Agosto""")
|
||||
ListaCategorias.Add($"""Septiembre""")
|
||||
ListaCategorias.Add($"""Octubre""")
|
||||
ListaCategorias.Add($"""Noviembre""")
|
||||
ListaCategorias.Add($"""Diciembre""")
|
||||
|
||||
Dim Titulo As String = e.Row.FCLabel("LblNombre").Text
|
||||
Dim SubTitulo As String = ""
|
||||
Dim YReferencia As String = "Valor"
|
||||
Dim Info As String = ""
|
||||
Dim XReferencia As String = "Periodos"
|
||||
Dim Promedio As String = ""
|
||||
|
||||
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
|
||||
'If e.Row.DataKey("Tipo").ToEntero <> 1 Then
|
||||
'Dim Info = String.Join(",", Lista2)
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
' String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, "", "", "$", Info, "", 0, "", "", e.Row.DBCampo("Nombre"), e.Row.FCHyperLink("Hypgrafica").ClientID))
|
||||
|
||||
|
||||
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, "", "", e.Row.FCCheckBox("chkgraf").ClientID, e.Row.FCHyperLink("hpl2").ClientID))
|
||||
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("class", "chksel")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-name", e.Row.FCLabel("LblNombre").Text)
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-data", $"[{String.Join(",", ListaDatos)}]")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-categorias", $"[{String.Join(",", ListaCategorias)}]")
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}' );", chartdiv2.ClientID, "Selección multiple", "", "Valores", "", "Periodos", "", "", "", "", e.Row.FCHyperLink("hpl2").ClientID))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Else
|
||||
' e.Row.FCHyperLink("hpl2").Visible = False
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("Cuenta : {0}|", DdlCuentas.SelectedItem.Text)
|
||||
SbFiltros.AppendFormat("Centro Costo : {0}|", If(DdlSubproyecto.SelectedValue.ToEntero > 0, DdlSubproyecto.SelectedItem.Text, "Todos"))
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
|
||||
GvMensual2.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, "Anexo del Catálogo - Mensual", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'Protected Sub DdlGrafica_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' RegistraScript("recargaGrafica();")
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -1,335 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMensualHorizontal.aspx.vb" Inherits="Contabilidad_RepAnexoCatalogoMensualHorizontal" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>--%>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>F. I.</li>
|
||||
<li style="margin-right: 30px">
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>F. F. </li>
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>
|
||||
Tipo Movto:
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte" visible="true">Tipo:
|
||||
</li>
|
||||
|
||||
<li runat="server" id="tdTipoReporte2" visible="true">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Tipo de Cuentas:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList Visible="false" CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
<%-- function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}--%>
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
//document.getElementById("TxtCuenta").disabled = false;
|
||||
document.getElementById("C_DdlCuentas").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
//document.getElementById("TxtCuenta").value = " ";
|
||||
//document.getElementById("TxtCuenta").disabled = true;
|
||||
$get("C_DdlCuentas").value = "-1";
|
||||
document.getElementById("C_DdlCuentas").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,313 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
'Private Property DTCuentas As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DTCuentas"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DTCuentas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Private Property CveSubProyecto As String
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
|
||||
FechaInicio = NowADS().FirstDayOfMonth
|
||||
FechaFin = NowADS()
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
' TipoReporte = 1
|
||||
' tdTipoReporte.Visible = True
|
||||
' tdTipoReporte2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
DdlCuentas.SelectedValueExist(IdCuenta)
|
||||
If DdlCuentas.SelectedValue.ToEntero <> -1 Then
|
||||
'RegistraScript("Enable();")
|
||||
DdlTipoCuentas.SelectedValueExist(-2)
|
||||
End If
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
If Request("ER") IsNot Nothing AndAlso Request("ER").ToString = "1" Then
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
Else
|
||||
FechaInicio = ("1900/01/01").ToDate
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
End If
|
||||
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
'DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "-1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedValue = "-2"
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If Request("TipoReporte") IsNot Nothing Then
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Else
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
End If
|
||||
'Dim CveSubProyecto As String
|
||||
If Request("CveSubProyecto") IsNot Nothing Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
Else
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString
|
||||
End If
|
||||
|
||||
'If ObjConta.GetAnexoCatalogoMensualHorizontal(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
|
||||
|
||||
' If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
' DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
' Else
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
' End If
|
||||
|
||||
' CargaGrid()
|
||||
'Else
|
||||
' DtDatos = Nothing
|
||||
' Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo.", TipoMensaje.MsgError)
|
||||
'End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
'e.Row.ControlStyle.Font.Size = 9
|
||||
'e.Row.ControlStyle.Height = 30
|
||||
Else
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("Tipo") <> "D" Then
|
||||
'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, " ")
|
||||
e.Row.FCLabel("LbSaldoInicial2").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
' If Not IsNothing(DtDatos) Then
|
||||
' ImprimirReporte()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
' If Not IsNothing(DtDatos) Then
|
||||
' ImprimirReporte("Excel")
|
||||
' 'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx")
|
||||
' 'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200)
|
||||
' End If
|
||||
'End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "AnexoCatalogo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("usuarioImprimio", UsuarioActual.Nombre))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 Then
|
||||
DdlCuentas.Enabled = True
|
||||
Else
|
||||
DdlCuentas.Enabled = False
|
||||
DdlCuentas.SelectedValueExist(-1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,323 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoSAT.aspx.vb" Inherits="FinanzasSAT_RepAnexoCatalogo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-VH {
|
||||
padding-top: 58px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<%--<div class="row">--%>
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>F. I.</li>
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 93px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>F. F. </li>
|
||||
<li style="margin-right: 30px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 94px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>Tipo de Cuentas:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" onchange="Enable();">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" runat="server" Width="150px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</li>
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</li>
|
||||
<li runat="server" id="tdTipoReporte" visible="true">Tipo:
|
||||
</li>
|
||||
<%--</label>--%>
|
||||
<%--<div class="col-md-9">--%>
|
||||
<li runat="server" id="tdTipoReporte2" visible="true">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<%--style="display:none;"--%>
|
||||
<%--<div class="row">--%>
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>
|
||||
|
||||
<%--<div class="" style="line-height:1;">--%>
|
||||
<%--<label class="col-md-1 text-right text-size-12">--%>
|
||||
Cuentas:
|
||||
<%--</label>--%>
|
||||
<%--</div>--%>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<%--<div class="col-md-2" style="width: 250px;">--%>
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--</div>--%>
|
||||
</li>
|
||||
<%--<label class="col-md-1">Cuenta:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<asp:HiddenField ID="HdnCveCuenta2" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta2" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
||||
</div>--%>
|
||||
</ul>
|
||||
<%--</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
||||
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigoSAT" runat="server" Text='<%# Eval("CodigoSAT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombreSAT" runat="server" Text='<%# Eval("NombreSAT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Iniciales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldos Actuales">
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="145" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function pageLoad(sender, args) {
|
||||
|
||||
$(function () {
|
||||
//Genero las cuentas en el arreglo
|
||||
var ArrCuentas = [<%= WSCuentas()%>];
|
||||
|
||||
$("#TxtCuenta").autocomplete({
|
||||
minLength: 0,
|
||||
source: ArrCuentas,
|
||||
focus: function (event, ui) {
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
|
||||
$("#TxtCuenta").val(ui.item.label);
|
||||
$("#HdnCveCuenta").val(ui.item.value);
|
||||
|
||||
//$("#project-description").html(ui.item.desc);
|
||||
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
//.autocomplete("instance")._renderItem = function (ul, item) {
|
||||
// return $("<li>")
|
||||
// .append("<a>" + item.label + "</a>")
|
||||
// .appendTo(ul);
|
||||
//};
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('input[type=text]').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
||||
$('select').on('keydown', function (e) {
|
||||
// Si la tecla ENTER es presionada...
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
||||
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
||||
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
||||
if (nextField.length > 0) { // Si se encontró un elemento:
|
||||
nextField.focus(); // Hacerle focus / seleccionarlo
|
||||
nextField.select();
|
||||
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function Enable() {
|
||||
var Producto = $get("DdlTipoCuentas").value;
|
||||
if (Producto == "-2") {
|
||||
document.getElementById("TxtCuenta").disabled = false;
|
||||
//document.getElementById("TxtCuenta").focus();
|
||||
//alert(Producto);
|
||||
}
|
||||
else {
|
||||
document.getElementById("TxtCuenta").value = " ";
|
||||
document.getElementById("TxtCuenta").disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function Scroll() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 360;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#<%=GvDatos.ClientID%>').ADScroll({
|
||||
height: Alto
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,299 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class FinanzasSAT_RepAnexoCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As String
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
DtDatos = Nothing
|
||||
CargaTipoCuentas()
|
||||
|
||||
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
|
||||
FechaFin = NowADS()
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
' TipoReporte = 1
|
||||
' tdTipoReporte.Visible = True
|
||||
' tdTipoReporte2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
End If
|
||||
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToEntero
|
||||
|
||||
DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaDel.Text = FechaInicio.ToShortDateString
|
||||
TxtFechaAl.Text = FechaFin.ToShortDateString
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas '.FiltraParametros("Afectable = 1")
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}{3}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""), If(dr("Afectable").ToString = "1", " *", ""))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
'Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
Dim strGlobal As String = ""
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
|
||||
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
|
||||
DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
|
||||
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlTipoCuentas.DataBind()
|
||||
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
|
||||
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "-1"))
|
||||
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
|
||||
DdlTipoCuentas.SelectedIndex = 0
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If Request("TipoReporte") IsNot Nothing Then
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Else
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
End If
|
||||
'Dim CveSubProyecto As String
|
||||
If Request("CveSubProyecto") IsNot Nothing Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString
|
||||
Else
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToString
|
||||
End If
|
||||
|
||||
If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, 1) Then
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0")
|
||||
Else
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
RegistraScript("Scroll();")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.DBCampo("CveCuenta").ToEntero = IdCuenta Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
' 'e.Row.ControlStyle.Font.Size = 9
|
||||
' 'e.Row.ControlStyle.Height = 30
|
||||
'Else
|
||||
' e.Row.ControlStyle.Font.Bold = False
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "4" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
'If e.Row.DBCampo("Tipo") <> "D" Then
|
||||
' 'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0}{1}", e.Row.DBCampo("SaldoInicial").FormatoNumero, " ")
|
||||
' e.Row.FCLabel("LbSaldoInicial2").Visible = True
|
||||
' e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
'End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
' e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveSubProyecto={3}&TP={4}", e.Row.DBCampo("CveCuenta"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveSubProyecto, TipoReporte)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
If Not IsNothing(DtDatos) Then
|
||||
ImprimirReporte("Excel")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepAnexoCatalogo.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "AnexoCatalogo"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("IdCuenta", IdCuenta.ToString))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,264 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoVertical.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoVertical" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Anexo de Catálogo - Vertical
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<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>Periodo:
|
||||
<asp:DropDownList ID="DdlPeriodo" Width="100px" runat="server" CssClass="form-control input-sm 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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<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">
|
||||
<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" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script>
|
||||
function LimpiaCeros(Divisor) {
|
||||
$('.ceros').each(function (i, obj) {
|
||||
debugger;
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
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 (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
debugger;
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
|
||||
var tmpNum = Importe;
|
||||
|
||||
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
|
||||
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
|
||||
});
|
||||
|
||||
return tmpNum;
|
||||
}
|
||||
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoVertical
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
Return ViewState("CveCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
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
|
||||
|
||||
InicializaValores()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
|
||||
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Conta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
Conta.Dispose()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValueExist(NowADS().Year.ToString)
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
|
||||
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, NowADS(), NowADS(), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, UsuarioActual.CveUsuario) Then
|
||||
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
|
||||
GvCC.DataSource = Conta.DSResultados.Tables(1)
|
||||
|
||||
Dim Index = 4
|
||||
For Index = 4 To GvCC.Columns.Count - 1
|
||||
GvCC.Columns(Index).Visible = False
|
||||
Next Index
|
||||
|
||||
Index = 4
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
GvCC.Columns(Index).Visible = True
|
||||
CType(GvCC.Columns(Index), BoundField).DataField = $"SubProyecto{Dr("SubProyecto").ToString}"
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString
|
||||
|
||||
|
||||
GvCC.Columns(Index + 1).Visible = True
|
||||
CType(GvCC.Columns(Index + 1), BoundField).DataField = $"SubProyecto{Dr("SubProyecto").ToString}Porcentaje"
|
||||
GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
|
||||
Index += 2
|
||||
Next
|
||||
|
||||
GvCC.DataBind()
|
||||
UpCC.Update()
|
||||
|
||||
Else
|
||||
GvCC.DataSource = Nothing
|
||||
End If
|
||||
|
||||
RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
End If
|
||||
|
||||
e.Row.Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,928 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneral.aspx.vb" Inherits="Contabilidad2_RepBalanceGeneral" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" Text="Consultar" runat="server" CssClass="btn btn-default" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 60px;">Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm" runat="server" Width="70px">
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="TdPeriodo" width="80px">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate" >Periodo:</label>
|
||||
<div class="col-md-7" >
|
||||
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm" runat="server">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<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="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" runat="server" id="TdSubTotales" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-2">SubTotales:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlSubtotales" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Sin Subtotales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Trimestral" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cuatrimestral" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<%--<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer runat="server" ID="Tabs" AutoPostBack="true" OnActiveTabChanged="TabContainer_ActiveTabChanged">--%>
|
||||
|
||||
<%--NORMAL--%>
|
||||
<%-- <ajax:TabPanel HeaderText="Balance General" ID="TabNormal" runat="server">
|
||||
<ContentTemplate>--%>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpActivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPasivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="HACIENDA PÚBLICA/PATRIMONIO" ID="LtlTituloHacienda" runat="server" />
|
||||
</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpPatrimonio" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPatrimonio" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO CONTRIBUIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvUtilidad" ShowHeader="false" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioGenerado" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO GENERADO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioActualizacion" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="EXCESO O INSUFICIENCIA DE ACTUALIZACION"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Hacienda Pública/Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td style="text-align: center; width: 50%;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalPasivoPatrimonio" Text="Total del Pasivo y Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- </ContentTemplate>
|
||||
</ajax:TabPanel>--%>
|
||||
|
||||
<%--MENSUAL
|
||||
<ajax:TabPanel HeaderText="Balance General Mensual" ID="TabMensual" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosMensual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosMensual" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Enero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLEnero" runat="server" Text='<%# Eval("Enero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Febrero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLFebrero" runat="server" Text='<%# Eval("Febrero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Marzo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMarzo" runat="server" Text='<%# Eval("Marzo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral1" runat="server" Text='<%# Eval("Trimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abril">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAbril" runat="server" Text='<%# Eval("Abril", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral1" runat="server" Text='<%# Eval("Cuatrimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Mayo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMayo" runat="server" Text='<%# Eval("Mayo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Junio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJunio" runat="server" Text='<%# Eval("Junio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral2" runat="server" Text='<%# Eval("Trimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Julio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJulio" runat="server" Text='<%# Eval("Julio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Agosto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAgosto" runat="server" Text='<%# Eval("Agosto", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral2" runat="server" Text='<%# Eval("Cuatrimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Septiembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSeptiembre" runat="server" Text='<%# Eval("Septiembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral3" runat="server" Text='<%# Eval("Trimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Octubre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLOctubre" runat="server" Text='<%# Eval("Octubre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Noviembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLNoviembre" runat="server" Text='<%# Eval("Noviembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Diciembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLDiciembre" runat="server" Text='<%# Eval("Diciembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 4to Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral4" runat="server" Text='<%# Eval("Trimestral4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral3" runat="server" Text='<%# Eval("Cuatrimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
--%>
|
||||
<%--ANUAL
|
||||
|
||||
<ajax:TabPanel HeaderText="Balance General Anual" ID="TabAnual" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAnual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosAnual" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano1" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno1" runat="server" Text='<%# Eval("Ano1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano2" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno2" runat="server" Text='<%# Eval("Ano2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano3" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno3" runat="server" Text='<%# Eval("Ano3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano4" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno4" runat="server" Text='<%# Eval("Ano4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano5" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno5" runat="server" Text='<%# Eval("Ano5", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano6" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno6" runat="server" Text='<%# Eval("Ano6", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano7" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno7" runat="server" Text='<%# Eval("Ano7", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano8" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno8" runat="server" Text='<%# Eval("Ano8", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano9" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno9" runat="server" Text='<%# Eval("Ano9", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano10" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno10" runat="server" Text='<%# Eval("Ano10", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano11" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno11" runat="server" Text='<%# Eval("Ano11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano12" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno12" runat="server" Text='<%# Eval("Ano12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano13" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno13" runat="server" Text='<%# Eval("Ano13", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano14" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno14" runat="server" Text='<%# Eval("Ano14", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano15" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno15" runat="server" Text='<%# Eval("Ano15", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano16" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno16" runat="server" Text='<%# Eval("Ano16", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano17" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno17" runat="server" Text='<%# Eval("Ano17", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano18" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno18" runat="server" Text='<%# Eval("Ano18", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano19" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno19" runat="server" Text='<%# Eval("Ano19", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano20" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno20" runat="server" Text='<%# Eval("Ano20", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
--%>
|
||||
|
||||
<%-- </ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<%-- <script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScrollMensual();
|
||||
gridviewScrollAnual();
|
||||
});
|
||||
|
||||
function gridviewScrollMensual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatosMensual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
|
||||
function gridviewScrollAnual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 210;
|
||||
|
||||
$('#<%=GvDatosAnual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>--%>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,982 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad2_RepBalanceGeneral
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
#Region " P R O P I E D A D E S - B A L A N C E - G E N E R A L"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES MENSUAL "
|
||||
Private Property DtDatosMensual As DataTable
|
||||
Get
|
||||
DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES - ANUAL "
|
||||
Private Property DtDatosAnual As DataTable
|
||||
Get
|
||||
DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosAnual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Anos As Integer
|
||||
Get
|
||||
Anos = ViewState("Anos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Anos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Dim CuentaResultados As Integer
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Response.Redirect($"/Contabilidad/RepBalanceGeneral.aspx")
|
||||
End If
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
tdTipoReporte.Visible = True
|
||||
TipoReporte = 1
|
||||
' End If
|
||||
|
||||
'SI NO USA AC
|
||||
If TipoReporte > 0 Then
|
||||
LtlTituloHacienda.Text = "CAPITAL"
|
||||
LtlTotalHacienda.Text = "Total Capital:"
|
||||
LtlTotalPasivoPatrimonio.Text = "Total del Pasivo y Capital:"
|
||||
|
||||
GvActivo.Columns(2).Visible = False
|
||||
GvActivoNoCirculante.Columns(2).Visible = False
|
||||
GvActivoDiferido.Columns(2).Visible = False
|
||||
GvPasivo.Columns(2).Visible = False
|
||||
GvPasivoNoCirculante.Columns(2).Visible = False
|
||||
GvPasivoDiferido.Columns(2).Visible = False
|
||||
GvPatrimonio.Columns(2).Visible = False
|
||||
GvUtilidad.Columns(2).Visible = False
|
||||
|
||||
GvPatrimonioGenerado.Visible = False
|
||||
GvPatrimonioActualizacion.Visible = False
|
||||
|
||||
TdTotalActivoAnterior.Visible = False
|
||||
TdTotalPasivoAnterior.Visible = False
|
||||
TdTotalPasivo.Visible = False
|
||||
TdTotalPatrimonio.Visible = False
|
||||
|
||||
Else
|
||||
GvUtilidad.Visible = False
|
||||
GvActivoDiferido.Visible = False
|
||||
GvPasivoDiferido.Visible = False
|
||||
End If
|
||||
|
||||
CargaDatosGenerales()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
'Anual
|
||||
Anos = 0
|
||||
|
||||
'Normal
|
||||
InicializaValores()
|
||||
|
||||
'TabContainer_ActiveTabChanged(Tabs, EventArgs.Empty)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosGenerales()
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
ClsConta.Dispose()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " REPORTE NORMAL "
|
||||
|
||||
Private Sub InicializaValores()
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Anio As String = If(DdlEjercicio.SelectedValue <> "", DdlEjercicio.SelectedValue, NowADS().Year.ToString)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
|
||||
If ObjConta.GetCuentas(-1, "00321", -1, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
CuentaResultados = DtDatos.Rows(0)("CveCuenta").ToString.ToEntero
|
||||
End If
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetSituacionFinanciera("01/01/1000".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
'ACTIVO
|
||||
Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND (Sup = 'ACTIVO CIRCULANTE' OR Nombre = 'ACTIVO CIRCULANTE' OR Sup = 'CIRCULANTE' OR Nombre ='CIRCULANTE')")
|
||||
Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND (Sup = 'ACTIVO NO CIRCULANTE' OR Nombre = 'ACTIVO NO CIRCULANTE' OR Sup = 'FIJO' OR Nombre ='FIJO')")
|
||||
Dim DtActivoDiferido = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND (Sup = 'DIFERIDO' OR Nombre = 'DIFERIDO')")
|
||||
Dim Row As DataRow = DtActivoCirculante.NewRow
|
||||
|
||||
If DtActivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtActivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
Row = DtActivoNoCirculante.NewRow
|
||||
If DtActivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtActivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtActivoDiferido.NewRow
|
||||
If DtActivoDiferido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = DtActivoDiferido.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoDiferido.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtActivoDiferido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoDiferido.Rows.Add(Row)
|
||||
|
||||
GvActivo.DataSource = DtActivoCirculante
|
||||
GvActivo.DataBind()
|
||||
GvActivoNoCirculante.DataSource = DtActivoNoCirculante
|
||||
GvActivoNoCirculante.DataBind()
|
||||
GvActivoDiferido.DataSource = DtActivoDiferido
|
||||
GvActivoDiferido.DataBind()
|
||||
UpActivo.Update()
|
||||
|
||||
|
||||
'PASIVO
|
||||
Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND (Sup = 'PASIVO CIRCULANTE' OR Sup = 'PASIVO' OR Sup = 'CIRCULANTE' OR Nombre = 'PASIVO CIRCULANTE' OR Sup = 'CORTO PLAZO' OR Nombre = 'CORTO PLAZO')")
|
||||
Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND (Sup = 'PASIVO NO CIRCULANTE' OR Nombre = 'PASIVO NO CIRCULANTE' OR Sup = 'LARGO PLAZO' OR Nombre = 'LARGO PLAZO')")
|
||||
Dim DtPasivoDiferido = DtDatos.FiltraParametros("Tipo in ('D') AND (Sup = 'DIFERIDO' OR Nombre = 'DIFERIDO')")
|
||||
|
||||
Row = DtPasivoCirculante.NewRow
|
||||
If DtPasivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPasivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtPasivoNoCirculante.NewRow
|
||||
If DtPasivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoNoCirculante.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoNoCirculante.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPasivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtPasivoDiferido.NewRow
|
||||
If DtPasivoDiferido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = DtPasivoDiferido.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoDiferido.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPasivoDiferido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoDiferido.Rows.Add(Row)
|
||||
|
||||
GvPasivo.DataSource = DtPasivoCirculante
|
||||
GvPasivo.DataBind()
|
||||
GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante
|
||||
GvPasivoNoCirculante.DataBind()
|
||||
GvPasivoDiferido.DataSource = DtPasivoDiferido
|
||||
GvPasivoDiferido.DataBind()
|
||||
UpPasivo.Update()
|
||||
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND (Sup = 'PATRIMONIO CONTRIBUIDO' OR Nombre = 'PATRIMONIO CONTRIBUIDO' OR Sup = 'CAPITAL CONTABLE' OR Sup = 'CAPITAL' OR Nombre = 'CAPITAL CONTABLE' OR Nombre = 'CAPITAL')")
|
||||
Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND (Codigo = '_UTILIDAD')")
|
||||
Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND (Sup = 'PATRIMONIO GENERADO' OR Nombre = 'PATRIMONIO GENERADO')")
|
||||
Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND (Sup = 'EXCESO O INSUFICIENCIA EN LA ACTUALIZACION D/PATRI' OR Nombre = 'EXCESO O INSUFICIENCIA EN LA ACTUALIZACION D/PATRI')")
|
||||
|
||||
Row = DtPatrimonioContribuido.NewRow
|
||||
If DtPatrimonioContribuido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = String.Format(" {0}", If(TipoReporte < 0, "TOTAL PATRIMONIO CONTRIBUIDO", "TOTAL CAPITAL"))
|
||||
Row.Item("ImporteActual") = DtPatrimonioContribuido.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioContribuido.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPatrimonioContribuido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = String.Format(" {0}", If(TipoReporte < 0, "TOTAL PATRIMONIO CONTRIBUIDO", "TOTAL CAPITAL"))
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioContribuido.Rows.Add(Row)
|
||||
|
||||
Row = DtPatrimonioGenerado.NewRow
|
||||
If DtPatrimonioGenerado.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)"
|
||||
If DtPatrimonioGenerado.FiltraParametros("CveCuenta = " & CuentaResultados).Rows.Count > 0 Then
|
||||
Row.Item("ImporteActual") = (DtPatrimonioGenerado.Rows(0)("ImporteActual").ToString.ToDouble + DtPatrimonioGenerado.FiltroPrimero("CveCuenta = " & CuentaResultados)("ImporteActual").ToString.ToDouble).ToString
|
||||
Row.Item("ImporteAnterior") = (DtPatrimonioGenerado.Rows(0)("ImporteAnterior").ToString.ToDouble + DtPatrimonioGenerado.FiltroPrimero("CveCuenta = " & CuentaResultados)("ImporteAnterior").ToString.ToDouble).ToString
|
||||
Else
|
||||
Row.Item("ImporteActual") = DtPatrimonioGenerado.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioGenerado.Rows(0)("ImporteAnterior").ToString
|
||||
End If
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPatrimonioGenerado.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioGenerado.Rows.Add(Row)
|
||||
|
||||
Row = DtPatrimonioActualizacion.NewRow
|
||||
If DtPatrimonioActualizacion.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
Row.Item("ImporteActual") = DtPatrimonioActualizacion.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioActualizacion.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtPatrimonioActualizacion.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioActualizacion.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPatrimonio.DataSource = DtPatrimonioContribuido
|
||||
GvPatrimonio.DataBind()
|
||||
GvUtilidad.DataSource = DtUtilidad
|
||||
GvUtilidad.DataBind()
|
||||
GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado
|
||||
GvPatrimonioGenerado.DataBind()
|
||||
GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion
|
||||
GvPatrimonioActualizacion.DataBind()
|
||||
UpPatrimonio.Update()
|
||||
End Sub
|
||||
Private Sub SumaTotales()
|
||||
TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual
|
||||
TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior
|
||||
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero
|
||||
LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero
|
||||
LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
|
||||
Dim Descuadre = False
|
||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||
If TotalActivoActual <> TotalPasivoPatrimonioActual Then
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If TotalActivoAnterior <> TotalPasivoPatrimonioAnterior Then
|
||||
LbTotalActivoAnterior.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoAnterior.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If Descuadre Then
|
||||
LbDescuadre.Text = "Las sumas de los totales están descuadradas."
|
||||
Else
|
||||
LbDescuadre.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
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("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Totales
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If e.Row.FCLabel("LbTitulo") IsNot Nothing Then e.Row.FCLabel("LbTitulo").Text = "CAPITAL CONTABLE"
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").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("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region " REPORTE MENSUAL "
|
||||
Private Sub CargaDatosMensual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetBalanceGeneralMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, DdlSubtotales.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
Alert("Ocurrió un error al cargar los datos del balance general mensual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
If DtDatosMensual IsNot Nothing Then
|
||||
CargaGridMensual()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
'GvDatosMensual.Columns(4).Visible = False
|
||||
'GvDatosMensual.Columns(9).Visible = False
|
||||
'GvDatosMensual.Columns(14).Visible = False
|
||||
'GvDatosMensual.Columns(18).Visible = False
|
||||
|
||||
''Esconde Cuatrimestral
|
||||
'GvDatosMensual.Columns(6).Visible = False
|
||||
'GvDatosMensual.Columns(12).Visible = False
|
||||
'GvDatosMensual.Columns(19).Visible = False
|
||||
|
||||
'If DdlSubtotales.SelectedValue = "2" Then
|
||||
' GvDatosMensual.Columns(4).Visible = True
|
||||
' GvDatosMensual.Columns(9).Visible = True
|
||||
' GvDatosMensual.Columns(14).Visible = True
|
||||
' GvDatosMensual.Columns(18).Visible = True
|
||||
'ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
' GvDatosMensual.Columns(6).Visible = True
|
||||
' GvDatosMensual.Columns(12).Visible = True
|
||||
' GvDatosMensual.Columns(19).Visible = True
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGridMensual()
|
||||
'GvDatosMensual.DataSource = DtDatosMensual
|
||||
'GvDatosMensual.DataBind()
|
||||
'UpDatosMensual.Update()
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
' e.Row.FCHyperLink("HLEnero").Text = ""
|
||||
' e.Row.FCHyperLink("HLFebrero").Text = ""
|
||||
' e.Row.FCHyperLink("HLMarzo").Text = ""
|
||||
' e.Row.FCHyperLink("HLAbril").Text = ""
|
||||
' e.Row.FCHyperLink("HLMayo").Text = ""
|
||||
' e.Row.FCHyperLink("HLJunio").Text = ""
|
||||
' e.Row.FCHyperLink("HLJulio").Text = ""
|
||||
' e.Row.FCHyperLink("HLAgosto").Text = ""
|
||||
' e.Row.FCHyperLink("HLSeptiembre").Text = ""
|
||||
' e.Row.FCHyperLink("HLOctubre").Text = ""
|
||||
' e.Row.FCHyperLink("HLNoviembre").Text = ""
|
||||
' e.Row.FCHyperLink("HLDiciembre").Text = ""
|
||||
' End If
|
||||
|
||||
' 'AGRUPADOR DE CUENTAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
' End If
|
||||
|
||||
' 'TITULO DE CUENTAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
' End If
|
||||
|
||||
' 'CUENTAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
|
||||
' e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
' e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
' e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
' End If
|
||||
|
||||
' 'TOTALES
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
' e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
' e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
' End If
|
||||
|
||||
' 'SUMAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 6 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region " REPORTE ANUAL "
|
||||
Private Sub CargaDatosAnual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetBalanceGeneralAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, UsuarioActual.CveEmpresa, CveSubProyecto) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general anual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
'Esconde todo
|
||||
'For index = 1 To 20
|
||||
' GvDatosAnual.Columns(index).Visible = False
|
||||
'Next
|
||||
|
||||
'For index = 1 To Anos
|
||||
' GvDatosAnual.Columns(index).Visible = True
|
||||
' GvDatosAnual.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString
|
||||
'Next
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
'CargaGridAnual()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaGridAnual()
|
||||
' GvDatosAnual.DataSource = DtDatos
|
||||
' GvDatosAnual.DataBind()
|
||||
' UpDatosAnual.Update()
|
||||
'End Sub
|
||||
|
||||
'Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
' For index = 1 To Anos
|
||||
' e.Row.FCHyperLink("HLAno" + index.ToString).Text = ""
|
||||
' Next
|
||||
' End If
|
||||
|
||||
' 'AGRUPADOR DE CUENTAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
' End If
|
||||
|
||||
' 'TITULO DE CUENTAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
' e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
' End If
|
||||
|
||||
' 'CUENTAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
|
||||
' For index = 1 To Anos
|
||||
' e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
' Next
|
||||
|
||||
' End If
|
||||
|
||||
' 'TOTALES
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
' e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
' e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
' End If
|
||||
|
||||
' 'SUMAS
|
||||
' If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 6 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
'If Tabs.ActiveTabIndex = 0 Then
|
||||
|
||||
' TotalActivoActual = 0
|
||||
' TotalActivoAnterior = 0
|
||||
' TotalPasivoActual = 0
|
||||
' TotalPasivoAnterior = 0
|
||||
' TotalPatrimonioActual = 0
|
||||
' TotalPatrimonioAnterior = 0
|
||||
' TotalPasivoPatrimonioActual = 0
|
||||
' TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
' CargaDatos()
|
||||
|
||||
'ElseIf Tabs.ActiveTabIndex = 1 Then
|
||||
|
||||
' CargaDatosMensual()
|
||||
|
||||
'ElseIf Tabs.ActiveTabIndex = 2 Then
|
||||
|
||||
CargaDatosAnual()
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
'Esconde Todo de lo variable de Filtros
|
||||
TdSubTotales.Visible = False
|
||||
TdPeriodo.Visible = False
|
||||
|
||||
'If Tabs.ActiveTabIndex = 0 Then
|
||||
' TdPeriodo.Visible = True
|
||||
'ElseIf Tabs.ActiveTabIndex = 1 Then
|
||||
' TdSubTotales.Visible = True
|
||||
'ElseIf Tabs.ActiveTabIndex = 2 Then
|
||||
|
||||
'End If
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
BtnConsultar_Click(BtnConsultar, EventArgs.Empty)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'If ChkFirma.Checked = True Then
|
||||
|
||||
' Dim Row As DataRow = DtDatos.NewRow
|
||||
' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "")
|
||||
' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "")
|
||||
' Row.Item("ImporteActual") = "0"
|
||||
' Row.Item("ImporteAnterior") = "0"
|
||||
' Row.Item("Tipo") = "Firma"
|
||||
' DtDatos.Rows.Add(Row)
|
||||
'End If
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetSituacionFinanciera("01/01/1000".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
For Each row As DataRow In DtDatos.Rows
|
||||
If row("Level").ToString = "0" Then
|
||||
row("Sup") = ""
|
||||
Else
|
||||
If row("Tipo").ToString = "A" OrElse row("Tipo").ToString = "B" OrElse row("Tipo").ToString = "C" Then
|
||||
If row("Sup").ToString = "ACTIVO CIRCULANTE" OrElse row("Nombre").ToString = "ACTIVO CIRCULANTE" OrElse row("Sup").ToString = "CIRCULANTE" OrElse row("Nombre").ToString = "CIRCULANTE" Then
|
||||
row("Sup") = "ACTIVO CIRCULANTE"
|
||||
Else
|
||||
If row("Sup").ToString = "ACTIVO NO CIRCULANTE" OrElse row("Nombre").ToString = "ACTIVO NO CIRCULANTE" OrElse row("Sup").ToString = "FIJO" OrElse row("Nombre").ToString = "FIJO" Then
|
||||
row("Sup") = "ACTIVO NO CIRCULANTE"
|
||||
Else
|
||||
If row("Sup").ToString = "DIFERIDO" OrElse row("Nombre").ToString = "DIFERIDO" Then
|
||||
row("Sup") = "DIFERIDO"
|
||||
Else
|
||||
row("Sup") = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If row("Tipo").ToString = "D" Then
|
||||
If row("Sup").ToString = "PASIVO CIRCULANTE" OrElse row("Nombre").ToString = "PASIVO CIRCULANTE" OrElse row("Sup").ToString = "CIRCULANTE" OrElse row("Nombre").ToString = "CIRCULANTE" OrElse row("Sup").ToString = "PASIVO" OrElse row("Nombre").ToString = "PASIVO" OrElse row("Sup").ToString = "CORTO PLAZO" OrElse row("Nombre").ToString = "CORTO PLAZO" Then
|
||||
row("Sup") = "PASIVO CIRCULANTE"
|
||||
Else
|
||||
If row("Sup").ToString = "PASIVO NO CIRCULANTE" OrElse row("Nombre").ToString = "PASIVO NO CIRCULANTE" OrElse row("Sup").ToString = "LARGO PLAZO" OrElse row("Nombre").ToString = "LARGO PLAZO" Then
|
||||
row("Sup") = "PASIVO NO CIRCULANTE"
|
||||
Else
|
||||
If row("Sup").ToString = "DIFERIDO" OrElse row("Nombre").ToString = "DIFERIDO" Then
|
||||
row("Sup") = "DIFERIDO"
|
||||
Else
|
||||
row("Sup") = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If row("Tipo").ToString = "F" Then '
|
||||
If row("Sup").ToString = "CAPITAL" OrElse row("Nombre").ToString = "CAPITAL" OrElse row("Sup").ToString = "CAPITAL CONTABLEE" OrElse row("Nombre").ToString = "CAPITAL CONTABLE" OrElse row("Sup").ToString = "PATRIMONIO CONTRIBUIDO" OrElse row("Nombre").ToString = "PATRIMONIO CONTRIBUIDO" Then
|
||||
row("Sup") = "CAPITAL"
|
||||
Else
|
||||
row("Sup") = ""
|
||||
End If
|
||||
Else
|
||||
row("Sup") = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
ImprimirReporte()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "BalanceGeneral"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepBalanceGeneral.rdlc"
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,710 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneralVertical.aspx.vb" Inherits="Contabilidad_RepBalanceGeneralVertical" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
table > tbody > tr.ADSRow > td,table > tbody > tr > td.adsCol{
|
||||
padding:0px!important;
|
||||
}
|
||||
.AdsCEll,.AdsRHeader,.AdsCHeader,.AdsBody{
|
||||
display:inline; float: left;
|
||||
}
|
||||
.ADSContainer > div{
|
||||
display:table;overflow:hidden;
|
||||
}
|
||||
.AdsRHeader > .ADSCroll{
|
||||
overflow:hidden;
|
||||
}
|
||||
.AdsCHeader > .ADSCroll{
|
||||
overflow:hidden;
|
||||
}
|
||||
.AdsBody .ADSCroll{
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.AdsCHeader > .ADSCroll::-webkit-scrollbar,.AdsRHeader > .ADSCroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.AdsBody .ADSCroll::-webkit-scrollbar-track
|
||||
{
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.AdsBody .ADSCroll::-webkit-scrollbar
|
||||
{
|
||||
width: 10px;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.AdsBody .ADSCroll::-webkit-scrollbar-thumb
|
||||
{
|
||||
background-color: #AAA;
|
||||
border-radius: 10px;
|
||||
background-image: -webkit-linear-gradient(90deg, rgba(0, 0, 0, .2) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .2) 25%,
|
||||
rgba(0, 0, 0, .2) 25%, transparent 25%, transparent)
|
||||
}
|
||||
|
||||
|
||||
.txtid2em > td:nth-child(1) > span
|
||||
{
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
|
||||
.txtid4em > td:nth-child(1) > span
|
||||
{
|
||||
padding-left: 4em;
|
||||
max-height: 19px;
|
||||
}
|
||||
|
||||
.GvMensual1 > tbody > tr > td {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.truncate {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.noMargin {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.chart, .chartanio {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.grafica {
|
||||
font-size: 4em;
|
||||
cursor: pointer;
|
||||
color: #AAA;
|
||||
margin: 0px 20px;
|
||||
}
|
||||
|
||||
.gselected {
|
||||
color: #009688;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Balance General Vertical
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaDatos">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate" style="min-height: 65px;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaDatos" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Ejercicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ></asp:DropDownList>
|
||||
</li>
|
||||
<li>Periodo:
|
||||
<asp:DropDownList ID="DdlPeriodo" Width="100px" runat="server" CssClass="form-control input-sm 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="130px" 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>
|
||||
</li>
|
||||
<li>Cuentas:
|
||||
<asp:DropDownList ID="DdlTipo" Width="100px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con saldo" Value="1" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" OnActiveTabChanged="Tab_ActiveTabChanged" AutoPostBack="true">
|
||||
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Vertical">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpNormal" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvVertical" 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 HeaderText="Importe" DataField="ImporteActual" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Porcentaje" DataField="ImporteActualPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabPanel3" runat="server" HeaderText="Mensual">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpMensual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMensual2" runat="server" data-widthmenos="280" data-heightmenos="290" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" data-cols="1" GridLines="none" CssClass="table table-hover ScrollAD">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<span class="truncate">
|
||||
<asp:Label ID="lblchart" Visible="false" CssClass="chart" runat="server"><i class="fa fa-bar-chart fa-2" aria-hidden="true"></i></asp:Label>
|
||||
<%# Eval("Nombre")%>
|
||||
</span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Enero" DataField="Enero" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="EneroPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Febrero" DataField="Febrero" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="FebreroPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Marzo" DataField="Marzo" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="MarzoPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Abril" DataField="Abril" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="AbrilPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Mayo" DataField="Mayo" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="MayoPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Junio" DataField="Junio" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="JunioPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Julio" DataField="Julio" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="JulioPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Agosto" DataField="Agosto" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="AgostoPorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="SeptiembrePorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Octubre" DataField="Octubre" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="OctubrePorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="NoviembrePorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="%" DataField="DiciembrePorcentaje" ItemStyle-CssClass="ceros" DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabPanel2" runat="server" HeaderText="Anual">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAnual" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px">
|
||||
<ItemTemplate>
|
||||
<span class="truncate ">
|
||||
<asp:Label ID="lblchart" Visible="false" CssClass="chartanio" runat="server"> <i class="fa fa-bar-chart fa-2" aria-hidden="true"></i></asp:Label>
|
||||
<asp:HyperLink runat="server" ID="HLNombre" Target="_blank" ItemStyle-HorizontalAlign="Left"> <%# Eval("Nombre") %></asp:HyperLink>
|
||||
</span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="Mgraficas" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog " style="width: 1100px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UPModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="ltltitulo" runat="server"> Grafica</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:HiddenField ID="HdfValuesPorcentaje" ClientIDMode="Static" runat="server" />
|
||||
<asp:HiddenField ID="HdfValues" ClientIDMode="Static" runat="server" />
|
||||
<asp:HiddenField ID="HdfTitulosA" ClientIDMode="Static" Value="" runat="server" />
|
||||
<asp:HiddenField ID="HdfTitulos" ClientIDMode="Static" Value="Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre" runat="server" />
|
||||
<div style="text-align: center; padding: 20px 0px 40px;">
|
||||
<div style="display: inline-block;">
|
||||
<i class="fa fa-bar-chart fa-3 grafica gc" onclick="GColumna();"></i>
|
||||
<i class="fa fa-line-chart fa-3 grafica gl" onclick="GCLineas();"></i>
|
||||
<i class="fa fa-pie-chart fa-3 grafica gp" onclick="GPastel();"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container" style="width: 1100px; height: 400px; margin: 0 auto"></div>
|
||||
</div>
|
||||
|
||||
<%--<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarSucursal" runat="server" CssClass="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarSucursal" />
|
||||
|
||||
<button id="BtnCancelarSucursal" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script>
|
||||
function LimpiaCeros(Divisor) {
|
||||
$('.ceros').each(function (i, obj) {
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
if ($(this).html() == ' ') {
|
||||
debugger;
|
||||
}
|
||||
}
|
||||
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
|
||||
}
|
||||
|
||||
if (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
|
||||
var tmpNum = Importe;
|
||||
|
||||
|
||||
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
|
||||
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
|
||||
});
|
||||
|
||||
return tmpNum;
|
||||
}
|
||||
|
||||
function EscondeRenglones(IdGV) {
|
||||
$("#" + IdGV + " tbody .txtid4em").each(function (index) {
|
||||
var Bandera = 0;
|
||||
$(this).children("td").each(function (index2) {
|
||||
if (index2 > 0) {
|
||||
if ($(this).text() != '-') {
|
||||
Bandera = 1;
|
||||
}
|
||||
Suma = ToDouble($(this).text())
|
||||
}
|
||||
})
|
||||
if (Bandera == 0) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
|
||||
function resizeMensual() {
|
||||
var width = $('.truncatenames div').width() - 5;
|
||||
$('.truncatenames .truncate').css("width", width);
|
||||
|
||||
}
|
||||
function resizeAnual() {
|
||||
|
||||
}
|
||||
function resizetables() {
|
||||
resizeMensual();
|
||||
resizeAnual();
|
||||
}
|
||||
jQuery(document).ready(function () {
|
||||
$(window).resize(function () {
|
||||
resizetables();
|
||||
});
|
||||
|
||||
resizetables();
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_initializeRequest(function (s, e) {
|
||||
});
|
||||
prm.add_endRequest(function (s, e) {
|
||||
|
||||
});
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
resizetables();
|
||||
});
|
||||
});
|
||||
|
||||
var tipo = 'mes';
|
||||
$('body').on('click', 'table .chart', function (e) {
|
||||
var thisobj = $(this);
|
||||
tipo = 'mes';
|
||||
$('#HdfValuesPorcentaje').val(thisobj.data('porcentaje'));
|
||||
$('#HdfValues').val(thisobj.data('value'))
|
||||
//$('#HdfTitulos').val()
|
||||
$('#Mgraficas').modal();
|
||||
GColumna();
|
||||
});
|
||||
$('body').on('click', 'table .chartanio', function (e) {
|
||||
var thisobj = $(this);
|
||||
tipo = 'anio';
|
||||
$('#HdfValuesPorcentaje').val(thisobj.data('porcentaje'));
|
||||
$('#HdfValues').val(thisobj.data('value'))
|
||||
//$('#HdfTitulos').val()
|
||||
$('#Mgraficas').modal();
|
||||
GColumna();
|
||||
});
|
||||
function GColumna() {
|
||||
$('.gselected').removeClass('gselected');
|
||||
$('.gc').addClass('gselected');
|
||||
var datos = $('#HdfValues').val().split(',');
|
||||
var titulos = [];
|
||||
if (tipo == 'mes') {
|
||||
titulos = $('#HdfTitulos').val().split(',');
|
||||
} else {
|
||||
titulos = $('#HdfTitulosA').val().split(',');
|
||||
}
|
||||
graficarColumna(datos, titulos)
|
||||
}
|
||||
function GCLineas() {
|
||||
$('.gselected').removeClass('gselected');
|
||||
$('.gl').addClass('gselected');
|
||||
var datos = $('#HdfValues').val().split(',');
|
||||
var titulos = [];
|
||||
if (tipo == 'mes') {
|
||||
titulos = $('#HdfTitulos').val().split(',');
|
||||
} else {
|
||||
titulos = $('#HdfTitulosA').val().split(',');
|
||||
}
|
||||
graficarLinea(datos, titulos)
|
||||
}
|
||||
function GPastel() {
|
||||
$('.gselected').removeClass('gselected');
|
||||
$('.gp').addClass('gselected');
|
||||
var datos = $('#HdfValues').val().split(',');
|
||||
var titulos = [];
|
||||
if (tipo == 'mes') {
|
||||
titulos = $('#HdfTitulos').val().split(',');
|
||||
} else {
|
||||
titulos = $('#HdfTitulosA').val().split(',');
|
||||
}
|
||||
graficarPie(datos, titulos)
|
||||
}
|
||||
function graficarColumnaS(datos, Titulos) {
|
||||
var seriedata = [];
|
||||
for (var i = 0; i < datos.length; i++) {
|
||||
// Iterate over numeric indexes from 0 to 5, as everyone expects.
|
||||
datos[i] = Number(datos[i]);
|
||||
var obj = [];
|
||||
obj.name = Titulos[i];
|
||||
obj.data = [Number(datos[i]), ];
|
||||
seriedata.push(obj);
|
||||
}
|
||||
$('#container').highcharts({
|
||||
chart: {
|
||||
type: 'column'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
subtitle: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
categories: Titulos
|
||||
},
|
||||
yAxis: {
|
||||
min: 0,
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
|
||||
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
|
||||
'<td style="padding:0"><b>{point.y:.1f} </b></td></tr>',
|
||||
footerFormat: '</table>',
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
plotOptions: {
|
||||
column: {
|
||||
pointPadding: 0.2,
|
||||
borderWidth: 0
|
||||
}
|
||||
},
|
||||
series:
|
||||
[{
|
||||
type: 'column',
|
||||
colorByPoint: true,
|
||||
data: datos,
|
||||
showInLegend: false
|
||||
}]
|
||||
});
|
||||
}
|
||||
function graficarColumna(datos, Titulos) {
|
||||
var seriedata = [];
|
||||
for (var i = 0; i < datos.length; i++) {
|
||||
// Iterate over numeric indexes from 0 to 5, as everyone expects.
|
||||
var obj = [];
|
||||
obj.name = Titulos[i];
|
||||
obj.data = [Number(datos[i]), ];
|
||||
seriedata.push(obj);
|
||||
}
|
||||
$('#container').highcharts({
|
||||
chart: {
|
||||
type: 'column'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
subtitle: {
|
||||
text: ''
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
min: 0,
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
|
||||
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
|
||||
'<td style="padding:0"><b>{point.y:.1f} </b></td></tr>',
|
||||
footerFormat: '</table>',
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
plotOptions: {
|
||||
column: {
|
||||
pointPadding: 0.2,
|
||||
borderWidth: 0
|
||||
}
|
||||
},
|
||||
series: seriedata
|
||||
});
|
||||
}
|
||||
|
||||
function graficarLinea(datos, Titulos) {
|
||||
var seriedata = [];
|
||||
for (var i = 0; i < datos.length; i++) {
|
||||
// Iterate over numeric indexes from 0 to 5, as everyone expects.
|
||||
datos[i] = Number(datos[i]);
|
||||
var obj = [];
|
||||
obj.name = Titulos[i];
|
||||
obj.data = [Number(datos[i])];
|
||||
seriedata.push(obj);
|
||||
}
|
||||
$('#container').highcharts({
|
||||
chart: {
|
||||
type: 'line'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
subtitle: {
|
||||
text: ''
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
categories: Titulos,
|
||||
crosshair: true
|
||||
},
|
||||
yAxis: {
|
||||
min: 0,
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
|
||||
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
|
||||
'<td style="padding:0"><b>{point.y:.1f} </b></td></tr>',
|
||||
footerFormat: '</table>',
|
||||
shared: true,
|
||||
useHTML: true
|
||||
},
|
||||
plotOptions: {
|
||||
column: {
|
||||
pointPadding: 0.2,
|
||||
borderWidth: 0
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: " - ",
|
||||
data: datos
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function graficarPie(datos, Titulos, selected) {
|
||||
var seriedata = [];
|
||||
for (var i = 0; i < datos.length; i++) {
|
||||
// Iterate over numeric indexes from 0 to 5, as everyone expects.
|
||||
var obj = {};
|
||||
obj.name = Titulos[i];
|
||||
obj.y = Number(datos[i]);
|
||||
if (i == selected) {
|
||||
|
||||
obj.sliced = true;
|
||||
obj.selected = true;
|
||||
}
|
||||
seriedata.push(obj);
|
||||
}
|
||||
$('#container').highcharts({
|
||||
chart: {
|
||||
plotBackgroundColor: null,
|
||||
plotBorderWidth: null,
|
||||
plotShadow: false,
|
||||
type: 'pie'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
subtitle: {
|
||||
text: ''
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
min: 0,
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
|
||||
},
|
||||
plotOptions: {
|
||||
pie: {
|
||||
allowPointSelect: true,
|
||||
cursor: 'pointer',
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
|
||||
style: {
|
||||
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
|
||||
},
|
||||
connectorColor: 'silver'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{ name: 'Pastel', data: seriedata }]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,356 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad_RepBalanceGeneralVertical
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property EjercicioMin As Integer
|
||||
Get
|
||||
Return ViewState("EjercicioMin").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("EjercicioMin") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
DdlEjercicio.SelectedValueExist(NowADS().Year.ToString)
|
||||
InicializaValores()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim Conta As New ClsContabilidad
|
||||
If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Conta.DtResultados
|
||||
EjercicioMin = Conta.DtResultados.MIN("Ejercicio").ToEntero
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
Conta.Dispose()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValueExist(NowADS().Year.ToString)
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnCargaAsignados_Click(sender As Object, e As EventArgs) Handles BtnCargaDatos.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
If Tab.ActiveTabIndex = 2 Then
|
||||
' DdlEjercicio.SelectedValueExist(EjercicioMin.ToString)
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim IdGV = ""
|
||||
|
||||
If Tab.ActiveTabIndex = 0 Then
|
||||
IdGV = GvVertical.ClientID
|
||||
|
||||
If Conta.GetBalanceGeneralVertical(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvVertical.DataSource = Conta.DtResultados
|
||||
Else
|
||||
GvVertical.DataSource = Nothing
|
||||
End If
|
||||
GvVertical.DataBind()
|
||||
UpNormal.Update()
|
||||
ElseIf Tab.ActiveTabIndex = 1 Then
|
||||
IdGV = GvMensual2.ClientID
|
||||
|
||||
If Conta.GetBalanceGeneralMensualVertical(DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvMensual2.DataSource = Conta.DtResultados
|
||||
Else
|
||||
GvMensual2.DataSource = Nothing
|
||||
End If
|
||||
HdfTitulos.Value = "Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre"
|
||||
GvMensual2.DataBind()
|
||||
UpMensual.Update()
|
||||
ElseIf Tab.ActiveTabIndex = 2 Then
|
||||
IdGV = GvAnual.ClientID
|
||||
|
||||
If Conta.GetBalanceGeneralAnualVertical(DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
|
||||
GvAnual.DataSource = Conta.DSResultados.Tables(1)
|
||||
|
||||
Dim Index = 1
|
||||
For Index = 1 To GvAnual.Columns.Count - 1
|
||||
GvAnual.Columns(Index).Visible = False
|
||||
Next Index
|
||||
|
||||
Index = 1
|
||||
|
||||
Dim titulos As New StringBuilder
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
GvAnual.Columns(Index).Visible = True
|
||||
CType(GvAnual.Columns(Index), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}"
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
titulos.Append($"{IIf(Index = 1, "", ",")}{Dr("Ejercicio").ToString}")
|
||||
GvAnual.Columns(Index + 1).Visible = True
|
||||
CType(GvAnual.Columns(Index + 1), BoundField).DataField = $"Ejercicio{Dr("Ejercicio").ToString}Porcentaje"
|
||||
GvAnual.Columns(Index + 1).HeaderText = "%"
|
||||
Index += 2
|
||||
Next
|
||||
HdfTitulos.Value = titulos.ToString
|
||||
HdfTitulosA.Value = titulos.ToString
|
||||
GvAnual.DataBind()
|
||||
Index = 1
|
||||
Dim IndexRow As Integer = 0
|
||||
For Each row As DataRow In Conta.DSResultados.Tables(1).Rows
|
||||
Dim valores As New StringBuilder
|
||||
Dim Porcentajes As New StringBuilder
|
||||
Dim prefix As String = ""
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
valores.Append($"{prefix}{row($"Ejercicio{Dr("Ejercicio").ToString}")}")
|
||||
Porcentajes.Append($"{prefix}{row($"Ejercicio{Dr("Ejercicio").ToString}Porcentaje")}")
|
||||
Index += 2
|
||||
prefix = ","
|
||||
Next
|
||||
Dim lbl As Label = GvAnual.Rows(IndexRow).FCLabel("lblchart")
|
||||
lbl.Attributes.Add("data-value", valores.ToString)
|
||||
lbl.Attributes.Add("data-porcentaje", Porcentajes.ToString)
|
||||
IndexRow += 1
|
||||
Next
|
||||
UpAnual.Update()
|
||||
|
||||
Else
|
||||
GvAnual.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Script = ""
|
||||
If DdlTipo.SelectedValue.ToEntero > 0 Then
|
||||
Script = $"LimpiaCeros({DdlDivisor.SelectedValue});EscondeRenglones('{IdGV}');"
|
||||
Else
|
||||
Script = $"LimpiaCeros({DdlDivisor.SelectedValue});"
|
||||
End If
|
||||
RegistraScript(Script)
|
||||
|
||||
UPModal.Update()
|
||||
UpFiltros.Update()
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvVertical_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvVertical.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'GENERAL
|
||||
If e.Row.DBCampo("Clasificacion").ToString = "A" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("text-indent", "2em")
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
e.Row.Style.Add("text-indent", "4em")
|
||||
e.Row.CssClass = "txtid4em"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
e.Row.Style.Add("text-indent", "2em")
|
||||
e.Row.Cells(2).Text = "100%"
|
||||
End If
|
||||
|
||||
'SUMA
|
||||
If e.Row.DBCampo("Clasificacion").ToString = "Z" Then
|
||||
e.Row.Style.Add("background-color", "#DDD")
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
e.Row.Cells(2).Text = "100%"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim lbl As Control = e.Row.FindControl("lblchart")
|
||||
|
||||
Dim cssclass As String = ""
|
||||
e.Row.Attributes.Add("style", "height:28px;")
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
If Not IsNothing(lbl) Then
|
||||
cssclass = "txtid2em"
|
||||
End If
|
||||
For Index = 2 To GvMensual2.Columns.Count - 1 Step 2
|
||||
e.Row.Cells(Index).Text = "100%"
|
||||
Next Index
|
||||
End If
|
||||
|
||||
'SUMNA
|
||||
If e.Row.DBCampo("Clasificacion").ToString = "Z" Then
|
||||
e.Row.Style.Add("background-color", "#DDD")
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
For Index = 2 To GvMensual2.Columns.Count - 1 Step 2
|
||||
e.Row.Cells(Index).Text = "100%"
|
||||
Next Index
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If Not IsNothing(lbl) Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
cssclass = "txtid4em"
|
||||
lbl.Visible = True
|
||||
DirectCast(lbl, Label).Attributes.Add("data-value",
|
||||
String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}",
|
||||
e.Row.DBCampo("Enero"),
|
||||
e.Row.DBCampo("Febrero"),
|
||||
e.Row.DBCampo("Marzo"),
|
||||
e.Row.DBCampo("Abril"),
|
||||
e.Row.DBCampo("Mayo"),
|
||||
e.Row.DBCampo("Junio"),
|
||||
e.Row.DBCampo("Julio"),
|
||||
e.Row.DBCampo("Agosto"),
|
||||
e.Row.DBCampo("Septiembre"),
|
||||
e.Row.DBCampo("Octubre"),
|
||||
e.Row.DBCampo("Noviembre"),
|
||||
e.Row.DBCampo("Diciembre")))
|
||||
DirectCast(lbl, Label).Attributes.Add("data-porcentaje",
|
||||
String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}",
|
||||
e.Row.DBCampo("EneroPorcentaje"),
|
||||
e.Row.DBCampo("FebreroPorcentaje"),
|
||||
e.Row.DBCampo("MarzoPorcentaje"),
|
||||
e.Row.DBCampo("AbrilPorcentaje"),
|
||||
e.Row.DBCampo("MayoPorcentaje"),
|
||||
e.Row.DBCampo("JunioPorcentaje"),
|
||||
e.Row.DBCampo("JulioPorcentaje"),
|
||||
e.Row.DBCampo("AgostoPorcentaje"),
|
||||
e.Row.DBCampo("SeptiembrePorcentaje"),
|
||||
e.Row.DBCampo("OctubrePorcentaje"),
|
||||
e.Row.DBCampo("NoviembrePorcentaje"),
|
||||
e.Row.DBCampo("DiciembrePorcentaje")))
|
||||
End If
|
||||
End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
cssclass = "txtid2em"
|
||||
For Index = 1 To GvMensual2.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
'GENERAL
|
||||
e.Row.CssClass = cssclass
|
||||
If e.Row.DBCampo("Clasificacion").ToString = "A" Then
|
||||
e.Row.CssClass = "Totales " & cssclass
|
||||
For Index = 1 To GvMensual2.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoAnual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}&V=1"
|
||||
End If
|
||||
|
||||
|
||||
'GENERAL
|
||||
If e.Row.DBCampo("Clasificacion").ToString = "A" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
For Index = 1 To GvAnual.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.CssClass = "txtid2em"
|
||||
Dim Index = 0
|
||||
For Index = 1 To GvAnual.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
e.Row.Style.Add("text-indent", "4em")
|
||||
e.Row.CssClass = "txtid4em"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
e.Row.CssClass = "txtid2em"
|
||||
Dim Index = 0
|
||||
For Index = 2 To GvAnual.Columns.Count - 1 Step 2
|
||||
e.Row.Cells(Index).Text = "100%"
|
||||
Next Index
|
||||
End If
|
||||
|
||||
'SUMA
|
||||
If e.Row.DBCampo("Clasificacion").ToString = "Z" Then
|
||||
e.Row.Style.Add("background-color", "#DDD")
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
Dim Index = 0
|
||||
For Index = 2 To GvAnual.Columns.Count - 1 Step 2
|
||||
e.Row.Cells(Index).Text = "100%"
|
||||
Next Index
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,213 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacion.aspx.vb" Inherits="Contabilidad2_RepBalanzaComprobacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Balanza de Comprobación
|
||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />
|
||||
<asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" />
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlTipoCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" runat="server" visible="false">Tipo:</label>
|
||||
<div class="col-md-2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1" >Nivel: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlNivel" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayores" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Último nivel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div
|
||||
|
||||
<label class="col-md-1">Vista: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlVista" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Contable" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="SAT" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px" align="left;">
|
||||
|
||||
<input type="text" id="TxtBusquedaIndicadores" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
runat="server" GridLines="None" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" Style="white-space: pre;" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ModoImpresion As Boolean
|
||||
Get
|
||||
ModoImpresion = CType(ViewState("ModoImpresion"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModoImpresion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveProyecto As Integer
|
||||
Get
|
||||
CveProyecto = ViewState("CveProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As Integer
|
||||
Get
|
||||
CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSubProyecto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Response.Redirect($"/Contabilidad/RepBalanzaComprobacion.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros = True
|
||||
ModoImpresion = False
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
ErrorParametros = False
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero.ToEntero
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero.ToEntero
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If TipoReporte = 1 Then
|
||||
'mostrar cuales son las cuentas que no tienen asignado el agrupador que sean afectables
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjConta.DtResultados.FiltraParametros("CveAgrupadorSAT is null and not Codigo like '_%'")
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
Dim str As New StringBuilder
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
str.AppendFormat(" - {0} </br>", dr("CtaCodigo"))
|
||||
Next
|
||||
Alert(str.ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
CargaGrid()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor") = "1" OrElse e.Row.DBCampo("CtaMayor") = "3" OrElse e.Row.DBCampo("CtaMayor") = "4" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
If e.Row.DBCampo("CveTipo") = "1" Then
|
||||
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} ", e.Row.DBCampo("SaldoInicial").FormatoNumero)
|
||||
e.Row.FCLabel("LbSaldoActual").Text = " "
|
||||
End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
'Total general
|
||||
If e.Row.DBCampo("Id") = "" Then
|
||||
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 9
|
||||
e.Row.ControlStyle.Height = 30
|
||||
e.Row.FCLabel("LbNombre").Text = "Sumas Iguales"
|
||||
e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoID").FormatoNumero, e.Row.DBCampo("SaldoIA").FormatoNumero)
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("TotalCargos").FormatoNumero
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("TotalAbonos").FormatoNumero
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
|
||||
Else
|
||||
If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("ID"), FechaInicio.ToShortDateString, FechaFin.ToShortDateString, CveProyecto, CveSubProyecto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ModoImpresion = True
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "BalanzaComprobacion"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,163 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanzaComprobacionSAT.aspx.vb" Inherits="Contabilidad2_RepBalanzaComprobacion" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Balanza de Comprobación
|
||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />
|
||||
<asp:ListItem Text="Con Movimientos o saldo no igual a cero " Value="5" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<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="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<table id="Tbl" runat="server" style="width: 1000px; float: left;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-advance table-striped table-hover Widthall" runat="server" GridLines="None" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("CodigoSAT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="180" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("NombreSAT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="320" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Iniciales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbSaldoInicial" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cargos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">Saldos Actuales</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deudor</td>
|
||||
<td>Acreedor</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSaldoActual" Style="white-space: pre;" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<asp:Label ID="LbSaldoActual" Style="white-space: pre;" runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuenta As Integer
|
||||
Get
|
||||
IdCuenta = ViewState("IdCuenta").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("IdCuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ModoImpresion As Boolean
|
||||
Get
|
||||
ModoImpresion = CType(ViewState("ModoImpresion"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModoImpresion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Dim ErrorParametros = True
|
||||
ModoImpresion = False
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
'If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
IdCuenta = Request("CveCuenta").ToEntero
|
||||
'FechaInicio = Request("FI").ToDate
|
||||
FechaFin = Request("FF").ToDate
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
ErrorParametros = False
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
'DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSubproyecto.DataBind()
|
||||
|
||||
If Not ErrorParametros Then
|
||||
CargaDatos()
|
||||
End If
|
||||
Else
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 1) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
CargaDatos()
|
||||
|
||||
RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.DBCampo("Id").ToEntero = IdCuenta Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
' 'e.Row.ControlStyle.Font.Size = 9
|
||||
' 'e.Row.ControlStyle.Height = 30
|
||||
'Else
|
||||
' e.Row.ControlStyle.Font.Bold = False
|
||||
'End If
|
||||
|
||||
'If e.Row.DBCampo("CtaMayor") = "1" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'End If
|
||||
|
||||
'Acomoda Deudor y Acreedor
|
||||
'If e.Row.DBCampo("CveTipo") = "1" Then
|
||||
' e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} ", e.Row.DBCampo("SaldoInicial").FormatoNumero)
|
||||
' e.Row.FCLabel("LbSaldoActual").Text = " "
|
||||
'End If
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("SaldoInicial").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Cargos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("Abonos").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("SaldoActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLSaldoActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
'Total general
|
||||
If e.Row.DBCampo("CodigoSAT") = "" Then
|
||||
'e.Row.Cells(2).HorizontalAlign = HorizontalAlign.NotSet
|
||||
'Dim TotSaldoID, TotSaldoIA As Double
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Font.Size = 9
|
||||
e.Row.ControlStyle.Height = 30
|
||||
e.Row.FCLabel("LbNombre").Text = "Sumas Iguales"
|
||||
'e.Row.FCLabel("LbSaldoInicial").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoID").FormatoNumero, e.Row.DBCampo("SaldoIA").FormatoNumero)
|
||||
'e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("TotalCargos").FormatoNumero
|
||||
'e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("TotalAbonos").FormatoNumero
|
||||
e.Row.FCLabel("LbSaldoActual").Visible = True
|
||||
'e.Row.FCLabel("LbSaldoActual").Text = String.Format("{0} <br/>{1}", e.Row.DBCampo("SaldoAD").FormatoNumero, e.Row.DBCampo("SaldoAA").FormatoNumero)
|
||||
'Else
|
||||
'If ModoImpresion Then e.Row.Cells(5).Text = e.Row.FCHyperLink("HLSaldoActual").Text Else e.Row.FCHyperLink("HLSaldoActual").NavigateUrl = String.Format("/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("ID"), FechaFin.ToShortDateString)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ModoImpresion = True
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
'Using sw As New StringWriter()
|
||||
' Using hw As New HtmlTextWriter(sw)
|
||||
|
||||
' Dim style As StringBuilder = New StringBuilder()
|
||||
' style.Append("<style> ")
|
||||
' style.Append(File.ReadAllText(ModExtensiones.DirectorioBaseEmpresas & "Styles\EstilosExcel.css"))
|
||||
' style.Append(" </style> ")
|
||||
' 'To Export all pages
|
||||
' 'Gv.AllowPaging = False
|
||||
' 'Gv.DataBind()
|
||||
' Tbl.RenderControl(hw)
|
||||
' Dim sr As New StringReader(sw.ToString())
|
||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
||||
' pdfDoc.Open()
|
||||
' htmlparser.Parse(sr)
|
||||
' pdfDoc.Close()
|
||||
|
||||
' Response.ContentType = "application/pdf"
|
||||
' Response.AddHeader("content-disposition", "attachment;filename=BalanzaComprobacion.pdf")
|
||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
||||
' Response.Write(style.ToString)
|
||||
' Response.Write(pdfDoc)
|
||||
' Response.[End]()
|
||||
' End Using
|
||||
'End Using
|
||||
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("BalanzaComprobacion")
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "Contabilidad/Reportes/RepBalanzaComprobacion.rdlc"
|
||||
'nombre del reporte
|
||||
Dim fileName As String = "BalanzaComprobacion"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaIni", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,153 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCambiosSituacionFinanciera.aspx.vb" Inherits="AC2_RepCambiosSituacionFinanciera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Cambio de Situación Financiera
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" >Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Divisor</div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList CssClass="select2me" runat="server" ID="DdlUnidad" Width="100%">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" >SubProyecto: </label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" >Movimientos: </label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList ID="DdlMovimiento" runat="server" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<%--PARA REPORTE--%>
|
||||
<%--<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>--%>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Origen">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# If(Eval("TipoSaldo").ToString = "1", Eval("Saldo", "{0:N2}"), "0") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplicación">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# If(Eval("TipoSaldo").ToString = "2", Eval("Saldo", "{0:N2}"), "0") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Level">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblLevel" Text='<%# Eval("Level") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,266 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Partial Class AC2_RepCambiosSituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
'TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
Dim Clsconta As New ClsContabilidad
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Clsconta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
Clsconta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim FechaInicio = String.Format("01/01/{0}", DdlEjercicio.SelectedValue).ToDate
|
||||
Dim FechaFin = String.Format("31/12/{0}", DdlEjercicio.SelectedValue).ToDate
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetCambioSituacionFinanciera(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, DdlMovimiento.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Cambio de Situación Financiera.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
' GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Cambios en la Situación Financiera<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, DdlEjercicio.SelectedValue)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Level") = "1" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "font-weight: bold;")
|
||||
e.Row.FCLiteral("LtNombre").Text = String.Format("<br/><br/>{0}", e.Row.DBCampo("Nombre"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level") = "2" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "font-weight: bold;")
|
||||
e.Row.FCLiteral("LtNombre").Text = String.Format("<br/>{0}{0}{0}{1}", " ", e.Row.DBCampo("Nombre"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level") = "1" Or e.Row.DBCampo("Level") = "2" Then
|
||||
e.Row.FCLabel("LbActual").Font.Bold = True
|
||||
e.Row.FCLabel("LbAnterior").Font.Bold = True
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level") = "3" Then
|
||||
'CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:60px;")
|
||||
e.Row.FCLiteral("LtNombre").Text = String.Format("{0}{0}{0}{0}{0}{0}{0}{0}{1}", " ", e.Row.DBCampo("Nombre"))
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Cambios en la Situación Financiera<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, DdlEjercicio.SelectedValue)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf)))
|
||||
ImprimirPDF("AC/Reportes/RepCambiosSituacionFinanciera.rdlc", DtDatos, params, "EdoCambiosSituacionFinanciera", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,229 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoActividades.aspx.vb" Inherits="AC_RepEstadoActividades" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Actividades" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-primary" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" >Ejercicio:</label>
|
||||
<div class="col-md-1" >
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" >Periodo:</label>
|
||||
<div class="col-md-1" style="width: 130px;">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" 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>
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblProyecto" CssClass="col-md-1" runat="server">Proyecto:</asp:Label>
|
||||
<div class="col-md-1" id="DivProyecto" runat="server">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVSubtotales1" visible="false" >Ver con Sub Totales: </label>
|
||||
<div class="col-md-1" runat="server" id="DVSubtotales2" visible="false" >
|
||||
<asp:DropDownList ID="DdlVerConSubTotales" runat="server" CssClass="select2me" >
|
||||
<asp:ListItem Text="Si" Value="1" ></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" runat="server" id="DivTipo1" visible="false" >Tipo: </label>
|
||||
<div class="col-md-1" runat="server" id="DivTipo2" visible="false" >
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<table style="width: 100%;" class="">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
CssClass=" Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPorcentajeActual" runat="server" Text='<%# Eval("PorcentajeActual", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Período Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPorcentajeAcumulado" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
CssClass=" Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPorcentajeActual" runat="server" Text='<%# Eval("PorcentajeActual", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="%" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPorcentajeAcumulado" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPPTotal" runat="server">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>Resultados del Ejercicio:</h4>
|
||||
</td>
|
||||
<td width="30%" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalActual"></asp:Label>
|
||||
</td>
|
||||
<td width="30%" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalAnterior"></asp:Label>
|
||||
</td>
|
||||
<td width="12%" align="right"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,500 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepEstadoActividades
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGastos As DataTable
|
||||
Get
|
||||
DtGastos = DirectCast(ViewState("DtGastos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ReporteComplementario = False
|
||||
Else
|
||||
ReporteComplementario = False
|
||||
DivTipo1.Visible = False
|
||||
DivTipo2.Visible = False
|
||||
LtTitulo.Text = "Estado de Resultados"
|
||||
End If
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
CargaEjercicios()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then
|
||||
DVConsolidado1.Visible = True
|
||||
DVConsolidado2.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
DVSubtotales1.Visible = True
|
||||
DVSubtotales2.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
If DdlEjercicio.Items.Count = 0 Then
|
||||
DdlEjercicio.Items.Add(New ListItem(NowADS().Year.ToString, NowADS().Year.ToString))
|
||||
End If
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero 'If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, 1)
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("Tipo ='H' ")
|
||||
DtGastos = DtDatos.FiltraParametros("Tipo ='G' ")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
Dim TotalActual = 0.0, TotalAnterior = 0.0
|
||||
If DtIngresos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtIngresos.FiltraParametros("NOT CtaMayor in (3,4)").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActual.ToString
|
||||
Row.Item("PorcentajeActual") = "100.00"
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
Dim T1 = TotalActual, T2 = TotalAnterior
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
Row = DtGastos.NewRow
|
||||
If DtGastos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtGastos.FiltraParametros("NOT CtaMayor in (3,4)").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = TotalActual
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
|
||||
If DdlVerConSubTotales.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
Dim idxUtilidadBruta As Integer = 0
|
||||
Dim idxUtilidadOperacion As Integer = 0
|
||||
Dim idxUtilidadAntesImpuestos As Integer = 0
|
||||
|
||||
Dim IndexActual As Integer = 0
|
||||
For Each dRow As DataRow In DtGastos.Rows
|
||||
|
||||
If dRow("Codigo").ToString.Contains("6000000") Then 'Utilidad Bruta indice que se tomara
|
||||
idxUtilidadBruta = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Codigo").ToString.Contains("7000000") Then 'Utilidad de Operación
|
||||
idxUtilidadOperacion = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Nombre").ToString.Contains("TOTAL GASTOS") Then 'Utilidad antes de impuestos
|
||||
idxUtilidadAntesImpuestos = IndexActual
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
Next
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
|
||||
Dim UtilidadBrutaActual, UtilidadBrutaAcumulada, UtilidadBrutPorcentajeActual, UtilidadBrutPorcentajeAcumulado As Decimal
|
||||
|
||||
Dim UtilidadOperacionActual, UtilidadOperacionAcumulada, UtilidadOperacionPorcentajeActual, UtilidadOperacionPorcentajeAcumulado As Decimal
|
||||
|
||||
Dim UtilidadAntesImpuestosActual, UtilidadAntesImpuestosAcumulada, UtilidadAntesImpuestosPorcentajeActual, UtilidadAntesImpuestosPorcentajeAcumulado As Decimal
|
||||
|
||||
|
||||
Dim IngresoActual As Decimal = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ")
|
||||
Dim IngresoAcumulado As Decimal = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ")
|
||||
|
||||
Dim CostoActual As Decimal = DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ")
|
||||
Dim CostoAcumulado As Decimal = DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1")
|
||||
|
||||
Dim GastoActual As Decimal = DtGastos.SUMD("ImporteActual", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
Dim GastoAcumulado As Decimal = DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
|
||||
Dim ResultadoIntegralActual As Decimal = DtGastos.SUMD("ImporteActual", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
Dim ResultadoIntegralAcumulado As Decimal = DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
|
||||
|
||||
UtilidadBrutaActual = IngresoActual - CostoActual
|
||||
UtilidadBrutaAcumulada = IngresoAcumulado - CostoAcumulado
|
||||
|
||||
UtilidadOperacionActual = IngresoActual - CostoActual - GastoActual
|
||||
UtilidadOperacionAcumulada = IngresoAcumulado - CostoAcumulado - GastoAcumulado
|
||||
|
||||
UtilidadAntesImpuestosActual = IngresoActual - CostoActual - GastoActual - ResultadoIntegralActual
|
||||
UtilidadAntesImpuestosAcumulada = IngresoAcumulado - CostoAcumulado - GastoAcumulado - ResultadoIntegralAcumulado
|
||||
|
||||
|
||||
UtilidadBrutPorcentajeActual = If(IngresoActual <> 0 And UtilidadBrutaActual <> 0, (UtilidadBrutaActual / IngresoActual * 100), 0)
|
||||
UtilidadBrutPorcentajeAcumulado = If(IngresoAcumulado <> 0 And UtilidadBrutaAcumulada <> 0, (UtilidadBrutaAcumulada / IngresoAcumulado * 100), 0)
|
||||
|
||||
UtilidadOperacionPorcentajeActual = If(IngresoActual <> 0 And UtilidadOperacionActual <> 0, (UtilidadOperacionActual / IngresoActual * 100), 0)
|
||||
UtilidadOperacionPorcentajeAcumulado = If(IngresoAcumulado <> 0 And UtilidadOperacionAcumulada <> 0, (UtilidadOperacionAcumulada / IngresoAcumulado * 100), 0)
|
||||
|
||||
UtilidadAntesImpuestosPorcentajeActual = If(IngresoActual <> 0 And UtilidadAntesImpuestosActual <> 0, (UtilidadAntesImpuestosActual / IngresoActual * 100), 0)
|
||||
UtilidadAntesImpuestosPorcentajeAcumulado = If(IngresoAcumulado <> 0 And UtilidadAntesImpuestosAcumulada <> 0, (UtilidadAntesImpuestosAcumulada / IngresoAcumulado * 100), 0)
|
||||
|
||||
|
||||
Dim dRowUtilidadBruta As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadBrutaVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadOperacion As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadOperacionVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadAntesImpuestos As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadAntesImpuestosVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
|
||||
|
||||
dRowUtilidadBruta("Nombre") = "Utilidad Bruta"
|
||||
dRowUtilidadBruta("ImporteActual") = UtilidadBrutaActual
|
||||
dRowUtilidadBruta("ImporteAcumulado") = UtilidadBrutaAcumulada
|
||||
dRowUtilidadBruta("CtaMayor") = -1
|
||||
dRowUtilidadBruta("Orden") = "600"
|
||||
dRowUtilidadBruta("PorcentajeActual") = UtilidadBrutPorcentajeActual
|
||||
dRowUtilidadBruta("PorcentajeAcumulado") = UtilidadBrutPorcentajeAcumulado
|
||||
dRowUtilidadBrutaVacio("CtaMayor") = -1
|
||||
dRowUtilidadBrutaVacio("Orden") = "600"
|
||||
|
||||
dRowUtilidadOperacion("Nombre") = "Utilidad de Operación"
|
||||
dRowUtilidadOperacion("ImporteActual") = UtilidadOperacionActual
|
||||
dRowUtilidadOperacion("ImporteAcumulado") = UtilidadOperacionAcumulada
|
||||
dRowUtilidadOperacion("CtaMayor") = -1
|
||||
dRowUtilidadOperacion("Orden") = "700"
|
||||
dRowUtilidadOperacion("PorcentajeActual") = UtilidadOperacionPorcentajeActual
|
||||
dRowUtilidadOperacion("PorcentajeAcumulado") = UtilidadOperacionPorcentajeAcumulado
|
||||
dRowUtilidadOperacionVacio("CtaMayor") = -1
|
||||
dRowUtilidadOperacionVacio("Orden") = "700"
|
||||
|
||||
dRowUtilidadAntesImpuestos("Nombre") = "Utilidad antes de impuestos"
|
||||
dRowUtilidadAntesImpuestos("ImporteActual") = UtilidadAntesImpuestosActual
|
||||
dRowUtilidadAntesImpuestos("ImporteAcumulado") = UtilidadAntesImpuestosAcumulada
|
||||
dRowUtilidadAntesImpuestos("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestos("Orden") = "790"
|
||||
dRowUtilidadAntesImpuestos("PorcentajeActual") = UtilidadAntesImpuestosPorcentajeActual
|
||||
dRowUtilidadAntesImpuestos("PorcentajeAcumulado") = UtilidadAntesImpuestosPorcentajeAcumulado
|
||||
dRowUtilidadAntesImpuestosVacio("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestosVacio("Orden") = "790"
|
||||
|
||||
'PorcentajeActual
|
||||
'PorcentajeAcumulado
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBruta, idxUtilidadBruta)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBrutaVacio, idxUtilidadBruta + 1)
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacion, idxUtilidadOperacion)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacionVacio, idxUtilidadOperacion + 1)
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestos, idxUtilidadAntesImpuestos)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestosVacio, idxUtilidadAntesImpuestos + 1)
|
||||
|
||||
'ImporteActual
|
||||
'ImporteAcumulado
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
End If
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
|
||||
GvGastos.DataSource = DtGastos
|
||||
GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActual.Text = TotalActual.ToString.FormatoNumero
|
||||
LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 And Not e.Row.DBCampo("Orden").ToString().Contiene("600", "700", "790") Then
|
||||
TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.Contiene("3", "4") Then
|
||||
'e.Row.CssClass = "SubTotales3"
|
||||
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&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeAcumulado").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 And Not e.Row.DBCampo("Orden").ToString().Contiene("600", "700", "790") Then
|
||||
TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.Contiene("3", "4") Then
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
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&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveProyecto={3}&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlProyecto.SelectedValue, DdlSubproyecto.SelectedValue)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
e.Row.FCLabel("LblPorcentajeAcumulado").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "DataSet1"
|
||||
rds.Value = DtIngresos
|
||||
Dim rds2 As New ReportDataSource
|
||||
rds2.Name = "DataSet2"
|
||||
rds2.Value = DtGastos
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("TotalActual", TotalActual.ToString))
|
||||
params.Add(New ReportParameter("TotalAnterior", TotalAnterior.ToString))
|
||||
params.Add(New ReportParameter("lbTotalActual", LbTotalActual.Text))
|
||||
params.Add(New ReportParameter("lbTotalAnterior", LbTotalAnterior.Text))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.Text, DdlEjercicio.SelectedItem.Text)))
|
||||
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividadesConta2.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
' UsuarioActual.Empresa.GrupoEmpresa
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,254 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoActividadesSAT.aspx.vb" Inherits="AC_RepEstadoActividades" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Actividades" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%-- <img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px;" /> --%>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<%--<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<<li>FechaInicio:
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgFechaInicio" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" InitialValue="__/__/____" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Corte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>FechaFin:
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgFechaFin" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" InitialValue="__/__/____" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Corte''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>Ejercicio:
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100px">
|
||||
<asp:ListItem Text="2014" Value="2014"></asp:ListItem>
|
||||
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Periodo:
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px">
|
||||
<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>Firma:
|
||||
<asp:CheckBox ID="ChkFirma" runat="server" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Filtrar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" Text="Consultar" CssClass="btn btn-primary" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Ejercicio:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Periodo:
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<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="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<li runat="server" id="liTipoReporte" visible="false">Tipo:
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Firma:
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox CssClass="make-switchsd" ID="ChkFirma" runat="server" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Período Anterior">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Período Anterior">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UPPTotal" runat="server">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>Resultados del Ejercicio (Ahorro/Desahorro):</h4>
|
||||
</td>
|
||||
<td width="30%" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalActual"></asp:Label>
|
||||
</td>
|
||||
<td width="30%" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalAnterior"></asp:Label>
|
||||
</td>
|
||||
<td width="12%" align="right">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,327 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepEstadoActividades
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGastos As DataTable
|
||||
Get
|
||||
DtGastos = DirectCast(ViewState("DtGastos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ReporteComplementario = False
|
||||
Else
|
||||
ReporteComplementario = True
|
||||
liTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Estado de Resultados"
|
||||
End If
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
CargaEjercicios()
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero 'If(ReporteComplementario, DdlTipoReporte.SelectedValue.ToEntero, 1)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 1) Then
|
||||
DtDatos = ObjConta.DtResultados '.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("CodigoSAT Like '4%'")
|
||||
DtGastos = DtDatos.FiltraParametros("CodigoSAT not Like '4%'")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
TotalActual = 0.0
|
||||
TotalAnterior = 0.0
|
||||
If DtIngresos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtIngresos.Rows '.FiltraParametros("CtaMayor = 3").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActual.ToString
|
||||
Row.Item("PorcentajeActual") = "100.00"
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = "100.00"
|
||||
'Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
' Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
Dim T1 = TotalActual, T2 = TotalAnterior
|
||||
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
Row = DtGastos.NewRow
|
||||
If DtGastos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtGastos.Rows '.FiltraParametros("CtaMayor = 3").Rows
|
||||
TotalActual += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = TotalActual
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||
'Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
'Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
TotalActual = TotalActual - T1
|
||||
TotalAnterior = TotalAnterior - T2
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
|
||||
GvGastos.DataSource = DtGastos
|
||||
GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActual.Text = TotalActual.ToString.FormatoNumero
|
||||
LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Color.Black)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
SumaTotales()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
' TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
' TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
' 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
' 'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
' 'e.Row.CssClass = "SubTotales3"
|
||||
' 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?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").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 Sub
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
' TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
' TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
' e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
' e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
' e.Row.ControlStyle.Font.Bold = True
|
||||
'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
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").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 Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "DataSet1"
|
||||
rds.Value = DtIngresos
|
||||
Dim rds2 As New ReportDataSource
|
||||
rds2.Name = "DataSet2"
|
||||
rds2.Value = DtGastos
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("TotalActual", TotalActual.ToString))
|
||||
params.Add(New ReportParameter("TotalAnterior", TotalAnterior.ToString))
|
||||
params.Add(New ReportParameter("lbTotalActual", LbTotalActual.Text))
|
||||
params.Add(New ReportParameter("lbTotalAnterior", LbTotalAnterior.Text))
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFechaFin", String.Format("{0} al {1}", FechaI, FechaF)))
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,563 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultados.aspx.vb" Inherits="Contabilidad2_RepEstadoResultados" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="CSS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
gridviewScrollMensual();
|
||||
gridviewScrollAnual();
|
||||
});
|
||||
|
||||
function gridviewScrollMensual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 250;
|
||||
|
||||
$('#<%=GvDatosMensual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
|
||||
function gridviewScrollAnual() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 250;
|
||||
|
||||
$('#<%=GvDatosAnual.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto,
|
||||
freezesize: 1,
|
||||
headerrowcount: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 60px;">Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm" runat="server" Width="70px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="TdPeriodo" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate" style="padding-right:2px;">Periodo:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm" runat="server">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<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="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="Div1" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="TdSubTotales" visible="false">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" style="padding-right:2px;">SubTotales:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlSubtotales" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Sin Subtotales" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Trimestral" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cuatrimestral" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer runat="server" ID="TabContainer" AutoPostBack="true" OnActiveTabChanged="TabContainer_ActiveTabChanged">
|
||||
|
||||
<%--NORMAL--%>
|
||||
<ajax:TabPanel HeaderText="Estado de Resultados" ID="TabNormal" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<table style="width: 100%;" class="table">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Período Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle> <RowStyle CssClass="Texto" /> <AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="GASTOS Y OTRAS PÉRDIDAS"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" Width="400px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Período Actual">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeActual" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Período Acumulado">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle> <RowStyle CssClass="Texto" /> <AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel3" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
<table style="width: 90%;" class="table table-striped table-advance table-hover">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h3>Resultados del Ejercicio (Ahorro/Desahorro):</h3>
|
||||
</td>
|
||||
<td width="120px" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalActual"></asp:Label>
|
||||
</td>
|
||||
<td width="120px" align="right">
|
||||
<asp:Label runat="server" Font-Bold="true" ID="LbTotalAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%--MENSUAL--%>
|
||||
<ajax:TabPanel HeaderText="Estado de Resultados Mensual" ID="TabMensual" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosMensual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosMensual" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Enero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLEnero" runat="server" Text='<%# Eval("Enero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeEnero" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Febrero">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLFebrero" runat="server" Text='<%# Eval("Febrero", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeFebrero" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Marzo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMarzo" runat="server" Text='<%# Eval("Marzo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMarzo" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral1" runat="server" Text='<%# Eval("Trimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral1" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Abril">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAbril" runat="server" Text='<%# Eval("Abril", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAbril" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 1er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral1" runat="server" Text='<%# Eval("Cuatrimestral1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeCuatrimestral1" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Mayo">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLMayo" runat="server" Text='<%# Eval("Mayo", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeMayo" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Junio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJunio" runat="server" Text='<%# Eval("Junio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJunio" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral2" runat="server" Text='<%# Eval("Trimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral2" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Julio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLJulio" runat="server" Text='<%# Eval("Julio", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeJulio" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Agosto">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAgosto" runat="server" Text='<%# Eval("Agosto", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeAgosto" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 2do Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral2" runat="server" Text='<%# Eval("Cuatrimestral2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeCuatrimestral2" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Septiembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLSeptiembre" runat="server" Text='<%# Eval("Septiembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeSeptiembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral3" runat="server" Text='<%# Eval("Trimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral3" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Octubre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLOctubre" runat="server" Text='<%# Eval("Octubre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeOctubre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Noviembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLNoviembre" runat="server" Text='<%# Eval("Noviembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeNoviembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Diciembre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLDiciembre" runat="server" Text='<%# Eval("Diciembre", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeDiciembre" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 4to Trimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLTrimestral4" runat="server" Text='<%# Eval("Trimestral4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeTrimestral4" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Subtotal 3er Cuatrimestre">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLCuatrimestral3" runat="server" Text='<%# Eval("Cuatrimestral3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="PorcentajeCuatrimestral3" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<%--ANUAL--%>
|
||||
<ajax:TabPanel HeaderText="Estado de Resultados Anual" ID="TabAnual" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosAnual" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosAnual" CssClass="table table-advance table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="400" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ano1" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno1" runat="server" Text='<%# Eval("Ano1", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno1" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano2" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno2" runat="server" Text='<%# Eval("Ano2", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno2" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano3" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno3" runat="server" Text='<%# Eval("Ano3", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno3" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano4" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno4" runat="server" Text='<%# Eval("Ano4", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno4" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano5" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno5" runat="server" Text='<%# Eval("Ano5", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno5" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano6" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno6" runat="server" Text='<%# Eval("Ano6", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno6" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano7" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno7" runat="server" Text='<%# Eval("Ano7", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno7" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano8" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno8" runat="server" Text='<%# Eval("Ano8", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno8" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano9" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno9" runat="server" Text='<%# Eval("Ano9", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno9" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano10" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno10" runat="server" Text='<%# Eval("Ano10", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno10" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano11" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno11" runat="server" Text='<%# Eval("Ano11", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno11" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano12" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno12" runat="server" Text='<%# Eval("Ano12", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno12" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano13" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno13" runat="server" Text='<%# Eval("Ano13", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno13" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano14" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno14" runat="server" Text='<%# Eval("Ano14", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno14" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano15" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno15" runat="server" Text='<%# Eval("Ano15", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno15" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano16" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno16" runat="server" Text='<%# Eval("Ano16", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno16" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano17" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno17" runat="server" Text='<%# Eval("Ano17", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno17" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano18" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno18" runat="server" Text='<%# Eval("Ano18", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno18" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano19" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno19" runat="server" Text='<%# Eval("Ano19", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno19" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
<asp:TemplateField HeaderText="Ano20" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAno20" runat="server" Text='<%# Eval("Ano20", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" HeaderText="%" DataField="PorcentajeAno20" DataFormatString="{0:N2}" ItemStyle-Width="100px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,664 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad2_RepEstadoResultados
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region " PROPIEDADES NORMAL "
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtIngresos As DataTable
|
||||
Get
|
||||
DtIngresos = DirectCast(ViewState("DtIngresos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtIngresos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGastos As DataTable
|
||||
Get
|
||||
DtGastos = DirectCast(ViewState("DtGastos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtGastos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaI As String
|
||||
Get
|
||||
Return ViewState("FechaI").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaI") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaF As String
|
||||
Get
|
||||
Return ViewState("FechaF").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaF") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ReporteComplementario As Boolean
|
||||
Get
|
||||
ReporteComplementario = CBool(ViewState("ReporteComplementario").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReporteComplementario") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES MENSUAL "
|
||||
Private Property DtDatosMensual As DataTable
|
||||
Get
|
||||
DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES ANUAL "
|
||||
Private Property DtDatosAnual As DataTable
|
||||
Get
|
||||
DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosAnual") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Anos As Integer
|
||||
Get
|
||||
Anos = ViewState("Anos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Anos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Response.Redirect($"/Contabilidad/RepEstadoResultados.aspx")
|
||||
End If
|
||||
|
||||
'tdTipoReporte.Visible = True
|
||||
TipoReporte = 1
|
||||
|
||||
|
||||
CargaDatosGenerales()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
Anos = 0
|
||||
|
||||
'Normal
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosGenerales()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
|
||||
ClsConta.Dispose()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
End Sub
|
||||
|
||||
#Region " NORMAL "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, -1, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)")
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Actividades", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
|
||||
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
|
||||
Dim Row As DataRow = DtIngresos.NewRow
|
||||
|
||||
|
||||
Dim TotalActualLocal = 0.0, TotalAnteriorLocal = 0.0
|
||||
|
||||
|
||||
If DtIngresos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtIngresos.FiltraParametros("CtaMayor = 1").Rows
|
||||
TotalActualLocal += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorLocal += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = TotalActualLocal.ToString
|
||||
Row.Item("PorcentajeActual") = "100"
|
||||
Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString
|
||||
Row.Item("PorcentajeAcumulado") = "100"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL INGRESOS "
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtIngresos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
Dim T1 = TotalActualLocal, T2 = TotalAnteriorLocal
|
||||
|
||||
TotalActual = TotalActualLocal
|
||||
TotalAnterior = TotalAnteriorLocal
|
||||
|
||||
TotalActualLocal = 0
|
||||
TotalAnteriorLocal = 0
|
||||
|
||||
Row = DtGastos.NewRow
|
||||
If DtGastos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As DataRow In DtGastos.FiltraParametros("CtaMayor = 1").Rows
|
||||
TotalActualLocal += dr("ImporteActual").ToString.ToDouble
|
||||
TotalAnteriorLocal += dr("ImporteAcumulado").ToString.ToDouble
|
||||
Next
|
||||
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = TotalActualLocal
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActualLocal * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnteriorLocal.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnteriorLocal * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
Else
|
||||
Row.Item("Nombre") = "TOTAL GASTOS"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAcumulado") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
TotalActual -= TotalActualLocal
|
||||
TotalAnterior -= TotalAnteriorLocal
|
||||
|
||||
'INSERTA UTILIDAD
|
||||
Row = DtGastos.NewRow
|
||||
Row.Item("Nombre") = "Utilidad (o Pérdida)"
|
||||
Row.Item("ImporteActual") = TotalActual
|
||||
Row.Item("PorcentajeActual") = If(T1 > 0, (TotalActual * 100 / T1).ToString, "0").FormatoNumero
|
||||
Row.Item("ImporteAcumulado") = TotalAnterior.ToString
|
||||
Row.Item("PorcentajeAcumulado") = If(T2 > 0, (TotalAnterior * 100 / T2).ToString, "0").FormatoNumero
|
||||
Row.Item("CtaMayor") = -2
|
||||
DtGastos.Rows.Add(Row)
|
||||
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
|
||||
GvGastos.DataSource = DtGastos
|
||||
GvGastos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SumaTotales()
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActual.Text = TotalActual.ToString.FormatoNumero
|
||||
LbTotalAnterior.Text = TotalAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalActual.ForeColor = If(TotalActual < 0, Drawing.Color.Red, Drawing.Color.Black)
|
||||
LbTotalAnterior.ForeColor = If(TotalAnterior < 0, Drawing.Color.Red, Drawing.Color.Black)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
|
||||
'METODO ANTERIOR
|
||||
'TotalActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
'TotalAnterior += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
'e.Row.CssClass = "SubTotales3"
|
||||
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}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
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 Sub
|
||||
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
|
||||
|
||||
'METODO ANTERIOR
|
||||
'TotalActual -= e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
'TotalAnterior -= e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble
|
||||
|
||||
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -2 Then
|
||||
'e.Row.CssClass = "SubTotales"
|
||||
e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
End If
|
||||
|
||||
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
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&CM=1&CveSubProyecto={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue)
|
||||
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 Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " MENSUAL "
|
||||
|
||||
Private Sub CargaDatosMensual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetEstadoResultadosMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de resultados", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
If DtDatosMensual IsNot Nothing Then
|
||||
CargaGridMensual()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatosMensual.Columns(7).Visible = False
|
||||
GvDatosMensual.Columns(8).Visible = False
|
||||
GvDatosMensual.Columns(17).Visible = False
|
||||
GvDatosMensual.Columns(18).Visible = False
|
||||
GvDatosMensual.Columns(27).Visible = False
|
||||
GvDatosMensual.Columns(28).Visible = False
|
||||
GvDatosMensual.Columns(35).Visible = False
|
||||
GvDatosMensual.Columns(36).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatosMensual.Columns(11).Visible = False
|
||||
GvDatosMensual.Columns(12).Visible = False
|
||||
GvDatosMensual.Columns(23).Visible = False
|
||||
GvDatosMensual.Columns(24).Visible = False
|
||||
GvDatosMensual.Columns(37).Visible = False
|
||||
GvDatosMensual.Columns(38).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatosMensual.Columns(7).Visible = True
|
||||
GvDatosMensual.Columns(8).Visible = True
|
||||
GvDatosMensual.Columns(17).Visible = True
|
||||
GvDatosMensual.Columns(18).Visible = True
|
||||
GvDatosMensual.Columns(27).Visible = True
|
||||
GvDatosMensual.Columns(28).Visible = True
|
||||
GvDatosMensual.Columns(35).Visible = True
|
||||
GvDatosMensual.Columns(36).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatosMensual.Columns(11).Visible = True
|
||||
GvDatosMensual.Columns(12).Visible = True
|
||||
GvDatosMensual.Columns(23).Visible = True
|
||||
GvDatosMensual.Columns(24).Visible = True
|
||||
GvDatosMensual.Columns(37).Visible = True
|
||||
GvDatosMensual.Columns(38).Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGridMensual()
|
||||
GvDatosMensual.DataSource = DtDatosMensual
|
||||
GvDatosMensual.DataBind()
|
||||
UpDatosMensual.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCHyperLink("HLEnero").Text = ""
|
||||
e.Row.FCHyperLink("HLFebrero").Text = ""
|
||||
e.Row.FCHyperLink("HLMarzo").Text = ""
|
||||
e.Row.FCHyperLink("HLAbril").Text = ""
|
||||
e.Row.FCHyperLink("HLMayo").Text = ""
|
||||
e.Row.FCHyperLink("HLJunio").Text = ""
|
||||
e.Row.FCHyperLink("HLJulio").Text = ""
|
||||
e.Row.FCHyperLink("HLAgosto").Text = ""
|
||||
e.Row.FCHyperLink("HLSeptiembre").Text = ""
|
||||
e.Row.FCHyperLink("HLOctubre").Text = ""
|
||||
e.Row.FCHyperLink("HLNoviembre").Text = ""
|
||||
e.Row.FCHyperLink("HLDiciembre").Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.Cells(8).Text = ""
|
||||
e.Row.Cells(10).Text = ""
|
||||
e.Row.Cells(12).Text = ""
|
||||
e.Row.Cells(14).Text = ""
|
||||
e.Row.Cells(16).Text = ""
|
||||
e.Row.Cells(18).Text = ""
|
||||
e.Row.Cells(20).Text = ""
|
||||
e.Row.Cells(22).Text = ""
|
||||
e.Row.Cells(24).Text = ""
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/02/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("09/01/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/11/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
e.Row.FCHyperLink("HLTrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/03/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/06/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/07/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLTrimestral4").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/10/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
e.Row.FCHyperLink("HLCuatrimestral1").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/04/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLCuatrimestral2").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/05/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/08/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
e.Row.FCHyperLink("HLCuatrimestral3").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), String.Format("01/09/{0}", DdlEjercicio.SelectedValue.ToString), String.Format("01/12/{0}", DdlEjercicio.SelectedValue.ToString).ToDate.LastDayOfMonth.ToShortDateString, TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ANUAL "
|
||||
|
||||
Private Sub CargaDatosAnual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetEstadoResultadosAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosAnual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosAnual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del balance general anual", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 40 Step 2
|
||||
GvDatosAnual.Columns(index).Visible = False
|
||||
GvDatosAnual.Columns(index + 1).Visible = False
|
||||
Next
|
||||
|
||||
Dim i = 0
|
||||
For index = 1 To Anos * 2 Step 2
|
||||
GvDatosAnual.Columns(index).Visible = True
|
||||
GvDatosAnual.Columns(index + 1).Visible = True
|
||||
GvDatosAnual.Columns(index).HeaderText = (DdlEjercicio.SelectedValue.ToEntero + i).ToString
|
||||
i = i + 1
|
||||
Next
|
||||
|
||||
If DtDatosAnual IsNot Nothing Then
|
||||
CargaGridAnual()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridAnual()
|
||||
GvDatosAnual.DataSource = DtDatosAnual
|
||||
GvDatosAnual.DataBind()
|
||||
UpDatosAnual.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
For index = 1 To Anos
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).Text = ""
|
||||
e.Row.Cells(index + index).Text = ""
|
||||
Next
|
||||
End If
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 4 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
'TITULO DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Or e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
For index = 1 To Anos
|
||||
e.Row.FCHyperLink("HLAno" + index.ToString).NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}&CM=1&CveSubProyecto={4}", e.Row.DBCampo("CveCuenta"), String.Format("01/01/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), String.Format("31/12/{0}", (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString), TipoReporte, DdlSubproyecto.SelectedValue)
|
||||
Next
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 5 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
'SUMAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 6 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
|
||||
CargaDatosMensual()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
CargaDatosAnual()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
'Esconde Todo de lo variable de Filtros
|
||||
TdSubTotales.Visible = False
|
||||
TdPeriodo.Visible = False
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
TdPeriodo.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
TdSubTotales.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
End If
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
BtnConsultar_Click(BtnConsultar, EventArgs.Empty)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,154 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlujoEfectivo.aspx.vb" Inherits="AC2_RepFlujoEfectivo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Flujo de Efectivo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" /> --%>
|
||||
<%--<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<img src="/Imagenes/separador02.gif" alt="" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 "><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaDel" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAl" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Divisor:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidad" CssClass="form-control input-sm selec2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<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="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Nombre", "{0:N2}")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbActual" Text='<%# Eval("ImporteActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoActual" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbAnterior" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbPeriodoAnterior" runat="server" />
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,235 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Partial Class AC2_RepFlujoEfectivo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaAl As String
|
||||
Get
|
||||
FechaAl = ViewState("FechaAl").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaAl") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
FechaAl = TxtFechaAl.Text
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Flujo de Efectivo", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
'OBTENEMOS TOTALES NETOS DE OPERACIONES PARA INSERTAR DIRECTO
|
||||
If DtDatos IsNot Nothing Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(120) Then
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '040000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '050000000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
Else
|
||||
TotalActual = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteActual").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteActual").ToString.ToDouble
|
||||
TotalAnterior = DtDatos.FiltraParametros("Codigo = '000040000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble - DtDatos.FiltraParametros("Codigo = '000050000000000000'").Rows(0)("ImporteAnterior").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGrid()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
' GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, TxtFechaAl.Text)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'PARA PONER AÑO EN HEADER
|
||||
If e.Row.RowIndex = 0 Then
|
||||
GvDatos.HeaderRow.FCLabel("LbPeriodoActual").Text = e.Row.DBCampo("Actual")
|
||||
GvDatos.HeaderRow.FCLabel("LbPeriodoAnterior").Text = e.Row.DBCampo("Anterior")
|
||||
End If
|
||||
|
||||
'TITULO DE BLOQUE (CABECERAS Y TOTALES)
|
||||
If e.Row.DBCampo("Level") = "-1" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-top:20px; ")
|
||||
e.Row.Font.Bold = True
|
||||
|
||||
'CABCERA
|
||||
If e.Row.DBCampo("CveCuenta") = "12" Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
|
||||
'TOTAL OPERACIONES
|
||||
If e.Row.DBCampo("CveCuenta") = "123" Then
|
||||
e.Row.FCLabel("LbActual").Text = TotalActual.ToString.FormatoNumero
|
||||
e.Row.FCLabel("LbAnterior").Text = TotalAnterior.ToString.FormatoNumero
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'ORIGEN Y APLICACION
|
||||
If e.Row.DBCampo("Level") = "0" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:30px; margin-top:15px")
|
||||
e.Row.Font.Bold = True
|
||||
End If
|
||||
|
||||
'PAPAS
|
||||
If e.Row.DBCampo("Level") = "2" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left: 60px; margin-top:5px;")
|
||||
End If
|
||||
|
||||
'HIJOS
|
||||
If e.Row.DBCampo("Level") = "3" Then
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left:90px;")
|
||||
End If
|
||||
|
||||
'INGRESOS -> ORIGEN
|
||||
If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00004" Then e.Row.FCLiteral("LtNombre").Text = "ORIGEN"
|
||||
|
||||
'GASTOS -> APLICACION
|
||||
If e.Row.DBCampo("Codigo").ToString.Substring(0, 5) = "00005" Then e.Row.FCLiteral("LtNombre").Text = "APLICACION"
|
||||
|
||||
|
||||
|
||||
'ACTIVIDADES DE OPERACION
|
||||
If e.Row.DBCampo("Sup").ToString <> "" Then
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDecimal = 0 Then
|
||||
e.Row.FCLabel("LbAnterior").Text = ""
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDecimal = 0 Then
|
||||
e.Row.FCLabel("LbActual").Text = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Flujo de Efectivo<br/>Al {1}</div>", UsuarioActual.Empresa.Empresa, FechaAl)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString)
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pAl", FechaAl))
|
||||
params.Add(New ReportParameter("pTotalActual", TotalActual.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pTotalAnterior", TotalAnterior.ToString.FormatoNumero))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf)))
|
||||
ImprimirPDF("AC/Reportes/RepFlujoEfectivo.rdlc", DtDatos, params, "EdoFlujoEfectivo", Formato)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,114 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepLibroDiario.aspx.vb" Inherits="Contabilidad2_RepLibroDiario" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Libro Diario
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" Visible="false" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" Visible="false" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="Imprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-primary" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Fin:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">Tipo Poliza:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<asp:DropDownList runat="server" ID="DDlTipoPoliza" CssClass="select2me">
|
||||
<asp:ListItem Text="Todos" Selected="True" Value="-1" />
|
||||
<asp:ListItem Text="Ingresos" Value="1" />
|
||||
<asp:ListItem Text="Egresos" Value="2" />
|
||||
<asp:ListItem Text="Diario" Value="3" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" GridLines="None" AutoGenerateColumns="False" runat="server">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoPol" />
|
||||
<asp:BoundField HeaderText="Poliza" DataField="Folio" />
|
||||
<asp:BoundField HeaderText="Concepto" DataField="Concepto" />
|
||||
<asp:BoundField HeaderText="Cuenta" DataField="Codigo" />
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
|
||||
<asp:BoundField HeaderText="Cargos" DataField="Cargos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
<asp:BoundField HeaderText="Abonos" DataField="Abonos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad2_RepLibroDiario
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaValores()
|
||||
|
||||
TxtFechaDel.Text = $"01/01/{NowADS().Year}"
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Private Sub CargaDatos()
|
||||
|
||||
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
||||
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
||||
|
||||
'FechaInicio = New Date(2016, 1, 1)
|
||||
'FechaFin = New Date(2016, 1, 31)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetLibroDiario(FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlTipoPoliza.SelectedValue.Toentero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
ImgExcel.Visible = True
|
||||
Imprimir.Visible = True
|
||||
|
||||
Else
|
||||
ImgExcel.Visible = False
|
||||
Imprimir.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(4).Visible = False
|
||||
e.Row.Cells(5).Text = ""
|
||||
e.Row.Cells(5).Visible = False
|
||||
e.Row.Cells(6).Text = ""
|
||||
e.Row.Cells(6).Visible = False
|
||||
e.Row.Cells(7).Text = ""
|
||||
e.Row.Cells(7).Visible = False
|
||||
e.Row.Cells(8).Text = ""
|
||||
e.Row.Cells(8).Visible = False
|
||||
e.Row.Cells(3).ColumnSpan = 6
|
||||
e.Row.CssClass = "SubTotales" '
|
||||
End If
|
||||
|
||||
'DETALLE
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 2 Then
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
If e.Row.DBCampo("TipoMovto") = "True" Then
|
||||
e.Row.Cells(7).Text = ""
|
||||
Else
|
||||
e.Row.Cells(8).Text = ""
|
||||
End If
|
||||
'e.Row.Cells(7).Text = If(e.Row.Cells(7).Text.ToEntero() > 0, e.Row.Cells(7).Text, "")
|
||||
'e.Row.Cells(8).Text = If(e.Row.Cells(8).Text.ToEntero() > 0, e.Row.Cells(8).Text, "")
|
||||
End If
|
||||
|
||||
'SUBTOTAL
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 3 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).Text = "Total:"
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 4 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).Text = "Total:"
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
'DtDatos = DtDatos
|
||||
ImprimirReporte()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
'DtDatos = DtDatos
|
||||
ImprimirReporte("EXCEL")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("FechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("FechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(DirectorioEmpresas + "\Grales\Formatos\LibroDiario.rpt", DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
@@ -1,246 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
||||
<style>
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
tr {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
td {
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Movimientos Auxiliares del Catálogo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
||||
Tipo
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" id="divProyecto" runat="server">
|
||||
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontrarios movimientos."
|
||||
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
||||
<HeaderTemplate>
|
||||
<table width="100%" style="border: none">
|
||||
<tr>
|
||||
<td colspan="3"><font size="2">Cuenta</font></td>
|
||||
<td colspan="1"><font size="2">Nombre</font></td>
|
||||
<td colspan="4"></td>
|
||||
<td><font size="2">Saldo Inicial</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="60px" align="center">Fecha</td>
|
||||
<td width="60px" align="center">Tipo</td>
|
||||
<td width="60px" align="center">Número</td>
|
||||
<td width="300px" align="left">Concepto</td>
|
||||
<td width="100px" align="center">Referencia</td>
|
||||
<td width="100px" align="center">Referencia Movto</td>
|
||||
<td width="100px" align="center">SubProyecto</td>
|
||||
<td width="100px" align="center">Cargos</td>
|
||||
<td width="100px" align="center">Abonos</td>
|
||||
<td width="100px" align="center">Saldo</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table width="100%" style="border: none">
|
||||
<tr runat="server" id="tr1">
|
||||
<td colspan="3" align="left" width="180px">
|
||||
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="1" align="left" width="300px">
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</td>
|
||||
<td colspan="2" width="200px"></td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">Saldo Inicial:
|
||||
</td>
|
||||
<td style="font-weight: normal;" align="right" width="100px">
|
||||
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="tr2">
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
</td>
|
||||
|
||||
<td width="300px" align="left">
|
||||
<div class="truncate" style="width: 300px;">
|
||||
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>'></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="60px" style="border: 0px;" align="center">
|
||||
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
|
||||
</td>
|
||||
<td width="100px">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,456 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtTotales As DataTable
|
||||
Get
|
||||
DtTotales = DirectCast(ViewState("DtTotales"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtTotales") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TotalPadre As Boolean
|
||||
Get
|
||||
TotalPadre = CBool(ViewState("TotalPadre"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("TotalPadre") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTCuentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As String
|
||||
Get
|
||||
TipoReporte = ViewState("TP").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("TP") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Cuenta As String
|
||||
Get
|
||||
Return ViewState("Cuenta").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Cuenta") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
|
||||
' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros As Boolean = True
|
||||
|
||||
CargaTipoCuentas()
|
||||
'TxtCuenta.Enabled = False
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
|
||||
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
|
||||
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
|
||||
|
||||
FechaFin = Request("FF").ToDate
|
||||
txtFechaF.Text = FechaFin.ToShortDateString
|
||||
|
||||
DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero)
|
||||
|
||||
|
||||
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
|
||||
FechaInicio = Request("FI").ToDate
|
||||
txtFechaI.Text = FechaInicio.ToShortDateString
|
||||
Else
|
||||
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
|
||||
TxtFechaF.Text = FechaInicio.ToShortDateString
|
||||
End If
|
||||
|
||||
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
|
||||
DdlProyecto.SelectedValueExist(Request("CveProyecto"))
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto"))
|
||||
End If
|
||||
|
||||
ErrorParametros = False
|
||||
|
||||
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
|
||||
TipoReporte = Request("TP").ToString
|
||||
|
||||
' DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
|
||||
|
||||
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
|
||||
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
|
||||
''Else
|
||||
'' DdlTipoCuentas.SelectedValue = "-2"
|
||||
'' TxtCuenta.Enabled = True
|
||||
|
||||
'' If DTCuentas.FiltraParametros(String.Format("Cvecuenta = {0}", IdCuenta)).Rows.Count > 0 Then
|
||||
'' TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("CveCuenta = {0}", IdCuenta)).Rows(0)("Codigo").ToString
|
||||
'' End If
|
||||
''End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorParametros Then
|
||||
TotalPadre = True
|
||||
TipoReporte = "1"
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
' Imprimir_click(sender, e)
|
||||
'RegistraScript("Enable();")
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Public Function WSCuentas() As String
|
||||
Dim Str As New StringBuilder
|
||||
Dim i As Integer = 0
|
||||
Dim dt As DataTable = DTCuentas
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
Private Sub CargaTipoCuentas()
|
||||
|
||||
Dim ObjTipoCuenta As New ClsContabilidad
|
||||
DdlCuentas.Enabled = True
|
||||
|
||||
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DTCuentas = ObjTipoCuenta.DtResultados
|
||||
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
|
||||
|
||||
End If
|
||||
ObjTipoCuenta.Dispose()
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToString
|
||||
If TipoReporte = "1" And DdlCuentas.SelectedValue.ToEntero < 0 Then
|
||||
Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Cuenta = DdlCuentas.SelectedItem.ToString
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
DtTotales = DtDatos.Clone
|
||||
|
||||
CargaGrid()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub InsertaTotales()
|
||||
Dim i As Integer = 0
|
||||
Dim Aumento As Integer = 0
|
||||
Dim Row As DataRow
|
||||
Dim Row2 As DataRow
|
||||
|
||||
'Llena DtTotales
|
||||
For Each dr As DataRow In DtDatos.Rows
|
||||
If dr("Concepto").ToString = "" Then
|
||||
|
||||
Row = DtTotales.NewRow
|
||||
|
||||
Row("CveCuenta") = -1
|
||||
Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME"))
|
||||
Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME"))
|
||||
Row("Saldo") = dr("SaldoActual")
|
||||
Row("CtaMayor") = dr("CtaMayor")
|
||||
Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
|
||||
Row("Nombre") = dr("Nombre")
|
||||
DtTotales.Rows.Add(Row)
|
||||
Row("Clasificacion") = i
|
||||
End If
|
||||
|
||||
i += 1
|
||||
Next
|
||||
|
||||
'Inserta Totales en DtDatos
|
||||
For Each dr As DataRow In DtTotales.Rows
|
||||
i = 0
|
||||
|
||||
If dr("CtaMayor").ToString = "1" Then
|
||||
DtDatos.ImportRow(dr)
|
||||
End If
|
||||
|
||||
If dr("CtaMayor").ToString = "2" Then
|
||||
For index As Integer = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then
|
||||
i = index
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Row2 = DtDatos.NewRow
|
||||
Row2.ItemArray = dr.ItemArray
|
||||
|
||||
DtDatos.Rows.InsertAt(Row2, i + Aumento)
|
||||
Aumento += 1
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "G R I D - GV DATOS"
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
'GvDatos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Concepto") = "" Then
|
||||
e.Row.ControlStyle.Font.Bold = True
|
||||
e.Row.ControlStyle.Height = 35
|
||||
|
||||
'Cuando es Titulo
|
||||
If e.Row.DBCampo("SaldoActual") = "" Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Visible = False
|
||||
|
||||
|
||||
'Cuando Es Total
|
||||
Else
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
|
||||
'Anterior para TotalPadre
|
||||
'If e.Row.DBCampo("CtaMayor").ToString = "2" And (e.Row.DBCampo("Nivel3").ToString <> "" Xor e.Row.DBCampo("Orden").ToString.Length = 18) Then
|
||||
' e.Row.FCLabel("LbReferencia").Text = "Total:"
|
||||
'Else
|
||||
' e.Row.FCLabel("LbConcepto").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
|
||||
'End If
|
||||
|
||||
If TotalPadre Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "1px"
|
||||
'CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3))
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Align = "Right"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "400px"
|
||||
If e.Row.RowIndex + 1 = DtDatos.Rows.Count Then
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(5).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(6).Attributes.Add("style", "border-top: 1px solid black;")
|
||||
End If
|
||||
e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
|
||||
|
||||
|
||||
Else
|
||||
TotalPadre = True
|
||||
e.Row.FCLabel("LbReferencia").Font.Bold = False
|
||||
e.Row.FCLabel("LbReferencia").Text = "Total:"
|
||||
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Align = "Right"
|
||||
End If
|
||||
|
||||
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
|
||||
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
End If
|
||||
|
||||
Else
|
||||
TotalPadre = False
|
||||
e.Row.ControlStyle.Font.Bold = False
|
||||
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza"))
|
||||
|
||||
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If("1" = "1", 2, 4))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'COLOREA NEGATIVOS
|
||||
If e.Row.FCLabel("LbCargos").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbAbonos").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbSaldo").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If e.Row.FCLabel("LbSaldoInicial").Text.ToDouble < 0 Then
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
|
||||
Else
|
||||
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
If DdlCuentas.SelectedValue.ToEntero = -1 Then
|
||||
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
|
||||
Else
|
||||
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
|
||||
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
|
||||
|
||||
DtDatos = DtDatos
|
||||
ImprimirReporte()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
|
||||
'Dim htmlTabe As New HtmlTable
|
||||
'Dim RutaLogo As String = $"{UsuarioActual.Empresa.Ruta}Logo.png"
|
||||
'Dim strinLiteral As String = ""
|
||||
|
||||
'Dim EncabezadoLiteral As New LiteralControl
|
||||
|
||||
|
||||
|
||||
'If System.IO.File.Exists(RutaLogo) Then
|
||||
' RutaLogo = $"http://{Request.Url.Host }/Empresas/{UsuarioActual.CveEmpresa}/Logo.png"
|
||||
|
||||
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'><img width='200px' height='150px' style='max-height:150px!important;max-width:200px!important' src='{RutaLogo}' /> </td>
|
||||
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
|
||||
' </tr>
|
||||
' <tr>
|
||||
' <td style='text-align:left;' colspan='6'>
|
||||
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
|
||||
' <td>
|
||||
' </tr>
|
||||
' </table>"
|
||||
'Else
|
||||
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> </td>
|
||||
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
|
||||
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
|
||||
' </tr>
|
||||
' <tr>
|
||||
' <td style='text-align:left;' colspan='9'>
|
||||
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
|
||||
' <td>
|
||||
|
||||
' <tr>
|
||||
' </table>"
|
||||
'End If
|
||||
|
||||
'EncabezadoLiteral.Text = strinLiteral
|
||||
'GvDatos.ExportToExcel($"MovimientosAuxiliares_{NowADS().ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("CveMoneda", "1"))
|
||||
params.Add(New ReportParameter("Cuenta", Cuenta))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,360 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Contabilidad2_RepOrigenAplicacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region " PROPIEDADES NORMAL "
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " PROPIEDADES ANUAL "
|
||||
Private Property DtDatosAnual As DataTable
|
||||
Get
|
||||
DtDatosAnual = DirectCast(ViewState("DtDatosAnual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosAnual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Anos As Integer
|
||||
Get
|
||||
Anos = ViewState("Anos").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Anos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatosMensual As DataTable
|
||||
Get
|
||||
DtDatosMensual = DirectCast(ViewState("DtDatosMensual"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatosMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If UsuarioActual.Empresa.UsaAC Then
|
||||
' TipoReporte = -1
|
||||
'Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
'End If
|
||||
|
||||
'Normal
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
'Anual
|
||||
Anos = 0
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
|
||||
CargaDatos()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
|
||||
CargaDatosMensual()
|
||||
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
|
||||
CargaDatosAnual()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TabContainer_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
'Nota:
|
||||
' 0 = Normal
|
||||
' 1 = Mensual
|
||||
' 2 = Anual
|
||||
|
||||
'Esconde Todo de lo variable de Filtros
|
||||
TdSubTotales.Visible = False
|
||||
TdEjercicio.Visible = False
|
||||
TdFI.Visible = False
|
||||
TdFF.Visible = False
|
||||
|
||||
If TabContainer.ActiveTabIndex = 0 Then
|
||||
TdFI.Visible = True
|
||||
TdFF.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 1 Then
|
||||
TdEjercicio.Visible = True
|
||||
TdSubTotales.Visible = True
|
||||
ElseIf TabContainer.ActiveTabIndex = 2 Then
|
||||
TdEjercicio.Visible = True
|
||||
End If
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
BtnConsultar_Click(BtnConsultar, EventArgs.Empty)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " NORMAL "
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
' Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio)
|
||||
' Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
Dim FechaI = String.Format("{0}/{1}/{2}", FechaInicio.Day, FechaInicio.Month, FechaInicio.Year)
|
||||
Dim FechaF = String.Format("{0}/{1}/{2}", FechaFin.Day, FechaFin.Month, FechaFin.Year)
|
||||
|
||||
If ObjConta.GetOrigenAplicacion(FechaI, FechaF, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
CargaGrid()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
''Titulo y Sumatoria de cambios
|
||||
'If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then
|
||||
' e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
'End If
|
||||
|
||||
''CUENTAS
|
||||
'If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then
|
||||
' e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
'End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("Nombre").ToString.Trim = "" Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Text = "TOTAL"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " MENSUAL "
|
||||
Private Sub CargaDatosMensual()
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetOrigenAplicacionMensual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosMensual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosMensual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
EscondeSubtotales()
|
||||
|
||||
|
||||
If DtDatosMensual IsNot Nothing Then
|
||||
CargaGridMensual()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub EscondeSubtotales()
|
||||
|
||||
'Esconde Trimestral
|
||||
GvDatosMensual.Columns(4).Visible = False
|
||||
GvDatosMensual.Columns(9).Visible = False
|
||||
GvDatosMensual.Columns(14).Visible = False
|
||||
GvDatosMensual.Columns(18).Visible = False
|
||||
|
||||
'Esconde Cuatrimestral
|
||||
GvDatosMensual.Columns(6).Visible = False
|
||||
GvDatosMensual.Columns(12).Visible = False
|
||||
GvDatosMensual.Columns(19).Visible = False
|
||||
|
||||
If DdlSubtotales.SelectedValue = "2" Then
|
||||
GvDatosMensual.Columns(4).Visible = True
|
||||
GvDatosMensual.Columns(9).Visible = True
|
||||
GvDatosMensual.Columns(14).Visible = True
|
||||
GvDatosMensual.Columns(18).Visible = True
|
||||
ElseIf DdlSubtotales.SelectedValue = "3" Then
|
||||
GvDatosMensual.Columns(6).Visible = True
|
||||
GvDatosMensual.Columns(12).Visible = True
|
||||
GvDatosMensual.Columns(19).Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGridMensual()
|
||||
GvDatosMensual.DataSource = DtDatosMensual
|
||||
GvDatosMensual.DataBind()
|
||||
UpDatosMensual.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosMensual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosMensual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ANUAL "
|
||||
Private Sub CargaDatosAnual()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
|
||||
|
||||
If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtDatosAnual = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatosAnual = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de origen y aplicación de recursos", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
|
||||
If DtDatosAnual IsNot Nothing Then
|
||||
CargaGridAnual()
|
||||
End If
|
||||
|
||||
'Esconde todo
|
||||
For index = 1 To 12
|
||||
GvDatosAnual.Columns(index).Visible = False
|
||||
Next
|
||||
|
||||
For index = 1 To Anos
|
||||
GvDatosAnual.Columns(index).Visible = True
|
||||
GvDatosAnual.HeaderRow.FCLabel("LbAno" + index.ToString).Text = (DdlEjercicio.SelectedValue.ToEntero + index - 1).ToString
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGridAnual()
|
||||
GvDatosAnual.DataSource = DtDatosAnual
|
||||
GvDatosAnual.DataBind()
|
||||
UpDatosAnual.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosAnual_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAnual.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'AGRUPADOR DE CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 2 Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
'CUENTAS
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;")
|
||||
End If
|
||||
|
||||
'TOTALES
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid;")
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,631 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinanciera.aspx.vb" Inherits="AC2_SituacionFinanciera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Situación Financiera" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCerrar" runat="server" Visible="false"><i class="fa-solid fa-shield" ></i> Cerrar Ejercicio</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Ejercicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Periodo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100%" 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>
|
||||
</div>
|
||||
<label class="col-md-1" style="display: none;">SubProyecto: </label>
|
||||
<div class="col-md-2" style="display: none;">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||
<asp:ListItem Value ="2">Consolidado</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-4 truncate" >Tipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Con Firma:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkFirma" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Nivel 2:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkNivel" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpActivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPasivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="CAPITAL" ID="LtlTituloHacienda" runat="server" />
|
||||
</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpPatrimonio" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPatrimonio" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO CONTRIBUIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvUtilidad" ShowHeader="false" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioGenerado" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO GENERADO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioActualizacion" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="EXCESO O INSUFICIENCIA DE ACTUALIZACION"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Capital:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual" Font-Size="12pt"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td style="text-align: center; width: 50%;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalPasivoPatrimonio" Text="Total del Pasivo y Capital:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual" Font-Size="12pt"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ModalCierre" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEditarFecha" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlCierre" Text="Cierre de Ejercicio" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicioCierre" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnCierre" runat="server" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VgmEditarFecha" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,645 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC2_SituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Balance General"
|
||||
End If
|
||||
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaEjercicios()
|
||||
|
||||
If UsuarioActual.Empresa.GrupoEmpresa > 0 And UsuarioActual.CveRol = 1 Then
|
||||
DVConsolidado1.Visible = True
|
||||
DVConsolidado2.Visible = True
|
||||
End If
|
||||
|
||||
'CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Clsconta As New ClsContabilidad
|
||||
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Clsconta.DtResultados
|
||||
DdlEjercicioCierre.DataSource = Clsconta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
DdlEjercicioCierre.DataSource = Nothing
|
||||
End If
|
||||
Clsconta.Dispose()
|
||||
DdlEjercicioCierre.DataBind()
|
||||
DdlEjercicioCierre.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(346) Then LnkCerrar.Visible = True
|
||||
|
||||
'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF As String = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte, Opcion:=DdlOpcion.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrids()
|
||||
|
||||
If GvPatrimonio.HeaderRow IsNot Nothing Then
|
||||
GvPatrimonio.HeaderRow.FCLabel("LbTitulo").Text = "CAPITAL CONTABLE"
|
||||
End If
|
||||
|
||||
SumaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
If Not ChkNivel.Checked Then
|
||||
DtDatos = DtDatos.FiltraParametros("Level < 3")
|
||||
End If
|
||||
|
||||
Dim DtActivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1")
|
||||
Dim DtActivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ")
|
||||
Dim DtActivoDiferido As DataTable = DtDatos.FiltraParametros(" TipoCuenta=9 ")
|
||||
|
||||
' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ")
|
||||
' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ")
|
||||
Dim Row As DataRow = DtActivoCirculante.NewRow
|
||||
|
||||
If DtActivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
Row = DtActivoNoCirculante.NewRow
|
||||
If DtActivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtActivoDiferido.NewRow
|
||||
If DtActivoDiferido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = DtActivoDiferido.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoDiferido.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoDiferido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoDiferido.Rows.Add(Row)
|
||||
|
||||
GvActivo.DataSource = DtActivoCirculante
|
||||
GvActivo.DataBind()
|
||||
GvActivoNoCirculante.DataSource = DtActivoNoCirculante
|
||||
GvActivoNoCirculante.DataBind()
|
||||
|
||||
GvActivoDiferido.DataSource = DtActivoDiferido
|
||||
GvActivoDiferido.DataBind()
|
||||
UpActivo.Update()
|
||||
|
||||
|
||||
'PASIVO
|
||||
Dim DtPasivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3")
|
||||
Dim DtPasivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4")
|
||||
|
||||
'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ")
|
||||
'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ")
|
||||
|
||||
Row = DtPasivoCirculante.NewRow
|
||||
If DtPasivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtPasivoNoCirculante.NewRow
|
||||
If DtPasivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoNoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoNoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPasivo.DataSource = DtPasivoCirculante
|
||||
GvPasivo.DataBind()
|
||||
GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante
|
||||
GvPasivoNoCirculante.DataBind()
|
||||
UpPasivo.Update()
|
||||
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido As DataTable = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
||||
'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
||||
|
||||
'Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00031%' ")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00032%' ")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00033%' ")
|
||||
|
||||
Row = DtPatrimonioContribuido.NewRow
|
||||
If DtPatrimonioContribuido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL CAPITAL"
|
||||
Row.Item("ImporteActual") = DtPatrimonioContribuido.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioContribuido.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPatrimonioContribuido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL CAPITAL"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioContribuido.Rows.Add(Row)
|
||||
|
||||
''Row = DtPatrimonioGenerado.NewRow
|
||||
''If DtPatrimonioGenerado.Rows.Count > 0 Then
|
||||
'' Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'' 'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)"
|
||||
'' Row.Item("ImporteActual") = DtPatrimonioGenerado.SUM("ImporteActual").ToString
|
||||
'' Row.Item("ImporteAnterior") = DtPatrimonioGenerado.SUM("ImporteAnterior").ToString
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
'' 'DtPatrimonioGenerado.Rows.RemoveAt(0)
|
||||
''Else
|
||||
'' Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'' Row.Item("ImporteActual") = "0.00"
|
||||
'' Row.Item("ImporteAnterior") = "0.00"
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
''End If
|
||||
''DtPatrimonioGenerado.Rows.Add(Row)
|
||||
|
||||
''Row = DtPatrimonioActualizacion.NewRow
|
||||
''If DtPatrimonioActualizacion.Rows.Count > 0 Then
|
||||
'' Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
'' Row.Item("ImporteActual") = DtPatrimonioActualizacion.SUM("ImporteActual").ToString
|
||||
'' Row.Item("ImporteAnterior") = DtPatrimonioActualizacion.SUM("ImporteAnterior").ToString
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
'' 'DtPatrimonioActualizacion.Rows.RemoveAt(0)
|
||||
''Else
|
||||
'' Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
'' Row.Item("ImporteActual") = "0.00"
|
||||
'' Row.Item("ImporteAnterior") = "0.00"
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
''End If
|
||||
''DtPatrimonioActualizacion.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPatrimonio.DataSource = DtPatrimonioContribuido
|
||||
GvPatrimonio.DataBind()
|
||||
'GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado
|
||||
'GvPatrimonioGenerado.DataBind()
|
||||
'GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion
|
||||
'GvPatrimonioActualizacion.DataBind()
|
||||
|
||||
'GvUtilidad.DataSource = DtUtilidad
|
||||
'GvUtilidad.DataBind()
|
||||
|
||||
UpPatrimonio.Update()
|
||||
End Sub
|
||||
Private Sub SumaTotales()
|
||||
TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual
|
||||
TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior
|
||||
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero
|
||||
LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero
|
||||
LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
|
||||
Dim Descuadre As Boolean = False
|
||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||
If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
'If Math.Round(TotalActivoAnterior, 2) <> Math.Round(TotalPasivoPatrimonioAnterior, 2) Then
|
||||
' LbTotalActivoAnterior.ForeColor = Drawing.Color.Red
|
||||
' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red
|
||||
' Descuadre = True
|
||||
'Else
|
||||
' LbTotalActivoAnterior.ForeColor = Drawing.Color.Black
|
||||
' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black
|
||||
'End If
|
||||
|
||||
If Descuadre Then
|
||||
LbDescuadre.Text = "Las sumas de los totales están descuadradas."
|
||||
Else
|
||||
LbDescuadre.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'If ObjConta.GetSituacionFinanciera("01/01/2000".ToDate, FechaF.ToDate, DdlTipoReporte.SelectedValue.ToEntero) Then
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
' 'If ChkFirma.Checked = True Then
|
||||
|
||||
' ' Dim Row As DataRow = DtDatos.NewRow
|
||||
' ' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "")
|
||||
' ' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "")
|
||||
' ' Row.Item("ImporteActual") = "0"
|
||||
' ' Row.Item("ImporteAnterior") = "0"
|
||||
' ' Row.Item("Tipo") = "Firma"
|
||||
' ' DtDatos.Rows.Add(Row)
|
||||
' 'End If
|
||||
'End If
|
||||
'ObjConta.Dispose()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
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("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Totales
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CveCuenta") <> "55276" Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FI={1}&FF={2}&TP={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.FirstDayOfMonth.ToShortDateString, e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").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("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF As String = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
Dim fileName As String = "EdoSituacionFinanciera"
|
||||
Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc"
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("{0}", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("{0}l", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
|
||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString)))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCerrar_Click(sender As Object, e As EventArgs) Handles LnkCerrar.Click
|
||||
RegistraScript("$('#ModalCierre').modal()")
|
||||
CargaCtaContableE()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCierre_Click(sender As Object, e As EventArgs) Handles BtnCierre.Click
|
||||
Dim objConta As New ClsContabilidad
|
||||
Dim FechaIncio As String = String.Format("{0}/01/01", DdlEjercicioCierre.SelectedValue.ToString)
|
||||
Dim FechaFin As String = String.Format("{0}/12/31", DdlEjercicioCierre.SelectedValue.ToString)
|
||||
Dim CvePrepoliza As Integer = objConta.CierreEjercicio(UsuarioActual.CveEmpresa, DdlEjercicioCierre.SelectedValue.ToEntero, DdlCuentas.SelectedValue.ToEntero, FechaIncio, FechaFin, UsuarioActual.CveUsuario)
|
||||
If CvePrepoliza > 0 Then
|
||||
Alert(String.Format("Se realizo el cierre correctamente: <br/> <b> Poliza: </b> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrepoliza={0}'>{0}</a>", CvePrepoliza), TipoMensaje.MsgInformacion)
|
||||
objConta.Commit()
|
||||
Else
|
||||
Alert("Ocurrio un error al realizar el cierre", TipoMensaje.MsgError)
|
||||
objConta.RollBack()
|
||||
End If
|
||||
objConta.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCtaContableE()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCuentas.DataSource = ObjConta.DtResultados.FiltraParametros("Tipo = 'F' or Tipo = 'E' ", "")
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
DdlCuentas.DataBind()
|
||||
DdlCuentas.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,601 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC2_SituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Balance General"
|
||||
End If
|
||||
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaEjercicios()
|
||||
|
||||
'CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Clsconta As New ClsContabilidad
|
||||
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Clsconta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
Clsconta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
|
||||
'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrids()
|
||||
|
||||
If GvPatrimonio.HeaderRow IsNot Nothing Then
|
||||
GvPatrimonio.HeaderRow.FCLabel("LbTitulo").Text = "CAPITAL CONTABLE"
|
||||
End If
|
||||
|
||||
SumaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
If Not ChkNivel.Checked Then
|
||||
DtDatos = DtDatos.FiltraParametros("Level < 3")
|
||||
End If
|
||||
|
||||
Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1")
|
||||
Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ")
|
||||
Dim DtActivoDiferido = DtDatos.FiltraParametros(" TipoCuenta=9 ")
|
||||
|
||||
' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ")
|
||||
' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ")
|
||||
Dim Row As DataRow = DtActivoCirculante.NewRow
|
||||
|
||||
If DtActivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
Row = DtActivoNoCirculante.NewRow
|
||||
If DtActivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtActivoNoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoNoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtActivoDiferido.NewRow
|
||||
If DtActivoDiferido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = DtActivoDiferido.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtActivoDiferido.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoDiferido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO DIFERIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoDiferido.Rows.Add(Row)
|
||||
|
||||
GvActivo.DataSource = DtActivoCirculante
|
||||
GvActivo.DataBind()
|
||||
GvActivoNoCirculante.DataSource = DtActivoNoCirculante
|
||||
GvActivoNoCirculante.DataBind()
|
||||
|
||||
GvActivoDiferido.DataSource = DtActivoDiferido
|
||||
GvActivoDiferido.DataBind()
|
||||
UpActivo.Update()
|
||||
|
||||
|
||||
'PASIVO
|
||||
Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3")
|
||||
Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4")
|
||||
|
||||
'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ")
|
||||
'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ")
|
||||
|
||||
Row = DtPasivoCirculante.NewRow
|
||||
If DtPasivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoCirculante.Rows.Add(Row)
|
||||
|
||||
Row = DtPasivoNoCirculante.NewRow
|
||||
If DtPasivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = DtPasivoNoCirculante.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPasivoNoCirculante.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPasivo.DataSource = DtPasivoCirculante
|
||||
GvPasivo.DataBind()
|
||||
GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante
|
||||
GvPasivoNoCirculante.DataBind()
|
||||
UpPasivo.Update()
|
||||
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)")
|
||||
Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
||||
Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
||||
Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
||||
|
||||
'Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00031%' ")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00032%' ")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00033%' ")
|
||||
|
||||
Row = DtPatrimonioContribuido.NewRow
|
||||
If DtPatrimonioContribuido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL CAPITAL"
|
||||
Row.Item("ImporteActual") = DtPatrimonioContribuido.SUM("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = DtPatrimonioContribuido.SUM("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPatrimonioContribuido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL CAPITAL"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioContribuido.Rows.Add(Row)
|
||||
|
||||
''Row = DtPatrimonioGenerado.NewRow
|
||||
''If DtPatrimonioGenerado.Rows.Count > 0 Then
|
||||
'' Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'' 'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)"
|
||||
'' Row.Item("ImporteActual") = DtPatrimonioGenerado.SUM("ImporteActual").ToString
|
||||
'' Row.Item("ImporteAnterior") = DtPatrimonioGenerado.SUM("ImporteAnterior").ToString
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
'' 'DtPatrimonioGenerado.Rows.RemoveAt(0)
|
||||
''Else
|
||||
'' Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'' Row.Item("ImporteActual") = "0.00"
|
||||
'' Row.Item("ImporteAnterior") = "0.00"
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
''End If
|
||||
''DtPatrimonioGenerado.Rows.Add(Row)
|
||||
|
||||
''Row = DtPatrimonioActualizacion.NewRow
|
||||
''If DtPatrimonioActualizacion.Rows.Count > 0 Then
|
||||
'' Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
'' Row.Item("ImporteActual") = DtPatrimonioActualizacion.SUM("ImporteActual").ToString
|
||||
'' Row.Item("ImporteAnterior") = DtPatrimonioActualizacion.SUM("ImporteAnterior").ToString
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
'' 'DtPatrimonioActualizacion.Rows.RemoveAt(0)
|
||||
''Else
|
||||
'' Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
'' Row.Item("ImporteActual") = "0.00"
|
||||
'' Row.Item("ImporteAnterior") = "0.00"
|
||||
'' Row.Item("CtaMayor") = -1
|
||||
''End If
|
||||
''DtPatrimonioActualizacion.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPatrimonio.DataSource = DtPatrimonioContribuido
|
||||
GvPatrimonio.DataBind()
|
||||
'GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado
|
||||
'GvPatrimonioGenerado.DataBind()
|
||||
'GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion
|
||||
'GvPatrimonioActualizacion.DataBind()
|
||||
|
||||
'GvUtilidad.DataSource = DtUtilidad
|
||||
'GvUtilidad.DataBind()
|
||||
|
||||
UpPatrimonio.Update()
|
||||
End Sub
|
||||
Private Sub SumaTotales()
|
||||
TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual
|
||||
TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior
|
||||
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero
|
||||
LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero
|
||||
LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
|
||||
Dim Descuadre = False
|
||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||
If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
'If Math.Round(TotalActivoAnterior, 2) <> Math.Round(TotalPasivoPatrimonioAnterior, 2) Then
|
||||
' LbTotalActivoAnterior.ForeColor = Drawing.Color.Red
|
||||
' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red
|
||||
' Descuadre = True
|
||||
'Else
|
||||
' LbTotalActivoAnterior.ForeColor = Drawing.Color.Black
|
||||
' LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black
|
||||
'End If
|
||||
|
||||
If Descuadre Then
|
||||
LbDescuadre.Text = "Las sumas de los totales están descuadradas."
|
||||
Else
|
||||
LbDescuadre.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'If ObjConta.GetSituacionFinanciera("01/01/2000".ToDate, FechaF.ToDate, DdlTipoReporte.SelectedValue.ToEntero) Then
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
' 'If ChkFirma.Checked = True Then
|
||||
|
||||
' ' Dim Row As DataRow = DtDatos.NewRow
|
||||
' ' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "")
|
||||
' ' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "")
|
||||
' ' Row.Item("ImporteActual") = "0"
|
||||
' ' Row.Item("ImporteAnterior") = "0"
|
||||
' ' Row.Item("Tipo") = "Firma"
|
||||
' ' DtDatos.Rows.Add(Row)
|
||||
' 'End If
|
||||
'End If
|
||||
'ObjConta.Dispose()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
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("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Totales
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
ElseIf e.Row.DBCampo("CveCuenta") <> "55276" Then
|
||||
e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").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("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "EdoSituacionFinanciera"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepSituacionFinanciera.rdlc"
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,692 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepSituacionFinancieraSAT.aspx.vb" Inherits="AC2_SituacionFinanciera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtTitulo" Text="Estado de Situación Financiera" runat="server" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" Text="Consultar" runat="server" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Periodo:</label>
|
||||
<div class="col-md-2" style="width: 130px;">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" 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>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="130px" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Con Firma:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkFirma" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Nivel 2:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkNivel" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left; margin-right: 20px;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<center>
|
||||
<h3>ACTIVO</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpActivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
<RowStyle CssClass="Texto" />
|
||||
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvActivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvActivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label6" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="ACTIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<table style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<center>
|
||||
<h3>PASIVO</h3>
|
||||
<asp:UpdatePanel ID="UpPasivo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPasivo" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label7" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label8" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoNoCirculante" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label9" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label10" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO NO CIRCULANTE"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPasivoDiferido" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPasivo_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label11" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label12" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PASIVO DIFERIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="275px" align="center">
|
||||
<h4>Total del Pasivo:</h4>
|
||||
</td>
|
||||
<td width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivo" width="100px" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<center>
|
||||
<h3>
|
||||
<asp:Literal Text="HACIENDA PÚBLICA/PATRIMONIO" ID="LtlTituloHacienda" runat="server" />
|
||||
</h3>
|
||||
|
||||
<asp:UpdatePanel ID="UpPatrimonio" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPatrimonio" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label13" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label14" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO CONTRIBUIDO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvUtilidad" ShowHeader="false" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label15" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label16" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioGenerado" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label17" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label18" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="PATRIMONIO GENERADO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPatrimonioActualizacion" Style="max-width: 550px;" Width="90%" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvPatrimonio_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label19" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="5%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="Label20" runat="server" Style="padding-left: 20px;" Text="CODIGO"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50%" HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Text="EXCESO O INSUFICIENCIA DE ACTUALIZACION"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbActual" runat="server" Text='<%# Eval("ImporteActual", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
|
||||
<%--<asp:Label ID="LbAnterior" runat="server" Text='<%# Eval("ImporteAnterior", "{0:N2}")%>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<%--<HeaderStyle CssClass="TitulosChico"></HeaderStyle>--%>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</center>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalHacienda" Text="Total Hacienda Pública/Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPatrimonio" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td width="50%" style="text-align: center;">
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<center>
|
||||
<table style="max-width: 550px; width: 90%;">
|
||||
<tr>
|
||||
<td style="text-align: center; width: 50%;">
|
||||
<h4>
|
||||
<asp:Literal ID="LtlTotalPasivoPatrimonio" Text="Total del Pasivo y Patrimonio:" runat="server" />
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:Label runat="server" ID="LbDescuadre" ForeColor="Red" Font-Bold="false" Font-Size="Small"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,599 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AC2_SituacionFinanciera
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoActual As Double
|
||||
Get
|
||||
TotalActivoActual = ViewState("TotalActivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActivoAnterior As Double
|
||||
Get
|
||||
TotalActivoAnterior = ViewState("TotalActivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoActual As Double
|
||||
Get
|
||||
TotalPasivoActual = ViewState("TotalPasivoActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoAnterior As Double
|
||||
Get
|
||||
TotalPasivoAnterior = ViewState("TotalPasivoAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioActual As Double
|
||||
Get
|
||||
TotalPatrimonioActual = ViewState("TotalPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPatrimonioAnterior = ViewState("TotalPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioActual As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioActual = ViewState("TotalPasivoPatrimonioActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalPasivoPatrimonioAnterior As Double
|
||||
Get
|
||||
TotalPasivoPatrimonioAnterior = ViewState("TotalPasivoPatrimonioAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalPasivoPatrimonioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaInicioActual As Date
|
||||
Get
|
||||
FechaInicioActual = ViewState("FechaInicioActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinActual As Date
|
||||
Get
|
||||
FechaFinActual = ViewState("FechaFinActual").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicioAnterior As Date
|
||||
Get
|
||||
FechaInicioAnterior = ViewState("FechaInicioAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicioAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFinAnterior As Date
|
||||
Get
|
||||
FechaFinAnterior = ViewState("FechaFinAnterior").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFinAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoReporte As Integer
|
||||
Get
|
||||
TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TipoReporte = -1
|
||||
Else
|
||||
TipoReporte = 1
|
||||
tdTipoReporte.Visible = True
|
||||
LtTitulo.Text = "Balance General"
|
||||
End If
|
||||
|
||||
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaEjercicios()
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Clsconta As New ClsContabilidad
|
||||
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = Clsconta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValue = NowADS().Year.ToString
|
||||
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
|
||||
'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
DdlPeriodo.SelectedValue = NowADS().Month.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvActivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
GvPasivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||
GvPasivo.Columns(2).HeaderText = (DdlEjercicio.SelectedValue.ToEntero - 1).ToString
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
If ObjConta.GetSituacionFinanciera("01/01/1900".ToDate, FechaF.ToDate, UsuarioActual.CveEmpresa, CveSubProyecto, TipoReporte, 1) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
CargaGrids()
|
||||
SumaTotales()
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del estado de situación financiera", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGrids()
|
||||
|
||||
'If Not ChkNivel.Checked Then
|
||||
' DtDatos = DtDatos.FiltraParametros("Level < 3")
|
||||
'End If
|
||||
Dim ImporteActual As Double
|
||||
Dim ImporteAnterior As Double
|
||||
Dim DtActivoCirculante = DtDatos.FiltraParametros("TipoCuenta=1")
|
||||
Dim DtActivoNoCirculante = DtDatos.FiltraParametros("TipoCuenta=2 ")
|
||||
ImporteActual = DtActivoCirculante.SUM("ImporteActual")
|
||||
ImporteAnterior = DtActivoCirculante.SUM("ImporteAnterior")
|
||||
|
||||
' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ")
|
||||
' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ")
|
||||
Dim Row As DataRow = DtActivoCirculante.NewRow
|
||||
|
||||
|
||||
If DtActivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = ImporteActual
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoCirculante.Rows.Add(Row)
|
||||
|
||||
ImporteActual = DtActivoNoCirculante.SUM("ImporteActual")
|
||||
ImporteAnterior = DtActivoNoCirculante.SUM("ImporteAnterior")
|
||||
|
||||
|
||||
Row = DtActivoNoCirculante.NewRow
|
||||
If DtActivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = ImporteActual
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtActivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL ACTIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtActivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
GvActivo.DataSource = DtActivoCirculante
|
||||
GvActivo.DataBind()
|
||||
GvActivoNoCirculante.DataSource = DtActivoNoCirculante
|
||||
GvActivoNoCirculante.DataBind()
|
||||
UpActivo.Update()
|
||||
|
||||
|
||||
'PASIVO
|
||||
Dim DtPasivoCirculante = DtDatos.FiltraParametros("TipoCuenta=3")
|
||||
Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("TipoCuenta=4")
|
||||
|
||||
'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ")
|
||||
'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ")
|
||||
|
||||
ImporteActual = DtPasivoCirculante.SUM("ImporteActual")
|
||||
ImporteAnterior = DtPasivoCirculante.SUM("ImporteAnterior")
|
||||
|
||||
|
||||
Row = DtPasivoCirculante.NewRow
|
||||
If DtPasivoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = ImporteActual
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoCirculante.Rows.Add(Row)
|
||||
|
||||
ImporteActual = DtPasivoNoCirculante.SUM("ImporteActual")
|
||||
ImporteAnterior = DtPasivoNoCirculante.SUM("ImporteAnterior")
|
||||
|
||||
Row = DtPasivoNoCirculante.NewRow
|
||||
If DtPasivoNoCirculante.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = ImporteActual
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPasivoNoCirculante.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PASIVO NO CIRCULANTE"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPasivoNoCirculante.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPasivo.DataSource = DtPasivoCirculante
|
||||
GvPasivo.DataBind()
|
||||
GvPasivoNoCirculante.DataSource = DtPasivoNoCirculante
|
||||
GvPasivoNoCirculante.DataBind()
|
||||
UpPasivo.Update()
|
||||
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("TipoCuenta=5")
|
||||
Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("TipoCuenta in (6,8)")
|
||||
Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("TipoCuenta=7")
|
||||
|
||||
'Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00031%' ")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00032%' ")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00033%' ")
|
||||
|
||||
ImporteActual = DtPatrimonioContribuido.SUM("ImporteActual")
|
||||
ImporteAnterior = DtPatrimonioContribuido.SUM("ImporteAnterior")
|
||||
|
||||
Row = DtPatrimonioContribuido.NewRow
|
||||
If DtPatrimonioContribuido.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO CONTRIBUIDO"
|
||||
Row.Item("ImporteActual") = ImporteActual 'DtPatrimonioContribuido.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior 'DtPatrimonioContribuido.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPatrimonioContribuido.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO CONTRIBUIDO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioContribuido.Rows.Add(Row)
|
||||
|
||||
Row = DtPatrimonioGenerado.NewRow
|
||||
|
||||
ImporteActual = 0
|
||||
ImporteAnterior = 0
|
||||
|
||||
If DtPatrimonioGenerado.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
'El id = 87 es el id de la cuenta "RESULTADOS DEL EJERCICIO:(AHORRO/DESAHORRO)"
|
||||
If DtPatrimonioGenerado.FiltraParametros("TipoCuenta=8").Rows.Count > 0 Then
|
||||
Row.Item("ImporteActual") = ImporteActual '(DtPatrimonioGenerado.Rows(0)("ImporteActual").ToString.ToDouble + DtPatrimonioGenerado.FiltroPrimero("TipoCuenta=8")("ImporteActual").ToString.ToDouble).ToString
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior '(DtPatrimonioGenerado.Rows(0)("ImporteAnterior").ToString.ToDouble + DtPatrimonioGenerado.FiltroPrimero("TipoCuenta=8")("ImporteAnterior").ToString.ToDouble).ToString
|
||||
Else
|
||||
Row.Item("ImporteActual") = ImporteActual
|
||||
Row.Item("ImporteAnterior") = ImporteAnterior
|
||||
End If
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPatrimonioGenerado.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL PATRIMONIO GENERADO"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioGenerado.Rows.Add(Row)
|
||||
|
||||
Row = DtPatrimonioActualizacion.NewRow
|
||||
If DtPatrimonioActualizacion.Rows.Count > 0 Then
|
||||
Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
Row.Item("ImporteActual") = "-1" ' DtPatrimonioActualizacion.Rows(0)("ImporteActual").ToString
|
||||
Row.Item("ImporteAnterior") = "-2" 'DtPatrimonioActualizacion.Rows(0)("ImporteAnterior").ToString
|
||||
Row.Item("CtaMayor") = -1
|
||||
'DtPatrimonioActualizacion.Rows.RemoveAt(0)
|
||||
Else
|
||||
Row.Item("Nombre") = " TOTAL EXCESO O INSUFICIENCIA EN LA ACTUALIZACION"
|
||||
Row.Item("ImporteActual") = "0.00"
|
||||
Row.Item("ImporteAnterior") = "0.00"
|
||||
Row.Item("CtaMayor") = -1
|
||||
End If
|
||||
DtPatrimonioActualizacion.Rows.Add(Row)
|
||||
|
||||
|
||||
GvPatrimonio.DataSource = DtPatrimonioContribuido
|
||||
GvPatrimonio.DataBind()
|
||||
GvPatrimonioGenerado.DataSource = DtPatrimonioGenerado
|
||||
GvPatrimonioGenerado.DataBind()
|
||||
GvPatrimonioActualizacion.DataSource = DtPatrimonioActualizacion
|
||||
GvPatrimonioActualizacion.DataBind()
|
||||
UpPatrimonio.Update()
|
||||
End Sub
|
||||
Private Sub SumaTotales()
|
||||
TotalPasivoPatrimonioActual = TotalPasivoActual + TotalPatrimonioActual
|
||||
TotalPasivoPatrimonioAnterior = TotalPasivoAnterior + TotalPatrimonioAnterior
|
||||
|
||||
'Llena Lb´s Totales
|
||||
LbTotalActivoActual.Text = TotalActivoActual.ToString.FormatoNumero
|
||||
LbTotalActivoAnterior.Text = TotalActivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoActual.Text = TotalPasivoActual.ToString.FormatoNumero
|
||||
LbTotalPasivoAnterior.Text = TotalPasivoAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPatrimonioActual.Text = TotalPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPatrimonioAnterior.Text = TotalPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
LbTotalPasivoPatrimonioActual.Text = TotalPasivoPatrimonioActual.ToString.FormatoNumero
|
||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||
|
||||
|
||||
Dim Descuadre = False
|
||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||
If TotalActivoActual <> TotalPasivoPatrimonioActual Then
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoActual.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioActual.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If TotalActivoAnterior <> TotalPasivoPatrimonioAnterior Then
|
||||
LbTotalActivoAnterior.ForeColor = Drawing.Color.Red
|
||||
LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Red
|
||||
Descuadre = True
|
||||
Else
|
||||
LbTotalActivoAnterior.ForeColor = Drawing.Color.Black
|
||||
LbTotalPasivoPatrimonioAnterior.ForeColor = Drawing.Color.Black
|
||||
End If
|
||||
|
||||
If Descuadre Then
|
||||
LbDescuadre.Text = "Las sumas de los totales están descuadradas."
|
||||
Else
|
||||
LbDescuadre.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
'Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
'Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
|
||||
'If ObjConta.GetSituacionFinanciera("01/01/2000".ToDate, FechaF.ToDate, DdlTipoReporte.SelectedValue.ToEntero) Then
|
||||
' DtDatos = ObjConta.DtResultados
|
||||
' 'If ChkFirma.Checked = True Then
|
||||
|
||||
' ' Dim Row As DataRow = DtDatos.NewRow
|
||||
' ' Row.Item("Nombre") = String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de contabilidad", "")
|
||||
' ' Row.Item("Sup") = String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", "")
|
||||
' ' Row.Item("ImporteActual") = "0"
|
||||
' ' Row.Item("ImporteAnterior") = "0"
|
||||
' ' Row.Item("Tipo") = "Firma"
|
||||
' ' DtDatos.Rows.Add(Row)
|
||||
' 'End If
|
||||
'End If
|
||||
'ObjConta.Dispose()
|
||||
|
||||
ImprimirReporte()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
TotalActivoActual = 0
|
||||
TotalActivoAnterior = 0
|
||||
TotalPasivoActual = 0
|
||||
TotalPasivoAnterior = 0
|
||||
TotalPatrimonioActual = 0
|
||||
TotalPatrimonioAnterior = 0
|
||||
TotalPasivoPatrimonioActual = 0
|
||||
TotalPasivoPatrimonioAnterior = 0
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "GV´S ROW DATA BOUND"
|
||||
|
||||
Protected Sub GvActivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalActivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalActivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
Else
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, TipoReporte)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}&TP={2}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString, TipoReporte)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPasivo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Totales
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPasivoActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPasivoAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'Cuentas
|
||||
Else
|
||||
'e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
'e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
|
||||
'Colorea NEGATIVOS
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||
TotalPatrimonioAnterior += e.Row.DBCampo("ImporteAnterior").ToString.ToDouble
|
||||
e.Row.FCLabel("LbNombre").Font.Italic = True
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin;")
|
||||
'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray
|
||||
'e.Row.ControlStyle.ForeColor = Drawing.Color.White
|
||||
'e.Row.ControlStyle.Font.Bold = True
|
||||
Else
|
||||
' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString)
|
||||
' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?ID={0}&FF={1}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFAnterior").ToDate.ToShortDateString)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("HLActual").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
If e.Row.DBCampo("ImporteAnterior").ToString.ToDouble < 0 Then
|
||||
e.Row.FCLabel("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Level").ToString = "2" Then
|
||||
e.Row.FCLabel("LbNombre").Text = String.Format(" {0}", e.Row.DBCampo("Nombre").ToString)
|
||||
ElseIf e.Row.DBCampo("Level").ToString = "1" Then
|
||||
e.Row.FCLabel("LbNombre").Font.Bold = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
ImprimirReporte("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||
'nombre del archivo a generar
|
||||
Dim fileName As String = "EdoSituacionFinanciera"
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/RepSituacionFinanciera.rdlc"
|
||||
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFirma1", If(ChkFirma.Checked, String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFirma2", If(ChkFirma.Checked, String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf), "")))
|
||||
params.Add(New ReportParameter("pFechaFin", FechaF))
|
||||
ImprimirPDF(reportpath, If(ChkNivel.Checked, DtDatos, DtDatos.FiltraParametros("Level < 2")), params, fileName, Formato)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,148 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVariacionHaciendaPublica.aspx.vb" Inherits="AC_RepVariacionHaciendaPublica" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Variación de Hacienda Pública
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i>Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" ><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" />
|
||||
<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-default" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Fecha Inicio:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-md-3 ">
|
||||
<label class"col-md-1" style="width: 80px;">SubProyecto: </label>
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Width="250px" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="130px" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementario" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementario" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<table id="Tbl" runat="server" style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto">
|
||||
<ItemTemplate>
|
||||
<div id="Concepto" runat="server">
|
||||
<asp:Literal ID="LtNombre" Text='<%# Eval("Concepto")%>' runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="500px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hacienda Pública <br/> Patrimonio Contribuido">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Contribuido" Text='<%# Eval("Contribuido", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hacienda Pública <br/> Patrimonio Generado de Ejercicios Anteriores">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="GeneradoAnteriores" Text='<%# Eval("GeneradoAnteriores", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hacienda Pública <br/> Patrimonio Generado del Ejercicio">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="GeneradoActual" Text='<%# Eval("GeneradoActual", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ajustes por Cambios de Valor">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Ajustes" Text='<%# Eval("Ajustes", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Total" Text='<%# Eval("Total", "{0:N2}")%>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="ImporteAnterior" DataFormatString="{0:N2}" HeaderText="ImporteAnterior" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>--%>
|
||||
</Columns>
|
||||
<%--<AlternatingRowStyle CssClass="TextoAlterno" />--%>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,398 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.html.simpleparser
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AC_RepVariacionHaciendaPublica
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtTemp As DataTable
|
||||
Get
|
||||
DtTemp = DirectCast(ViewState("DtTemp"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtTemp") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalActual As Double
|
||||
Get
|
||||
TotalActual = ViewState("TotalActual").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalActual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TotalAnterior As Double
|
||||
Get
|
||||
TotalAnterior = ViewState("TotalAnterior").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TotalAnterior") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaDel As String
|
||||
Get
|
||||
FechaDel = ViewState("FechaDel").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaDel") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaAl As String
|
||||
Get
|
||||
FechaAl = ViewState("FechaAl").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaAl") = value
|
||||
End Set
|
||||
End Property
|
||||
'Private Property TipoReporte As Integer
|
||||
' Get
|
||||
' TipoReporte = ViewState("TipoReporte").ToString.ToEntero
|
||||
' End Get
|
||||
' Set(value As Integer)
|
||||
' ViewState("TipoReporte") = value
|
||||
' End Set
|
||||
' End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
|
||||
TxtFechaAl.Text = NowADS().ToShortDateString
|
||||
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS Y GRID"
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||
|
||||
FechaDel = TxtFechaDel.Text
|
||||
FechaAl = TxtFechaAl.Text
|
||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlSubproyecto.DataBind()
|
||||
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If ObjConta.GetVariacionHaciendaPublica(FechaInicio, FechaFin, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtTemp = ObjConta.DtResultados
|
||||
Else
|
||||
DtTemp = Nothing
|
||||
Alert("Ocurrio un error al cargar los datos del Estado de Variación de Hacienda Pública", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||
CreaDT()
|
||||
End If
|
||||
|
||||
'GvDatos.Caption = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Variación de Hacienda Pública<br/>Del {1} Al {2}</div>", UsuarioActual.Empresa.Empresa, TxtFechaDel.Text, TxtFechaAl.Text)
|
||||
|
||||
'CargaGrid()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDT()
|
||||
DtDatos = New DataTable
|
||||
|
||||
'COLUMNAS DEL REPORTE (GRID)
|
||||
DtDatos.Columns.Add("Concepto", GetType(String))
|
||||
DtDatos.Columns.Add("Contribuido", GetType(String))
|
||||
DtDatos.Columns.Add("GeneradoAnteriores", GetType(String))
|
||||
DtDatos.Columns.Add("GeneradoActual", GetType(String))
|
||||
DtDatos.Columns.Add("Ajustes", GetType(String))
|
||||
DtDatos.Columns.Add("Total", GetType(String))
|
||||
|
||||
'DATOS QUE OCUPAMOS PARA LLENAR GRID
|
||||
DtDatos.Columns.Add("Nivel", GetType(String))
|
||||
DtDatos.Columns.Add("ImporteActual", GetType(String))
|
||||
DtDatos.Columns.Add("ImporteAnterior", GetType(String))
|
||||
DtDatos.Columns.Add("ResultadoActual", GetType(String))
|
||||
DtDatos.Columns.Add("ResultadoAnterior", GetType(String))
|
||||
|
||||
LlenaDT()
|
||||
End Sub
|
||||
Private Sub LlenaDT()
|
||||
|
||||
Dim Total1, Total2, Total3, Total4, Total5 As New Double
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
|
||||
Row = DtDatos.NewRow
|
||||
Row("Nivel") = "0"
|
||||
Row("Concepto") = String.Format("RECTIFICACIONES DE RESULTADOS DE EJERCICIOS ANTERIORES", Year(TxtFechaDel.Text.ToDate) - 1)
|
||||
DtDatos.Rows.Add(Row)
|
||||
|
||||
'LLENAMOS PRIMERA PARTE, AÑO ANTERIOR - PARTE 1 (PT1)
|
||||
For Each dr As DataRow In DtTemp.Rows
|
||||
Row = DtDatos.NewRow
|
||||
|
||||
'DETALLES
|
||||
Row("Concepto") = dr("Nombre")
|
||||
|
||||
If dr("Sup").ToString = "PATRIMONIO CONTRIBUIDO" Then
|
||||
Row("Contribuido") = If(dr("ImporteAnterior").ToString.ToDouble <> 0, dr("ImporteAnterior").ToString.FormatoNumero, "")
|
||||
Total1 += dr("ImporteAnterior").ToString.ToDouble
|
||||
End If
|
||||
|
||||
If dr("Sup").ToString = "PATRIMONIO GENERADO" Then
|
||||
Row("GeneradoAnteriores") = If(dr("ImporteAnterior").ToString.ToDouble <> 0, dr("ImporteAnterior").ToString.FormatoNumero, "")
|
||||
Total2 += dr("ImporteAnterior").ToString.ToDouble
|
||||
End If
|
||||
|
||||
'CAMPOS VACIOS POR MIENTRAS
|
||||
Row("GeneradoActual") = ""
|
||||
Row("Ajustes") = ""
|
||||
|
||||
Row("Total") = If(dr("ImporteAnterior").ToString.ToDouble <> 0, dr("ImporteAnterior").ToString.FormatoNumero, "")
|
||||
Total5 += Row("Total").ToString.ToDouble
|
||||
|
||||
Row("Nivel") = "1"
|
||||
|
||||
|
||||
|
||||
|
||||
'CASOS ESPECIALES
|
||||
If dr("CtaMayor").ToString = "3" Then
|
||||
'CAMBIOS NOMBRE - PATRIMONIO CONTRIBUIDO
|
||||
If dr("Codigo").ToString.Substring(0, 5) = "00031" Then
|
||||
Row("Concepto") = String.Format("PATRIMONIO NETO INICIAL AJUSTADO DEL EJERCICIO {0}", dr("Anterior"))
|
||||
End If
|
||||
|
||||
'CAMBIOS NOMBRE - PATRIMONIO GENERADO
|
||||
If dr("Codigo").ToString.Substring(0, 5) = "00032" Then
|
||||
Row("Concepto") = String.Format("VARIACIONES DE LA HACIENDA PUBLICA/PATRIMONIO NETO DEL EJERCICIO {0}", dr("Anterior"))
|
||||
End If
|
||||
|
||||
Row("Nivel") = "0"
|
||||
End If
|
||||
|
||||
DtDatos.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
|
||||
Row = DtDatos.NewRow
|
||||
Row("Nivel") = "0"
|
||||
Row("Concepto") = String.Format("HACIENDA PUBLICA/PATRIMONIO NETO FINAL DEL EJERCICIO", Year(TxtFechaDel.Text.ToDate) - 1)
|
||||
Row("Contribuido") = Total1.ToString.FormatoNumero
|
||||
Row("GeneradoAnteriores") = Total2.ToString.FormatoNumero
|
||||
Row("GeneradoActual") = Total3.ToString.FormatoNumero
|
||||
Row("Ajustes") = Total4.ToString.FormatoNumero
|
||||
Row("Total") = (Total1 + Total2 + Total3 + Total4).ToString.FormatoNumero
|
||||
DtDatos.Rows.Add(Row)
|
||||
|
||||
'LLENAMOS SEGUNDA PARTE, AÑO ACTUAL - PARTE 2 (PT2)
|
||||
For Each dr As DataRow In DtTemp.Rows
|
||||
Row = DtDatos.NewRow
|
||||
|
||||
'DETALLES
|
||||
Row("Concepto") = dr("Nombre")
|
||||
|
||||
If dr("Sup").ToString = "PATRIMONIO CONTRIBUIDO" Then
|
||||
Row("Contribuido") = If(dr("ImporteActual").ToString.ToDouble <> 0, dr("ImporteActual").ToString.FormatoNumero, "")
|
||||
Total1 += dr("ImporteActual").ToString.ToDouble
|
||||
End If
|
||||
|
||||
If dr("Sup").ToString = "PATRIMONIO GENERADO" Then
|
||||
|
||||
If dr("Codigo").ToString.Substring(0, 5) = "00321" Then
|
||||
Row("GeneradoActual") = If(dr("ResultadoActual").ToString.ToDouble <> 0, dr("ResultadoActual").ToString.FormatoNumero, "")
|
||||
Total3 += dr("ResultadoActual").ToString.ToDouble
|
||||
Row("Total") = If(dr("ResultadoActual").ToString.ToDouble <> 0, dr("ResultadoActual").ToString.FormatoNumero, "")
|
||||
Else
|
||||
Row("GeneradoActual") = If(dr("ImporteActual").ToString.ToDouble <> 0, dr("ImporteActual").ToString.FormatoNumero, "")
|
||||
Total3 += dr("ImporteActual").ToString.ToDouble
|
||||
Row("Total") = If(dr("ImporteActual").ToString.ToDouble <> 0, dr("ImporteActual").ToString.FormatoNumero, "")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'CAMPOS VACIOS POR MIENTRAS
|
||||
Row("GeneradoAnteriores") = ""
|
||||
Row("Ajustes") = ""
|
||||
|
||||
|
||||
Total5 += Row("Total").ToString.ToDouble
|
||||
|
||||
Row("Nivel") = "1"
|
||||
|
||||
|
||||
'CASOS ESPECIALES
|
||||
If dr("CtaMayor").ToString = "3" Then
|
||||
'CAMBIOS NOMBRE - PATRIMONIO CONTRIBUIDO
|
||||
If dr("Codigo").ToString.Substring(0, 5) = "00031" Then
|
||||
Row("Concepto") = String.Format("CAMBIOS EN LA HACIENDA PUBLICA/PATRIMONIO NETO DEL EJERCICIO {0}", dr("Actual"))
|
||||
End If
|
||||
|
||||
'CAMBIOS NOMBRE - PATRIMONIO GENERADO
|
||||
If dr("Codigo").ToString.Substring(0, 5) = "00032" Then
|
||||
Row("Concepto") = String.Format("VARIACIONES DE LA HACIENDA PUBLICA/PATRIMONIO NETO DEL EJERCICIO {0}", dr("Actual"))
|
||||
End If
|
||||
|
||||
Row("Nivel") = "0"
|
||||
End If
|
||||
|
||||
DtDatos.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
|
||||
Row = DtDatos.NewRow
|
||||
Row("Nivel") = "0"
|
||||
Row("Concepto") = String.Format("SALDO NETO EN LA HACIENDA PUBLICA/PATRIMONIO ", Year(TxtFechaDel.Text.ToDate))
|
||||
Row("Contribuido") = Total1.ToString.FormatoNumero
|
||||
Row("GeneradoAnteriores") = Total2.ToString.FormatoNumero
|
||||
Row("GeneradoActual") = Total3.ToString.FormatoNumero
|
||||
Row("Ajustes") = Total4.ToString.FormatoNumero
|
||||
Row("Total") = (Total1 + Total2 + Total3 + Total4).ToString.FormatoNumero
|
||||
DtDatos.Rows.Add(Row)
|
||||
|
||||
|
||||
CargaGrid()
|
||||
End Sub
|
||||
Private Sub CargaGrid()
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Nivel") = "0" Then
|
||||
e.Row.Font.Bold = True
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-top:15px;")
|
||||
Else
|
||||
CType(e.Row.FindControl("Concepto"), HtmlControl).Attributes.Add("style", "margin-left: 20px; margin-top:5px;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
|
||||
ImprimirReporte() 'Descarga reporte en PDF
|
||||
'Using sw As New StringWriter()
|
||||
' Using hw As New HtmlTextWriter(sw)
|
||||
|
||||
' Dim style As StringBuilder = New StringBuilder()
|
||||
' style.Append("<style> ")
|
||||
' style.Append(File.ReadAllText(ModExtensiones.DirectorioBaseEmpresas & "Styles\EstilosExcel.css"))
|
||||
' style.Append(" </style> ")
|
||||
' 'To Export all pages
|
||||
' 'Gv.AllowPaging = False
|
||||
' 'Gv.DataBind()
|
||||
' Tbl.RenderControl(hw)
|
||||
' Dim sr As New StringReader(sw.ToString())
|
||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
||||
' pdfDoc.Open()
|
||||
' htmlparser.Parse(sr)
|
||||
' pdfDoc.Close()
|
||||
|
||||
' Response.ContentType = "application/pdf"
|
||||
' Response.AddHeader("content-disposition", "attachment;filename=FlujoDeEfectivo.pdf")
|
||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
||||
' Response.Write(style.ToString)
|
||||
' Response.Write(pdfDoc)
|
||||
' Response.[End]()
|
||||
' End Using
|
||||
'End Using
|
||||
End Sub
|
||||
'No quitar porque no funciona el exporta PDF
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
' Verifies that the control is rendered
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
' If (e.Row.RowType = DataControlRowType.Header) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = String.Format("<div class='Titulos' style='width:100%; height:45px;'>{0}<br/>Estado de Variación de Hacienda Pública<br/>Del {1} Al {2}</div>", UsuarioActual.Empresa.Empresa, TxtFechaDel.Text, TxtFechaAl.Text)
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
|
||||
' GvDatos.Controls(0).Controls.AddAt(0, HeaderGridRow)
|
||||
' End If
|
||||
|
||||
' If (e.Row.RowType = DataControlRowType.Footer) Then
|
||||
' Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||
' Dim HeaderGridRow As GridViewRow = New GridViewRow(0, 0, DataControlRowType.Footer, DataControlRowState.Insert)
|
||||
' Dim HeaderCell As TableCell = New TableCell()
|
||||
' HeaderCell.Text = "<table><tr> <td colspan='3' style='height:30px;'> <br/><br/><br/><br/></td></tr><tr><td >_________________________________<br/>C.P. Izelda Angulo Peraza</td><td style='width:75px'> </td><td > _________________________________<br/>Lic. Juan Fortino Leon Robinson</td></tr><tr><td>Subdirector de Contabilidad</td><td style='width:75px'> </td><td>Director General</td></table>"
|
||||
' HeaderCell.ColumnSpan = GvDatos.Columns.Count
|
||||
' HeaderCell.HorizontalAlign = HorizontalAlign.Center
|
||||
' HeaderGridRow.Cells.Add(HeaderCell)
|
||||
|
||||
' e.Row.Cells.Clear()
|
||||
' e.Row.Cells.Add(HeaderCell)
|
||||
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("123456" & NowADS().ToShortDateString)
|
||||
ImprimirReporte("Excel") 'Descarga reporte en Excel
|
||||
End Sub
|
||||
|
||||
'Descarga reporte en PDF o Excel
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
'ubicacion del rdlc
|
||||
Dim reportpath As String = "AC/Reportes/VariacionHaciendaPublica.rdlc"
|
||||
|
||||
Dim fileName As String = "EdoVariacionHaciendaPublica"
|
||||
'parametros a enviar al reporte
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
params.Add(New ReportParameter("pFechaIni", TxtFechaDel.Text))
|
||||
params.Add(New ReportParameter("pFechaFin", TxtFechaAl.Text))
|
||||
params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf)))
|
||||
params.Add(New ReportParameter("pFirma2", String.Format("Lic. Juan Fortino Leon Robinson{0} Director General", vbCrLf)))
|
||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||
'MasterReporteador.Visible = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user