Commit inicial Ventas Productivo
This commit is contained in:
384
Finanzas/AnalisisCreditoCliente.aspx
Normal file
384
Finanzas/AnalisisCreditoCliente.aspx
Normal file
@@ -0,0 +1,384 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AnalisisCreditoCliente.aspx.vb" Inherits="Finanzas_AnalisisCreditoCliente" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
#chartdiv2 {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
#chartdiv3 {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
#chartdiv4 {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Análisis Cred. Cliente
|
||||
</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" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" align="center">
|
||||
<div class="col-md-4">
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="text-align: left">Fecha Inicio:</div>
|
||||
<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="TxtFechaICredito" CssClass="form-control input-sm ADSMaskDate" Style="width: 90px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaI" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEEFechaI" runat="server" TargetControlID="TxtFechaICredito" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaICredito" PopupButtonID="LnkFechaI" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVVFechaI" runat="server" ControlToValidate="TxtFechaICredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicial''</b> es necesario, por favor ingréselo." ValidationGroup="VGMConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaI" runat="server" HighlightCssClass="vco" TargetControlID="RFVVFechaI"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="text-align: left">Fecha Fin:</div>
|
||||
<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="TxtFechaFCredito" CssClass="form-control input-sm ADSMaskDate" Style="width: 90px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaF" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEEFechaF" runat="server" TargetControlID="TxtFechaFCredito" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaF" TargetControlID="TxtFechaFCredito" PopupButtonID="LnkFechaF" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVVFechaF" runat="server" ControlToValidate="TxtFechaFCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Final''</b> es necesario, por favor ingréselo." ValidationGroup="VGMConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaF" runat="server" HighlightCssClass="vco" TargetControlID="RFVVFechaF"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnConsultar" runat="server" OnClick="BtnConsultar_Click" Text="Consultar" CssClass="btn btn-primary btn-circle" ValidationGroup="VGMConsultar" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div align="center">
|
||||
<h4>Rotación Cartera</h4>
|
||||
</div>
|
||||
<br />
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblVentasModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="LblPor" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Ventas</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblPagadoModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label2" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Pagado</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblRotacionModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label3" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Rotación</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblDiasModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label4" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Dias</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblDiasCreditoModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label5" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Dias Credito</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div align="center">
|
||||
<h4>Comportamiento de Pago</h4>
|
||||
</div>
|
||||
<br />
|
||||
<label><b>Pago Con Vencimiento: </b>$</label><asp:Label ID="LblVencido" runat="server"></asp:Label>
|
||||
<label><b>Pago Antes del Vencimiento: </b>$</label><asp:Label ID="LblPorVencer" runat="server"></asp:Label>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="col-md-4" align="center">
|
||||
<h4>Limite de Credito</h4>
|
||||
<br />
|
||||
<div id="chartdiv2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div align="center">
|
||||
<h4>Comportamiento de Ventas Mensuales</h4>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv3"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div align="center">
|
||||
<h4>Comportamiento de Saldo Mensual</h4>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</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/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 type="text/javascript">
|
||||
|
||||
function CargaGraficaCompratamientoSaldoMensual(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv4", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"useGraphSettings": true,
|
||||
"valueWidth": 150
|
||||
},
|
||||
"dataProvider": data,
|
||||
"startDuration": 0.5,
|
||||
"graphs": graph,
|
||||
"chartCursor": {
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "mes",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"fillAlpha": 0.05,
|
||||
"fillColor": "#000000",
|
||||
"gridAlpha": 0,
|
||||
"position": "top"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true,
|
||||
"position": "bottom-right"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaComportamientoVentas(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv3", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"useGraphSettings": true,
|
||||
"valueWidth": 150
|
||||
},
|
||||
"dataProvider": data,
|
||||
"startDuration": 0.5,
|
||||
"graphs": graph,
|
||||
"chartCursor": {
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "mes",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"fillAlpha": 0.05,
|
||||
"fillColor": "#000000",
|
||||
"gridAlpha": 0,
|
||||
"position": "top"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true,
|
||||
"position": "bottom-right"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function CargaGraficaVencido(data) {
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
//"marginTop": 0,
|
||||
//"marginRight": 80,
|
||||
"dataProvider": data,
|
||||
"graphs": [{
|
||||
"id": "g1",
|
||||
//"balloonText": "[[category]]<br><b><span style='font-size:14px;'>[[value]]</span></b>",
|
||||
//"bullet": "round",
|
||||
//"bulletSize": 8,
|
||||
"lineColor": "#d1655d",
|
||||
"lineThickness": 2,
|
||||
"negativeLineColor": "#009846",
|
||||
"type": "smoothedLine",
|
||||
"valueField": "value",
|
||||
}],
|
||||
//"chartScrollbar": {
|
||||
// "graph": "g1",
|
||||
// "gridAlpha": 0,
|
||||
// "color": "#888888",
|
||||
// "scrollbarHeight": 55,
|
||||
// "backgroundAlpha": 0,
|
||||
// "selectedBackgroundAlpha": 0.1,
|
||||
// "selectedBackgroundColor": "#888888",
|
||||
// "graphFillAlpha": 0,
|
||||
// "autoGridCount": true,
|
||||
// "selectedGraphFillAlpha": 0,
|
||||
// "graphLineAlpha": 0.2,
|
||||
// "graphLineColor": "#c2c2c2",
|
||||
// "selectedGraphLineColor": "#888888",
|
||||
// "selectedGraphLineAlpha": 1
|
||||
|
||||
//},
|
||||
//"chartCursor": {
|
||||
// "categoryBalloonDateFormat": "YYYY",
|
||||
// "cursorAlpha": 0,
|
||||
// "valueLineEnabled": true,
|
||||
// "valueLineBalloonEnabled": true,
|
||||
// "valueLineAlpha": 0.5,
|
||||
// "fullWidth": true
|
||||
//},
|
||||
//"dataDateFormat": "DD/MM/YYYY",
|
||||
"categoryField": "date",
|
||||
//"categoryAxis": {
|
||||
// "minPeriod": "MM/YYYY",
|
||||
// "parseDates": true,
|
||||
// "minorGridAlpha": 0.1,
|
||||
// "minorGridEnabled": true
|
||||
//},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaLimiteCredito(data) {
|
||||
var chart = AmCharts.makeChart("chartdiv2", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"horizontalGap": 10,
|
||||
"maxColumns": 1,
|
||||
"position": "right",
|
||||
"useGraphSettings": true,
|
||||
"markerSize": 10
|
||||
},
|
||||
"dataProvider": data,
|
||||
"valueAxes": [{
|
||||
"stackType": "regular",
|
||||
"axisAlpha": 0.3,
|
||||
"gridAlpha": 0
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
|
||||
"fillAlphas": 0.8,
|
||||
"labelText": "[[value]]",
|
||||
"lineAlpha": 0.3,
|
||||
"title": "Saldo",
|
||||
"type": "column",
|
||||
"color": "#000000",
|
||||
"valueField": "saldo"
|
||||
},
|
||||
{
|
||||
"balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
|
||||
"fillAlphas": 0.8,
|
||||
"labelText": "[[value]]",
|
||||
"lineAlpha": 0.3,
|
||||
"title": "Limite Credito",
|
||||
"type": "column",
|
||||
"color": "#000000",
|
||||
"valueField": "limite"
|
||||
}],
|
||||
"categoryField": "year",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"gridAlpha": 0,
|
||||
"position": "left"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
306
Finanzas/AnalisisCreditoCliente.aspx.vb
Normal file
306
Finanzas/AnalisisCreditoCliente.aspx.vb
Normal file
@@ -0,0 +1,306 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
Partial Class Finanzas_AnalisisCreditoCliente
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
Private Property DtVencido As DataTable
|
||||
Get
|
||||
DtVencido = CType(ViewState("DtVencido"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVencido") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtRotacion As DataTable
|
||||
Get
|
||||
DtRotacion = CType(ViewState("DtRotacion"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtRotacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtSaldoMensual As DataTable
|
||||
Get
|
||||
DtSaldoMensual = CType(ViewState("DtSaldoMensual"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtSaldoMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtComportamientoVentas As DataTable
|
||||
Get
|
||||
DtComportamientoVentas = CType(ViewState("DtComportamientoVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtComportamientoVentas") = 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
|
||||
TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString
|
||||
TxtFechaFCredito.Text = Now.ToShortDateString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClienteVencido(-1, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then
|
||||
DtVencido = ObjClientes.DtResultados
|
||||
End If
|
||||
|
||||
If ObjClientes.GetRotacionCartera(-1, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then
|
||||
DtRotacion = ObjClientes.DtResultados
|
||||
End If
|
||||
|
||||
If ObjClientes.GetClienteSaldoMensual(-1, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then
|
||||
DtSaldoMensual = ObjClientes.DtResultados
|
||||
End If
|
||||
|
||||
If ObjClientes.GetClienteComportamientoVentaMensual(-1, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then
|
||||
DtComportamientoVentas = ObjClientes.DtResultados
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGraficas()
|
||||
|
||||
If Not DtVencido IsNot Nothing AndAlso Not DtVencido.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Saldo As Double = DtVencido.SUM("Saldo")
|
||||
Dim LimiteCredito As Double = DtVencido.Rows(0)("LimiteCreditoTotal").ToString.ToDouble
|
||||
|
||||
Dim Dt As New DataTable()
|
||||
Dt.Columns.Add("value")
|
||||
Dt.Columns.Add("date")
|
||||
For Each Dr As DataRow In DtVencido.Rows
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = Dt.NewRow()
|
||||
Row("value") = Dr("DiasVencidos").ToString
|
||||
Row("date") = ""
|
||||
Dt.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
LblVencido.Text = DtVencido.SUM("Total", "DiasVencidos > 0").FormatoNumero
|
||||
LblPorVencer.Text = DtVencido.SUM("Total", "DiasVencidos <= 0").FormatoNumero
|
||||
|
||||
'Dim query = From s In Dt.AsEnumerable() Select New With {.date = "", .value = s("value").ToString()}
|
||||
'Dim json = Newtonsoft.Json.JsonConvert.SerializeObject(query)
|
||||
''RegistraScript($"CargaGraficaVencido({Dt.ToJson})", "22")
|
||||
|
||||
Dim Dt2 As New DataTable()
|
||||
Dt2.Columns.Add("limite")
|
||||
Dt2.Columns.Add("saldo")
|
||||
Dt2.Columns.Add("year")
|
||||
Dim Row2 As DataRow = Nothing
|
||||
Row2 = Dt2.NewRow()
|
||||
Row2("limite") = LimiteCredito
|
||||
Row2("saldo") = Saldo
|
||||
Row2("year") = ""
|
||||
Dt2.Rows.Add(Row2)
|
||||
'Dim query2 = From s In Dt2.AsEnumerable() Select New With {.year = "", .limite = s("limite").ToString(), .saldo = s("saldo").ToString()}
|
||||
'Dim json2 = Newtonsoft.Json.JsonConvert.SerializeObject(query2)
|
||||
|
||||
RegistraScript($"CargaGraficaLimiteCredito({Dt2.ToJson})", "33")
|
||||
|
||||
If DtRotacion IsNot Nothing AndAlso DtRotacion.Rows.Count > 0 Then
|
||||
LblVentasModal.Text = DtRotacion.SUM("Ventas").ToString.FormatoNumero
|
||||
LblPagadoModal.Text = DtRotacion.SUM("Pagado").ToString.FormatoNumero
|
||||
LblRotacionModal.Text = DtRotacion.AVG("Rotacion").ToString.FormatoNumero
|
||||
LblDiasModal.Text = DtRotacion.SUM("Dias").ToString.FormatoNumero
|
||||
LblDiasCreditoModal.Text = DtRotacion.SUM("DiasCredito").ToString.FormatoNumero
|
||||
End If
|
||||
|
||||
Dim Dt3 As New DataTable()
|
||||
Dt3.Columns.Add("mes")
|
||||
|
||||
Dim Dt4 As New DataTable()
|
||||
Dt4.Columns.Add("balloonText")
|
||||
Dt4.Columns.Add("bullet")
|
||||
Dt4.Columns.Add("title")
|
||||
Dt4.Columns.Add("valueField")
|
||||
Dt4.Columns.Add("fillAlphas")
|
||||
Dt4.Columns.Add("hidden")
|
||||
|
||||
|
||||
Dim Cont As Integer = 1
|
||||
For Each Dr As DataRow In DtComportamientoVentas.Rows
|
||||
Dt3.Columns.Add(Dr("Ano").ToString)
|
||||
Dim Row4 As DataRow = Nothing
|
||||
Row4 = Dt4.NewRow()
|
||||
Row4("balloonText") = "Ventas [[category]]: [[value]]"
|
||||
Row4("bullet") = "round"
|
||||
Row4("title") = Dr("Ano").ToString
|
||||
Row4("valueField") = Dr("Ano").ToString
|
||||
Row4("fillAlphas") = 0
|
||||
Row4("hidden") = If(Cont > DtComportamientoVentas.Rows.Count - 3, False, True)
|
||||
Dt4.Rows.Add(Row4)
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
Dim RowEnero As DataRow = Nothing
|
||||
RowEnero = Dt3.NewRow()
|
||||
Dim RowFebrero As DataRow = Nothing
|
||||
RowFebrero = Dt3.NewRow()
|
||||
Dim RowMarzo As DataRow = Nothing
|
||||
RowMarzo = Dt3.NewRow()
|
||||
Dim RowAbril As DataRow = Nothing
|
||||
RowAbril = Dt3.NewRow()
|
||||
Dim RowMayo As DataRow = Nothing
|
||||
RowMayo = Dt3.NewRow()
|
||||
Dim RowJunio As DataRow = Nothing
|
||||
RowJunio = Dt3.NewRow()
|
||||
Dim RowJulio As DataRow = Nothing
|
||||
RowJulio = Dt3.NewRow()
|
||||
Dim RowAgosto As DataRow = Nothing
|
||||
RowAgosto = Dt3.NewRow()
|
||||
Dim RowSeptiembre As DataRow = Nothing
|
||||
RowSeptiembre = Dt3.NewRow()
|
||||
Dim RowOctubre As DataRow = Nothing
|
||||
RowOctubre = Dt3.NewRow()
|
||||
Dim RowNoviembre As DataRow = Nothing
|
||||
RowNoviembre = Dt3.NewRow()
|
||||
Dim RowDiciembre As DataRow = Nothing
|
||||
RowDiciembre = Dt3.NewRow()
|
||||
For Each Dr As DataRow In DtComportamientoVentas.Rows
|
||||
RowEnero(Dr("Ano").ToString) = Dr("Enero").ToString
|
||||
RowEnero("mes") = "Enero"
|
||||
RowFebrero(Dr("Ano").ToString) = Dr("Febrero").ToString
|
||||
RowFebrero("mes") = "Febrero"
|
||||
RowMarzo(Dr("Ano").ToString) = Dr("Marzo").ToString
|
||||
RowMarzo("mes") = "Marzo"
|
||||
RowAbril(Dr("Ano").ToString) = Dr("Abril").ToString
|
||||
RowAbril("mes") = "Abril"
|
||||
RowMayo(Dr("Ano").ToString) = Dr("Mayo").ToString
|
||||
RowMayo("mes") = "Mayo"
|
||||
RowJunio(Dr("Ano").ToString) = Dr("Junio").ToString
|
||||
RowJunio("mes") = "Junio"
|
||||
RowJulio(Dr("Ano").ToString) = Dr("Julio").ToString
|
||||
RowJulio("mes") = "Julio"
|
||||
RowAgosto(Dr("Ano").ToString) = Dr("Agosto").ToString
|
||||
RowAgosto("mes") = "Agosto"
|
||||
RowSeptiembre(Dr("Ano").ToString) = Dr("Septiembre").ToString
|
||||
RowSeptiembre("mes") = "Septiembre"
|
||||
RowOctubre(Dr("Ano").ToString) = Dr("Octubre").ToString
|
||||
RowOctubre("mes") = "Octubre"
|
||||
RowNoviembre(Dr("Ano").ToString) = Dr("Noviembre").ToString
|
||||
RowNoviembre("mes") = "Noviembre"
|
||||
RowDiciembre(Dr("Ano").ToString) = Dr("Diciembre").ToString
|
||||
RowDiciembre("mes") = "Diciembre"
|
||||
Next
|
||||
Dt3.Rows.Add(RowEnero)
|
||||
Dt3.Rows.Add(RowFebrero)
|
||||
Dt3.Rows.Add(RowMarzo)
|
||||
Dt3.Rows.Add(RowAbril)
|
||||
Dt3.Rows.Add(RowMayo)
|
||||
Dt3.Rows.Add(RowJunio)
|
||||
Dt3.Rows.Add(RowJulio)
|
||||
Dt3.Rows.Add(RowAgosto)
|
||||
Dt3.Rows.Add(RowSeptiembre)
|
||||
Dt3.Rows.Add(RowOctubre)
|
||||
Dt3.Rows.Add(RowNoviembre)
|
||||
Dt3.Rows.Add(RowDiciembre)
|
||||
|
||||
RegistraScript($"CargaGraficaComportamientoVentas({Dt3.ToJson},{Dt4.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "44")
|
||||
|
||||
Dim Dt5 As New DataTable()
|
||||
Dt5.Columns.Add("mes")
|
||||
|
||||
Dim Dt6 As New DataTable()
|
||||
Dt6.Columns.Add("balloonText")
|
||||
Dt6.Columns.Add("bullet")
|
||||
Dt6.Columns.Add("title")
|
||||
Dt6.Columns.Add("valueField")
|
||||
Dt6.Columns.Add("fillAlphas")
|
||||
Dt6.Columns.Add("hidden")
|
||||
|
||||
Cont = 1
|
||||
For Each Dr As DataRow In DtSaldoMensual.Rows
|
||||
Dt5.Columns.Add(Dr("Ano").ToString)
|
||||
Dim Row6 As DataRow = Nothing
|
||||
Row6 = Dt6.NewRow()
|
||||
Row6("balloonText") = "Saldo [[category]]: [[value]]"
|
||||
Row6("bullet") = "round"
|
||||
Row6("title") = Dr("Ano").ToString
|
||||
Row6("valueField") = Dr("Ano").ToString
|
||||
Row6("fillAlphas") = 0
|
||||
Row6("hidden") = If(Cont > DtSaldoMensual.Rows.Count - 3, False, True)
|
||||
Dt6.Rows.Add(Row6)
|
||||
Cont += 1
|
||||
Next
|
||||
RowEnero = Dt5.NewRow()
|
||||
RowFebrero = Dt5.NewRow()
|
||||
RowMarzo = Dt5.NewRow()
|
||||
RowAbril = Dt5.NewRow()
|
||||
RowMayo = Dt5.NewRow()
|
||||
RowJunio = Dt5.NewRow()
|
||||
RowJulio = Dt5.NewRow()
|
||||
RowAgosto = Dt5.NewRow()
|
||||
RowSeptiembre = Dt5.NewRow()
|
||||
RowOctubre = Dt5.NewRow()
|
||||
RowNoviembre = Dt5.NewRow()
|
||||
RowDiciembre = Dt5.NewRow()
|
||||
For Each Dr As DataRow In DtSaldoMensual.Rows
|
||||
RowEnero(Dr("Ano").ToString) = Dr("Enero").ToString
|
||||
RowEnero("mes") = "Enero"
|
||||
RowFebrero(Dr("Ano").ToString) = Dr("Febrero").ToString
|
||||
RowFebrero("mes") = "Febrero"
|
||||
RowMarzo(Dr("Ano").ToString) = Dr("Marzo").ToString
|
||||
RowMarzo("mes") = "Marzo"
|
||||
RowAbril(Dr("Ano").ToString) = Dr("Abril").ToString
|
||||
RowAbril("mes") = "Abril"
|
||||
RowMayo(Dr("Ano").ToString) = Dr("Mayo").ToString
|
||||
RowMayo("mes") = "Mayo"
|
||||
RowJunio(Dr("Ano").ToString) = Dr("Junio").ToString
|
||||
RowJunio("mes") = "Junio"
|
||||
RowJulio(Dr("Ano").ToString) = Dr("Julio").ToString
|
||||
RowJulio("mes") = "Julio"
|
||||
RowAgosto(Dr("Ano").ToString) = Dr("Agosto").ToString
|
||||
RowAgosto("mes") = "Agosto"
|
||||
RowSeptiembre(Dr("Ano").ToString) = Dr("Septiembre").ToString
|
||||
RowSeptiembre("mes") = "Septiembre"
|
||||
RowOctubre(Dr("Ano").ToString) = Dr("Octubre").ToString
|
||||
RowOctubre("mes") = "Octubre"
|
||||
RowNoviembre(Dr("Ano").ToString) = Dr("Noviembre").ToString
|
||||
RowNoviembre("mes") = "Noviembre"
|
||||
RowDiciembre(Dr("Ano").ToString) = Dr("Diciembre").ToString
|
||||
RowDiciembre("mes") = "Diciembre"
|
||||
Next
|
||||
Dt5.Rows.Add(RowEnero)
|
||||
Dt5.Rows.Add(RowFebrero)
|
||||
Dt5.Rows.Add(RowMarzo)
|
||||
Dt5.Rows.Add(RowAbril)
|
||||
Dt5.Rows.Add(RowMayo)
|
||||
Dt5.Rows.Add(RowJunio)
|
||||
Dt5.Rows.Add(RowJulio)
|
||||
Dt5.Rows.Add(RowAgosto)
|
||||
Dt5.Rows.Add(RowSeptiembre)
|
||||
Dt5.Rows.Add(RowOctubre)
|
||||
Dt5.Rows.Add(RowNoviembre)
|
||||
Dt5.Rows.Add(RowDiciembre)
|
||||
|
||||
|
||||
RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
CargaGraficas()
|
||||
End Sub
|
||||
End Class
|
||||
330
Finanzas/AnalisisCreditoProveedor.aspx
Normal file
330
Finanzas/AnalisisCreditoProveedor.aspx
Normal file
@@ -0,0 +1,330 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AnalisisCreditoProveedor.aspx.vb" Inherits="Finanzas_AnalisisCreditoProveedor" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
#chartdiv2 {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
#chartdiv3 {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
#chartdiv4 {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Análisis Cred. Proveedor
|
||||
</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" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div align="center">
|
||||
<h4>Rotación Cartera</h4>
|
||||
</div>
|
||||
<br />
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblComprasModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="LblPor" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Compras</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblPagadoModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label2" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Pagado</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblRotacionModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label3" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Rotación</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h4 class="font-black-haze">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<b>
|
||||
<asp:Label runat="server" Text="0" ID="LblDiasModal"></asp:Label></span></b>
|
||||
<asp:Label runat="server" ID="Label4" Text=""></asp:Label>
|
||||
</h4>
|
||||
<small>Dias</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div align="center">
|
||||
<h4>Comportamiento de Pago</h4>
|
||||
</div>
|
||||
<br />
|
||||
<label><b>Pago Con Vencimiento: </b>$</label><asp:Label ID="LblVencido" runat="server"></asp:Label>
|
||||
<label><b>Pago Antes del Vencimiento: </b>$</label><asp:Label ID="LblPorVencer" runat="server"></asp:Label>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="col-md-4" align="center">
|
||||
<h4>Limite de Credito</h4>
|
||||
<br />
|
||||
<div id="chartdiv2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div align="center">
|
||||
<h4>Comportamiento de Compras Mensuales</h4>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv3"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div align="center">
|
||||
<h4>Comportamiento de Saldo Mensual</h4>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</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/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 type="text/javascript">
|
||||
|
||||
function CargaGraficaCompratamientoSaldoMensual(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv4", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"useGraphSettings": true,
|
||||
"valueWidth": 150
|
||||
},
|
||||
"dataProvider": data,
|
||||
"startDuration": 0.5,
|
||||
"graphs": graph,
|
||||
"chartCursor": {
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "mes",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"fillAlpha": 0.05,
|
||||
"fillColor": "#000000",
|
||||
"gridAlpha": 0,
|
||||
"position": "top"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true,
|
||||
"position": "bottom-right"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaComportamientoCompras(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv3", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"useGraphSettings": true,
|
||||
"valueWidth": 150
|
||||
},
|
||||
"dataProvider": data,
|
||||
"startDuration": 0.5,
|
||||
"graphs": graph,
|
||||
"chartCursor": {
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "mes",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"fillAlpha": 0.05,
|
||||
"fillColor": "#000000",
|
||||
"gridAlpha": 0,
|
||||
"position": "top"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true,
|
||||
"position": "bottom-right"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function CargaGraficaVencido(data) {
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
//"marginTop": 0,
|
||||
//"marginRight": 80,
|
||||
"dataProvider": data,
|
||||
"graphs": [{
|
||||
"id": "g1",
|
||||
//"balloonText": "[[category]]<br><b><span style='font-size:14px;'>[[value]]</span></b>",
|
||||
//"bullet": "round",
|
||||
//"bulletSize": 8,
|
||||
"lineColor": "#d1655d",
|
||||
"lineThickness": 2,
|
||||
"negativeLineColor": "#009846",
|
||||
"type": "smoothedLine",
|
||||
"valueField": "value",
|
||||
}],
|
||||
//"chartScrollbar": {
|
||||
// "graph": "g1",
|
||||
// "gridAlpha": 0,
|
||||
// "color": "#888888",
|
||||
// "scrollbarHeight": 55,
|
||||
// "backgroundAlpha": 0,
|
||||
// "selectedBackgroundAlpha": 0.1,
|
||||
// "selectedBackgroundColor": "#888888",
|
||||
// "graphFillAlpha": 0,
|
||||
// "autoGridCount": true,
|
||||
// "selectedGraphFillAlpha": 0,
|
||||
// "graphLineAlpha": 0.2,
|
||||
// "graphLineColor": "#c2c2c2",
|
||||
// "selectedGraphLineColor": "#888888",
|
||||
// "selectedGraphLineAlpha": 1
|
||||
|
||||
//},
|
||||
//"chartCursor": {
|
||||
// "categoryBalloonDateFormat": "YYYY",
|
||||
// "cursorAlpha": 0,
|
||||
// "valueLineEnabled": true,
|
||||
// "valueLineBalloonEnabled": true,
|
||||
// "valueLineAlpha": 0.5,
|
||||
// "fullWidth": true
|
||||
//},
|
||||
//"dataDateFormat": "DD/MM/YYYY",
|
||||
"categoryField": "date",
|
||||
//"categoryAxis": {
|
||||
// "minPeriod": "MM/YYYY",
|
||||
// "parseDates": true,
|
||||
// "minorGridAlpha": 0.1,
|
||||
// "minorGridEnabled": true
|
||||
//},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaLimiteCredito(data) {
|
||||
var chart = AmCharts.makeChart("chartdiv2", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"horizontalGap": 10,
|
||||
"maxColumns": 1,
|
||||
"position": "right",
|
||||
"useGraphSettings": true,
|
||||
"markerSize": 10
|
||||
},
|
||||
"dataProvider": data,
|
||||
"valueAxes": [{
|
||||
"stackType": "regular",
|
||||
"axisAlpha": 0.3,
|
||||
"gridAlpha": 0
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
|
||||
"fillAlphas": 0.8,
|
||||
"labelText": "[[value]]",
|
||||
"lineAlpha": 0.3,
|
||||
"title": "Saldo",
|
||||
"type": "column",
|
||||
"color": "#000000",
|
||||
"valueField": "saldo"
|
||||
},
|
||||
{
|
||||
"balloonText": "<b>[[title]]</b><br><span style='font-size:14px'>[[category]]: <b>[[value]]</b></span>",
|
||||
"fillAlphas": 0.8,
|
||||
"labelText": "[[value]]",
|
||||
"lineAlpha": 0.3,
|
||||
"title": "Limite Credito",
|
||||
"type": "column",
|
||||
"color": "#000000",
|
||||
"valueField": "limite"
|
||||
}],
|
||||
"categoryField": "year",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"gridAlpha": 0,
|
||||
"position": "left"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
303
Finanzas/AnalisisCreditoProveedor.aspx.vb
Normal file
303
Finanzas/AnalisisCreditoProveedor.aspx.vb
Normal file
@@ -0,0 +1,303 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
Partial Class Finanzas_AnalisisCreditoProveedor
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
Private Property DtVencido As DataTable
|
||||
Get
|
||||
DtVencido = CType(ViewState("DtVencido"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVencido") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtRotacion As DataTable
|
||||
Get
|
||||
DtRotacion = CType(ViewState("DtRotacion"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtRotacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtSaldoMensual As DataTable
|
||||
Get
|
||||
DtSaldoMensual = CType(ViewState("DtSaldoMensual"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtSaldoMensual") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtComportamientoCompras As DataTable
|
||||
Get
|
||||
DtComportamientoCompras = CType(ViewState("DtComportamientoCompras"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtComportamientoCompras") = 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
|
||||
CargaDatos()
|
||||
CargaGraficas()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjProveedores As New ClsCompProveedores
|
||||
Dim ObjFinanzas As New ClsFinanzas
|
||||
If ObjProveedores.GetProveedorVencido(-1, UsuarioActual.CveEmpresa, MinFecha, MaxFecha) Then
|
||||
DtVencido = ObjProveedores.DtResultados
|
||||
End If
|
||||
|
||||
If ObjFinanzas.GetRotacionCarteraProveedores(MinFecha, MaxFecha, UsuarioActual.CveEmpresa, 1, "-1", " -1", -1, Now) Then
|
||||
DtRotacion = ObjFinanzas.DtResultados
|
||||
End If
|
||||
|
||||
If ObjProveedores.GetProveedorSaldoMensual(-1, UsuarioActual.CveEmpresa, MinFecha, MaxFecha) Then
|
||||
DtSaldoMensual = ObjProveedores.DtResultados
|
||||
End If
|
||||
|
||||
If ObjProveedores.GetClienteComportamientoCompraMensual(-1, UsuarioActual.CveEmpresa, MinFecha, MaxFecha) Then
|
||||
DtComportamientoCompras = ObjProveedores.DtResultados
|
||||
End If
|
||||
|
||||
ObjProveedores.Dispose()
|
||||
ObjFinanzas.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGraficas()
|
||||
|
||||
If Not DtVencido IsNot Nothing AndAlso Not DtVencido.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Saldo As Double = DtVencido.SUM("Saldo")
|
||||
Dim LimiteCredito As Double = DtVencido.Rows(0)("LimiteCreditoTotal").ToString.ToDouble
|
||||
|
||||
Dim Dt As New DataTable()
|
||||
Dt.Columns.Add("value")
|
||||
For Each Dr As DataRow In DtVencido.Rows
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = Dt.NewRow()
|
||||
Row("value") = Dr("DiasVencidos").ToString
|
||||
Dt.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
LblVencido.Text = DtVencido.SUM("Total", "DiasVencidos > 0").FormatoNumero
|
||||
LblPorVencer.Text = DtVencido.SUM("Total", "DiasVencidos <= 0").FormatoNumero
|
||||
|
||||
Dim query = From s In Dt.AsEnumerable() Select New With {.date = "", .value = s("value").ToString()}
|
||||
Dim json = Newtonsoft.Json.JsonConvert.SerializeObject(query)
|
||||
RegistraScript($"CargaGraficaVencido({json})", "22")
|
||||
|
||||
Dim Dt2 As New DataTable()
|
||||
Dt2.Columns.Add("limite")
|
||||
Dt2.Columns.Add("saldo")
|
||||
Dim Row2 As DataRow = Nothing
|
||||
Row2 = Dt2.NewRow()
|
||||
Row2("limite") = LimiteCredito
|
||||
Row2("saldo") = Saldo
|
||||
Dt2.Rows.Add(Row2)
|
||||
Dim query2 = From s In Dt2.AsEnumerable() Select New With {.year = "", .limite = s("limite").ToString(), .saldo = s("saldo").ToString()}
|
||||
Dim json2 = Newtonsoft.Json.JsonConvert.SerializeObject(query2)
|
||||
|
||||
RegistraScript($"CargaGraficaLimiteCredito({json2})", "33")
|
||||
|
||||
If DtRotacion IsNot Nothing AndAlso DtRotacion.Rows.Count > 0 Then
|
||||
LblComprasModal.Text = DtRotacion.SUM("Compras").ToString.FormatoNumero
|
||||
LblPagadoModal.Text = DtRotacion.SUM("Pagado").ToString.FormatoNumero
|
||||
LblRotacionModal.Text = DtRotacion.AVG("Rotacion").ToString.FormatoNumero
|
||||
LblDiasModal.Text = DtRotacion.SUM("Dias").ToString.FormatoNumero
|
||||
End If
|
||||
|
||||
|
||||
Dim Dt3 As New DataTable()
|
||||
Dt3.Columns.Add("mes")
|
||||
|
||||
Dim Dt4 As New DataTable()
|
||||
Dt4.Columns.Add("balloonText")
|
||||
Dt4.Columns.Add("bullet")
|
||||
Dt4.Columns.Add("title")
|
||||
Dt4.Columns.Add("valueField")
|
||||
Dt4.Columns.Add("fillAlphas")
|
||||
Dt4.Columns.Add("hidden")
|
||||
|
||||
|
||||
Dim Cont As Integer = 1
|
||||
|
||||
For Each Dr As DataRow In DtComportamientoCompras.Rows
|
||||
Dt3.Columns.Add(Dr("Ano").ToString)
|
||||
Dim Row4 As DataRow = Nothing
|
||||
Row4 = Dt4.NewRow()
|
||||
Row4("balloonText") = "Compras [[category]]: [[value]]"
|
||||
Row4("bullet") = "round"
|
||||
Row4("title") = Dr("Ano").ToString
|
||||
Row4("valueField") = Dr("Ano").ToString
|
||||
Row4("fillAlphas") = 0
|
||||
Row4("hidden") = If(Cont > DtComportamientoCompras.Rows.Count - 3, False, True)
|
||||
Dt4.Rows.Add(Row4)
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
Dim RowEnero As DataRow = Nothing
|
||||
RowEnero = Dt3.NewRow()
|
||||
Dim RowFebrero As DataRow = Nothing
|
||||
RowFebrero = Dt3.NewRow()
|
||||
Dim RowMarzo As DataRow = Nothing
|
||||
RowMarzo = Dt3.NewRow()
|
||||
Dim RowAbril As DataRow = Nothing
|
||||
RowAbril = Dt3.NewRow()
|
||||
Dim RowMayo As DataRow = Nothing
|
||||
RowMayo = Dt3.NewRow()
|
||||
Dim RowJunio As DataRow = Nothing
|
||||
RowJunio = Dt3.NewRow()
|
||||
Dim RowJulio As DataRow = Nothing
|
||||
RowJulio = Dt3.NewRow()
|
||||
Dim RowAgosto As DataRow = Nothing
|
||||
RowAgosto = Dt3.NewRow()
|
||||
Dim RowSeptiembre As DataRow = Nothing
|
||||
RowSeptiembre = Dt3.NewRow()
|
||||
Dim RowOctubre As DataRow = Nothing
|
||||
RowOctubre = Dt3.NewRow()
|
||||
Dim RowNoviembre As DataRow = Nothing
|
||||
RowNoviembre = Dt3.NewRow()
|
||||
Dim RowDiciembre As DataRow = Nothing
|
||||
RowDiciembre = Dt3.NewRow()
|
||||
For Each Dr As DataRow In DtComportamientoCompras.Rows
|
||||
RowEnero(Dr("Ano").ToString) = Dr("Enero").ToString
|
||||
RowEnero("mes") = "Enero"
|
||||
RowFebrero(Dr("Ano").ToString) = Dr("Febrero").ToString
|
||||
RowFebrero("mes") = "Febrero"
|
||||
RowMarzo(Dr("Ano").ToString) = Dr("Marzo").ToString
|
||||
RowMarzo("mes") = "Marzo"
|
||||
RowAbril(Dr("Ano").ToString) = Dr("Abril").ToString
|
||||
RowAbril("mes") = "Abril"
|
||||
RowMayo(Dr("Ano").ToString) = Dr("Mayo").ToString
|
||||
RowMayo("mes") = "Mayo"
|
||||
RowJunio(Dr("Ano").ToString) = Dr("Junio").ToString
|
||||
RowJunio("mes") = "Junio"
|
||||
RowJulio(Dr("Ano").ToString) = Dr("Julio").ToString
|
||||
RowJulio("mes") = "Julio"
|
||||
RowAgosto(Dr("Ano").ToString) = Dr("Agosto").ToString
|
||||
RowAgosto("mes") = "Agosto"
|
||||
RowSeptiembre(Dr("Ano").ToString) = Dr("Septiembre").ToString
|
||||
RowSeptiembre("mes") = "Septiembre"
|
||||
RowOctubre(Dr("Ano").ToString) = Dr("Octubre").ToString
|
||||
RowOctubre("mes") = "Octubre"
|
||||
RowNoviembre(Dr("Ano").ToString) = Dr("Noviembre").ToString
|
||||
RowNoviembre("mes") = "Noviembre"
|
||||
RowDiciembre(Dr("Ano").ToString) = Dr("Diciembre").ToString
|
||||
RowDiciembre("mes") = "Diciembre"
|
||||
Next
|
||||
Dt3.Rows.Add(RowEnero)
|
||||
Dt3.Rows.Add(RowFebrero)
|
||||
Dt3.Rows.Add(RowMarzo)
|
||||
Dt3.Rows.Add(RowAbril)
|
||||
Dt3.Rows.Add(RowMayo)
|
||||
Dt3.Rows.Add(RowJunio)
|
||||
Dt3.Rows.Add(RowJulio)
|
||||
Dt3.Rows.Add(RowAgosto)
|
||||
Dt3.Rows.Add(RowSeptiembre)
|
||||
Dt3.Rows.Add(RowOctubre)
|
||||
Dt3.Rows.Add(RowNoviembre)
|
||||
Dt3.Rows.Add(RowDiciembre)
|
||||
|
||||
RegistraScript($"CargaGraficaComportamientoCompras({Dt3.ToJson},{Dt4.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "44")
|
||||
|
||||
Dim Dt5 As New DataTable()
|
||||
Dt5.Columns.Add("mes")
|
||||
|
||||
Dim Dt6 As New DataTable()
|
||||
Dt6.Columns.Add("balloonText")
|
||||
Dt6.Columns.Add("bullet")
|
||||
Dt6.Columns.Add("title")
|
||||
Dt6.Columns.Add("valueField")
|
||||
Dt6.Columns.Add("fillAlphas")
|
||||
Dt6.Columns.Add("hidden")
|
||||
|
||||
Cont = 1
|
||||
For Each Dr As DataRow In DtSaldoMensual.Rows
|
||||
Dt5.Columns.Add(Dr("Ano").ToString)
|
||||
Dim Row6 As DataRow = Nothing
|
||||
Row6 = Dt6.NewRow()
|
||||
Row6("balloonText") = "Saldo [[category]]: [[value]]"
|
||||
Row6("bullet") = "round"
|
||||
Row6("title") = Dr("Ano").ToString
|
||||
Row6("valueField") = Dr("Ano").ToString
|
||||
Row6("fillAlphas") = 0
|
||||
Row6("hidden") = If(Cont > DtSaldoMensual.Rows.Count - 3, False, True)
|
||||
Dt6.Rows.Add(Row6)
|
||||
Cont += 1
|
||||
Next
|
||||
RowEnero = Dt5.NewRow()
|
||||
RowFebrero = Dt5.NewRow()
|
||||
RowMarzo = Dt5.NewRow()
|
||||
RowAbril = Dt5.NewRow()
|
||||
RowMayo = Dt5.NewRow()
|
||||
RowJunio = Dt5.NewRow()
|
||||
RowJulio = Dt5.NewRow()
|
||||
RowAgosto = Dt5.NewRow()
|
||||
RowSeptiembre = Dt5.NewRow()
|
||||
RowOctubre = Dt5.NewRow()
|
||||
RowNoviembre = Dt5.NewRow()
|
||||
RowDiciembre = Dt5.NewRow()
|
||||
For Each Dr As DataRow In DtSaldoMensual.Rows
|
||||
RowEnero(Dr("Ano").ToString) = Dr("Enero").ToString
|
||||
RowEnero("mes") = "Enero"
|
||||
RowFebrero(Dr("Ano").ToString) = Dr("Febrero").ToString
|
||||
RowFebrero("mes") = "Febrero"
|
||||
RowMarzo(Dr("Ano").ToString) = Dr("Marzo").ToString
|
||||
RowMarzo("mes") = "Marzo"
|
||||
RowAbril(Dr("Ano").ToString) = Dr("Abril").ToString
|
||||
RowAbril("mes") = "Abril"
|
||||
RowMayo(Dr("Ano").ToString) = Dr("Mayo").ToString
|
||||
RowMayo("mes") = "Mayo"
|
||||
RowJunio(Dr("Ano").ToString) = Dr("Junio").ToString
|
||||
RowJunio("mes") = "Junio"
|
||||
RowJulio(Dr("Ano").ToString) = Dr("Julio").ToString
|
||||
RowJulio("mes") = "Julio"
|
||||
RowAgosto(Dr("Ano").ToString) = Dr("Agosto").ToString
|
||||
RowAgosto("mes") = "Agosto"
|
||||
RowSeptiembre(Dr("Ano").ToString) = Dr("Septiembre").ToString
|
||||
RowSeptiembre("mes") = "Septiembre"
|
||||
RowOctubre(Dr("Ano").ToString) = Dr("Octubre").ToString
|
||||
RowOctubre("mes") = "Octubre"
|
||||
RowNoviembre(Dr("Ano").ToString) = Dr("Noviembre").ToString
|
||||
RowNoviembre("mes") = "Noviembre"
|
||||
RowDiciembre(Dr("Ano").ToString) = Dr("Diciembre").ToString
|
||||
RowDiciembre("mes") = "Diciembre"
|
||||
Next
|
||||
Dt5.Rows.Add(RowEnero)
|
||||
Dt5.Rows.Add(RowFebrero)
|
||||
Dt5.Rows.Add(RowMarzo)
|
||||
Dt5.Rows.Add(RowAbril)
|
||||
Dt5.Rows.Add(RowMayo)
|
||||
Dt5.Rows.Add(RowJunio)
|
||||
Dt5.Rows.Add(RowJulio)
|
||||
Dt5.Rows.Add(RowAgosto)
|
||||
Dt5.Rows.Add(RowSeptiembre)
|
||||
Dt5.Rows.Add(RowOctubre)
|
||||
Dt5.Rows.Add(RowNoviembre)
|
||||
Dt5.Rows.Add(RowDiciembre)
|
||||
|
||||
|
||||
RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
134
Finanzas/FinanCuentas.aspx
Normal file
134
Finanzas/FinanCuentas.aspx
Normal file
@@ -0,0 +1,134 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FinanCuentas.aspx.vb" Inherits="Finanzas_FinanCuentas" %>
|
||||
|
||||
<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 language="javascript" 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);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpAgregar" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlAgregar" runat="server" DefaultButton="LbAgregar">
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="350px">Cuenta</th>
|
||||
<th width="75px">Meta ($)</th>
|
||||
<th width="50px">Año</th>
|
||||
<th width="100px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" TabIndex="10" runat="server" ClientIDMode="Static" Width="340px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" SetFocusOnError="True" ControlToValidate="TxtCuenta" 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="GrpAgregar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtMeta" Width="70px" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="TxtMeta" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="TxtMeta" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meta''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtMeta" Display="None" Type="Double" MinimumValue="0.1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meta''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtAnio" Width="50px" MaxLength="4" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtAnio" FilterType="Numbers" />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVAnio" ControlToValidate="TxtAnio" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVAnio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVAnio" runat="server" ControlToValidate="TxtAnio" Display="None" Type="Integer" MinimumValue="2000" MaximumValue="2020" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RVAnio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" Text="Agregar" OnClick="LbAgregar_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCuenta" Text='<%# Eval("Cargo", "{0:N2}")%>' runat="server" ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
|
||||
<ProgressTemplate>
|
||||
<div id="overlay">
|
||||
<div id="modalprogress">
|
||||
<div id="theprogress">
|
||||
<center>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>La información se está procesando...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
</asp:Content>
|
||||
|
||||
109
Finanzas/FinanCuentas.aspx.vb
Normal file
109
Finanzas/FinanCuentas.aspx.vb
Normal file
@@ -0,0 +1,109 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Finanzas_FinanCuentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
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 DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = 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
|
||||
|
||||
CargaCuentas()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentas()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ClsConta.GetCuentas(-1, "-1", 1) Then
|
||||
DTCuentas = ClsConta.DtResultados
|
||||
End If
|
||||
|
||||
ClsConta.Dispose()
|
||||
End Sub
|
||||
|
||||
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 Then
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("Id"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
End If
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ClsContabilidad As New ClsContabilidad
|
||||
|
||||
If ClsContabilidad.GetFinan_Metas(-1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ClsContabilidad.DtResultados
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar las Metas. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
|
||||
ClsContabilidad.Dispose()
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
CargaGrid()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs)
|
||||
Dim ClsContabilidad As New ClsContabilidad
|
||||
|
||||
If ClsContabilidad.AddFinan_Metas(TxtMeta.Text.ToDecimal, HdnCveCuenta.Value.ToEntero, TxtAnio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La meta fue agregada exitosamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar La meta.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ClsContabilidad.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
138
Finanzas/FinanMetas.aspx
Normal file
138
Finanzas/FinanMetas.aspx
Normal file
@@ -0,0 +1,138 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FinanMetas.aspx.vb" Inherits="Finanzas_FinanMetas" %>
|
||||
|
||||
<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">
|
||||
Metas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
<script language="javascript" 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);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpAgregar" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlAgregar" runat="server" DefaultButton="LbAgregar">
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="350px">Cuenta</th>
|
||||
<th width="75px">Meta ($)</th>
|
||||
<th width="50px">Año</th>
|
||||
<th width="100px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
||||
<asp:TextBox ID="TxtCuenta" TabIndex="10" runat="server" ClientIDMode="Static" Width="340px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" SetFocusOnError="True" ControlToValidate="TxtCuenta" 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="GrpAgregar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtMeta" Width="70px" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbeCant" runat="server" TargetControlID="TxtMeta" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVCantidad" ControlToValidate="TxtMeta" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meta''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtMeta" Display="None" Type="Double" MinimumValue="0.1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meta''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtAnio" Width="50px" MaxLength="4" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtAnio" FilterType="Numbers" />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RFVAnio" ControlToValidate="TxtAnio" ValidationGroup="GrpAgregar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVAnio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVAnio" runat="server" ControlToValidate="TxtAnio" Display="None" Type="Integer" MinimumValue="2000" MaximumValue="2020" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpAgregar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RVAnio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" Text="Agregar" OnClick="LbAgregar_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtCuenta" Text='<%# Eval("Cargo", "{0:N2}")%>' runat="server" ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
|
||||
<ProgressTemplate>
|
||||
<div id="overlay">
|
||||
<div id="modalprogress">
|
||||
<div id="theprogress">
|
||||
<center>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>La información se está procesando...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
</asp:Content>
|
||||
109
Finanzas/FinanMetas.aspx.vb
Normal file
109
Finanzas/FinanMetas.aspx.vb
Normal file
@@ -0,0 +1,109 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Finanzas_FinanMetas
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
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 DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = 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
|
||||
|
||||
CargaCuentas()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentas()
|
||||
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ClsConta.GetCuentas(-1, "-1", 1) Then
|
||||
DTCuentas = ClsConta.DtResultados
|
||||
End If
|
||||
|
||||
ClsConta.Dispose()
|
||||
End Sub
|
||||
|
||||
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 Then
|
||||
For Each dr As DataRow In dt.Rows
|
||||
i += 1
|
||||
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("Id"), dr("CtaCodigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
|
||||
Next
|
||||
End If
|
||||
|
||||
Return Str.ToString
|
||||
End Function
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ClsContabilidad As New ClsContabilidad
|
||||
|
||||
If ClsContabilidad.GetFinan_Metas(-1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ClsContabilidad.DtResultados
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar las Metas. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
|
||||
ClsContabilidad.Dispose()
|
||||
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
CargaGrid()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs)
|
||||
Dim ClsContabilidad As New ClsContabilidad
|
||||
|
||||
If ClsContabilidad.AddFinan_Metas(TxtMeta.Text.ToDecimal, HdnCveCuenta.Value.ToEntero, TxtAnio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("La meta fue agregada exitosamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar La meta.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ClsContabilidad.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
17
Finanzas/FinanVentasProyecciones.aspx
Normal file
17
Finanzas/FinanVentasProyecciones.aspx
Normal file
@@ -0,0 +1,17 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FinanVentasProyecciones.aspx.vb" Inherits="Finanzas_FinanVentasProyecciones" %>
|
||||
|
||||
<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">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
5
Finanzas/FinanVentasProyecciones.aspx.vb
Normal file
5
Finanzas/FinanVentasProyecciones.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
Partial Class Finanzas_FinanVentasProyecciones
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
928
Finanzas/RepBalanceGeneral.aspx
Normal file
928
Finanzas/RepBalanceGeneral.aspx
Normal file
@@ -0,0 +1,928 @@
|
||||
<%@ 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" visible="false" 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>
|
||||
977
Finanzas/RepBalanceGeneral.aspx.vb
Normal file
977
Finanzas/RepBalanceGeneral.aspx.vb
Normal file
@@ -0,0 +1,977 @@
|
||||
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.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 = Now.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, Now.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(Date.Now) - 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))
|
||||
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||
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
|
||||
849
Finanzas/RepBalanceGeneralHorizontal.aspx
Normal file
849
Finanzas/RepBalanceGeneralHorizontal.aspx
Normal file
@@ -0,0 +1,849 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepBalanceGeneralHorizontal.aspx.vb" Inherits="Contabilidad_RepBalanceGeneralHorizontal" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.chart, .chartanio, .chartcc {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.grafica {
|
||||
font-size: 4em;
|
||||
cursor: pointer;
|
||||
color: #AAA;
|
||||
margin: 0px 20px;
|
||||
}
|
||||
|
||||
.gselected {
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
.noMargin {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
|
||||
.txtid2em > td:nth-child(2) > span,.txtid2em > td:nth-child(1) > span {
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
.txtid4em > td:nth-child(2) > span,.txtid4em > td:nth-child(1) > span {
|
||||
text-indent: 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;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Balance General Horizontal
|
||||
</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: 67px;">
|
||||
<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;" ValidationGroup="GrpCargaAsignados"></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="TabPanel3" runat="server" HeaderText="Mensual">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpMensual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table ADSCROLLER2 table-hover">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre" ItemStyle-CssClass="Texto">
|
||||
<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>
|
||||
<asp:HyperLink runat="server" ID="HLNombre" Target="_blank" ItemStyle-HorizontalAlign="Left"> <%# Eval("Nombre") %></asp:HyperLink>
|
||||
</span>
|
||||
</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="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="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="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="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="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" />
|
||||
</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 GvAnual">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px">
|
||||
<ItemTemplate>
|
||||
<span class="truncate " style="width: 500px;">
|
||||
<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 HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px" />--%>
|
||||
<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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Por Centro Costo">
|
||||
<ContentTemplate>
|
||||
<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 EscondeCC">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px">
|
||||
<ItemTemplate>
|
||||
<span class="truncate " style="width: 300px;">
|
||||
<asp:Label ID="lblchart" Visible="false" CssClass="chartcc" 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}" 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" />
|
||||
</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" />
|
||||
<asp:HiddenField ID="HdfTituloscc" ClientIDMode="Static" Value="" 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>
|
||||
|
||||
</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() == '0.00$') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
if (!($(this).html() == '-' || $(this).html() == '' || ~$(this).html().indexOf("%") || ~$(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 EscondeCC() {
|
||||
var Suma = 0.0;
|
||||
var Parametro = 0;
|
||||
|
||||
var i;
|
||||
for (i = 0; i < arguments.length; ++i) {
|
||||
Parametro = arguments[i];
|
||||
|
||||
$('.EscondeCC td:nth-child(' + Parametro + ')').each(function (i, obj) {
|
||||
Suma += ToDouble($(this).html())
|
||||
});
|
||||
|
||||
if (Suma == 0) {
|
||||
$('.EscondeCC th:nth-child(' + Parametro + ')').hide();
|
||||
$('.EscondeCC td:nth-child(' + Parametro + ')').hide();
|
||||
|
||||
$('.EscondeCC th:nth-child(' + (Parametro + 1) + ')').hide();
|
||||
$('.EscondeCC td:nth-child(' + (Parametro + 1) + ')').hide();
|
||||
}
|
||||
|
||||
Suma = 0;
|
||||
}
|
||||
}
|
||||
|
||||
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() {
|
||||
//var width = $('.GvAnual tr:nth-child(1) td:nth-child(1)').width() - 5;
|
||||
// $('.GvAnual > tbody > tr:nth-child > td:nth-child(1) > span').css("width", width);
|
||||
|
||||
}
|
||||
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();
|
||||
});
|
||||
$('body').on('click', 'table .chartcc', function (e) {
|
||||
var thisobj = $(this);
|
||||
tipo = 'cc';
|
||||
$('#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 {
|
||||
if (tipo == 'anio') { titulos = $('#HdfTitulosA').val().split(','); }
|
||||
else { titulos = $('#HdfTituloscc').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 {
|
||||
if (tipo == 'anio') { titulos = $('#HdfTitulosA').val().split(','); }
|
||||
else { titulos = $('#HdfTituloscc').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 {
|
||||
if (tipo == 'anio') { titulos = $('#HdfTitulosA').val().split(','); }
|
||||
else { titulos = $('#HdfTituloscc').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>
|
||||
|
||||
475
Finanzas/RepBalanceGeneralHorizontal.aspx.vb
Normal file
475
Finanzas/RepBalanceGeneralHorizontal.aspx.vb
Normal file
@@ -0,0 +1,475 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad_RepBalanceGeneralHorizontal
|
||||
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
|
||||
Public Property DtHeadersAnual As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtHeadersAnual"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtHeadersAnual") = 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
|
||||
InicializaValores()
|
||||
Else
|
||||
ReCreate()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
DdlEjercicio.SelectedValueExist(Now.Year.ToString)
|
||||
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(Now.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 BtnCargaDatos_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 = 1 Then
|
||||
DdlEjercicio.SelectedValueExist(EjercicioMin.ToString)
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub ReCreate()
|
||||
If DtHeadersAnual Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Index = 1
|
||||
For Each Dr As DataRow In DtHeadersAnual.Rows
|
||||
Dim Test As New LinkButton
|
||||
Test.CssClass = "Texto"
|
||||
Test.Text = Dr("Ejercicio").ToString
|
||||
Test.CommandArgument = Dr("Ejercicio").ToString
|
||||
AddHandler Test.Click, AddressOf AnualToMensual
|
||||
GvAnual.HeaderRow.Cells(Index).Controls.Add(Test)
|
||||
Index += 3
|
||||
Next
|
||||
End Sub
|
||||
Protected Sub AnualToMensual(sender As Object, e As EventArgs)
|
||||
Tab.ActiveTabIndex = 0
|
||||
DdlEjercicio.SelectedValue = CType(sender, LinkButton).CommandArgument
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim ColumnasEsconder = ""
|
||||
Dim Script = $"LimpiaCeros({DdlDivisor.SelectedValue});"
|
||||
DtHeadersAnual = Nothing
|
||||
Dim IdGV = ""
|
||||
|
||||
|
||||
If Tab.ActiveTabIndex = 0 Then
|
||||
IdGV = GvMensual2.ClientID
|
||||
If Conta.GetBalanceGeneralMensualVertical(DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
Conta.DtResultados.Columns.Add("EjercicioFiltro", GetType(Integer))
|
||||
Conta.DtResultados.Columns.Add("SubProyectoFiltro", GetType(Integer))
|
||||
Conta.DtResultados.Columns.Add("DivisorFiltro", GetType(Integer))
|
||||
GvMensual2.DataSource = Conta.DtResultados
|
||||
Else
|
||||
GvMensual2.DataSource = Nothing
|
||||
End If
|
||||
GvMensual2.DataBind()
|
||||
UpMensual.Update()
|
||||
ElseIf Tab.ActiveTabIndex = 1 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 = $"a{Dr("Ejercicio").ToString}"
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
|
||||
titulos.Append($"{IIf(Index = 1, "", ",")}{Dr("Ejercicio").ToString}")
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
GvAnual.Columns(Index + 1).Visible = True
|
||||
CType(GvAnual.Columns(Index + 1), BoundField).DataField = $"Variaciona{Dr("Ejercicio").ToString}Importe"
|
||||
GvAnual.Columns(Index + 1).HeaderText = "$"
|
||||
|
||||
GvAnual.Columns(Index + 2).Visible = True
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = $"Variaciona{Dr("Ejercicio").ToString}Porcentaje"
|
||||
GvAnual.Columns(Index + 2).HeaderText = "%"
|
||||
End If
|
||||
|
||||
Index += 3
|
||||
Next
|
||||
HdfTitulosA.Value = titulos.ToString
|
||||
|
||||
GvAnual.DataBind()
|
||||
|
||||
DtHeadersAnual = DtHeaders
|
||||
Index = 1
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
Dim Test As New LinkButton
|
||||
Test.CssClass = "Texto"
|
||||
Test.Text = Dr("Ejercicio").ToString
|
||||
Test.CommandArgument = Dr("Ejercicio").ToString
|
||||
AddHandler Test.Click, AddressOf AnualToMensual
|
||||
GvAnual.HeaderRow.Cells(Index).Controls.Add(Test)
|
||||
Index += 3
|
||||
Next
|
||||
|
||||
|
||||
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($"a{Dr("Ejercicio").ToString}")}")
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
Porcentajes.Append($"{prefix}{row($"Variaciona{Dr("Ejercicio").ToString}Porcentaje")}")
|
||||
Else
|
||||
Porcentajes.Append($"{prefix}0")
|
||||
End If
|
||||
Index += 3
|
||||
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
|
||||
UPModal.Update()
|
||||
UpAnual.Update()
|
||||
|
||||
Else
|
||||
GvAnual.DataSource = Nothing
|
||||
End If
|
||||
ElseIf Tab.ActiveTabIndex = 2 Then
|
||||
IdGV = GvCC.ClientID
|
||||
If Conta.GetBalanceGeneralHorizontalCC(DdlEjercicio.SelectedValue.ToEntero, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) 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
|
||||
Dim Titulos As New StringBuilder
|
||||
ColumnasEsconder = "3"
|
||||
Titulos.Append("Sin SubProyecto")
|
||||
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
|
||||
Titulos.Append($",{Dr("SubProyecto")}")
|
||||
|
||||
GvCC.Columns(Index + 1).Visible = True
|
||||
CType(GvCC.Columns(Index + 1), BoundField).DataField = $"SubProyecto{Dr("SubProyecto").ToString}Porcentaje"
|
||||
GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
|
||||
|
||||
ColumnasEsconder = $"{ColumnasEsconder},{Index + 1}"
|
||||
Index += 2
|
||||
|
||||
'If Conta.DSResultados.Tables(1).SUM($"SubProyecto{Dr("SubProyecto").ToString}") = 0 Then
|
||||
' GvCC.Columns(Index).Visible = False
|
||||
' GvCC.Columns(Index + 1).Visible = False
|
||||
'End If
|
||||
|
||||
Next
|
||||
HdfTituloscc.Value = Titulos.ToString
|
||||
|
||||
GvCC.DataBind()
|
||||
|
||||
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
|
||||
valores.Append($"{row($"SubProyectoNA")}")
|
||||
Porcentajes.Append($"{row($"SubProyectoNAPorcentaje")}")
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
valores.Append($",{row($"SubProyecto{Dr("SubProyecto").ToString}")}")
|
||||
If Not DdlSubProyecto.SelectedValue = Dr("SubProyecto").ToString Then
|
||||
Porcentajes.Append($",{row($"SubProyecto{Dr("SubProyecto").ToString}Porcentaje")}")
|
||||
Else
|
||||
Porcentajes.Append($",0")
|
||||
End If
|
||||
|
||||
Next
|
||||
Dim lbl As Label = GvCC.Rows(IndexRow).FCLabel("lblchart")
|
||||
lbl.Attributes.Add("data-value", valores.ToString)
|
||||
lbl.Attributes.Add("data-porcentaje", Porcentajes.ToString)
|
||||
IndexRow += 1
|
||||
Next
|
||||
UpCC.Update()
|
||||
UPModal.Update()
|
||||
|
||||
Script = $"LimpiaCeros({DdlDivisor.SelectedValue});EscondeCC({ColumnasEsconder});"
|
||||
Else
|
||||
GvCC.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipo.SelectedValue.ToEntero > 0 Then
|
||||
Script = $"{Script};EscondeRenglones('{IdGV}');"
|
||||
End If
|
||||
|
||||
RegistraScript(Script)
|
||||
UpFiltros.Update()
|
||||
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.DataRow Then
|
||||
|
||||
|
||||
'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}"
|
||||
End If
|
||||
|
||||
|
||||
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")
|
||||
cssclass = "txtid2em"
|
||||
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")
|
||||
End If
|
||||
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
cssclass = "txtid4em"
|
||||
Dim lbl As Label = e.Row.FCLabel("lblchart")
|
||||
lbl.Visible = True
|
||||
lbl.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")))
|
||||
lbl.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
|
||||
|
||||
'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}"
|
||||
End If
|
||||
|
||||
|
||||
'TOTAL
|
||||
Dim cssclass As String = ""
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
cssclass = "txtid2em"
|
||||
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")
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
cssclass = "txtid4em"
|
||||
e.Row.FindControl("lblchart").Visible = True
|
||||
End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
cssclass = "txtid2em"
|
||||
Dim Index = 0
|
||||
For Index = 1 To GvAnual.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 GvAnual.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.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/RepAnexoCatalogoCC.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}"
|
||||
End If
|
||||
|
||||
|
||||
'TOTAL
|
||||
Dim cssclass As String = ""
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
cssclass = "txtid2em"
|
||||
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")
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
cssclass = "txtid4em"
|
||||
e.Row.FindControl("lblchart").Visible = True
|
||||
End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
cssclass = "txtid2em"
|
||||
Dim Index = 0
|
||||
For Index = 1 To GvAnual.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 GvAnual.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
710
Finanzas/RepBalanceGeneralVertical.aspx
Normal file
710
Finanzas/RepBalanceGeneralVertical.aspx
Normal file
@@ -0,0 +1,710 @@
|
||||
<%@ 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;" 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="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>
|
||||
356
Finanzas/RepBalanceGeneralVertical.aspx.vb
Normal file
356
Finanzas/RepBalanceGeneralVertical.aspx.vb
Normal file
@@ -0,0 +1,356 @@
|
||||
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(Now.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(Now.Year.ToString)
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
|
||||
DdlPeriodo.SelectedValue = Now.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 = $"a{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 = $"a{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($"a{Dr("Ejercicio").ToString}")}")
|
||||
Porcentajes.Append($"{prefix}{row($"a{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
|
||||
563
Finanzas/RepEstadoResultados.aspx
Normal file
563
Finanzas/RepEstadoResultados.aspx
Normal file
@@ -0,0 +1,563 @@
|
||||
<%@ 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>
|
||||
|
||||
660
Finanzas/RepEstadoResultados.aspx.vb
Normal file
660
Finanzas/RepEstadoResultados.aspx.vb
Normal file
@@ -0,0 +1,660 @@
|
||||
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
|
||||
|
||||
'tdTipoReporte.Visible = True
|
||||
TipoReporte = 1
|
||||
|
||||
|
||||
CargaDatosGenerales()
|
||||
|
||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||
|
||||
Anos = 0
|
||||
|
||||
'Normal
|
||||
TotalActual = 0
|
||||
TotalAnterior = 0
|
||||
DdlPeriodo.SelectedValue = Now.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 String = DdlSubproyecto.SelectedValue.ToString
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetEstadoActividades(FechaI.ToDate, FechaF.ToDate, TipoReporte, 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(Date.Now) - 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
|
||||
826
Finanzas/RepEstadoResultadosHorizontal.aspx
Normal file
826
Finanzas/RepEstadoResultadosHorizontal.aspx
Normal file
@@ -0,0 +1,826 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad2_RepEstadoResultadosHorizontal" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.chart, .chartanio {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.grafica {
|
||||
font-size: 4em;
|
||||
cursor: pointer;
|
||||
color: #AAA;
|
||||
margin: 0px 20px;
|
||||
}
|
||||
|
||||
.gselected {
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
.noMargin {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
|
||||
.txtid2em > td:nth-child(2) > span,.txtid2em > td:nth-child(1) > span {
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
.txtid4em > td:nth-child(2) > span,.txtid4em > td:nth-child(1) > span {
|
||||
text-indent: 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;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Resultados Horizontal
|
||||
</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: 67px;">
|
||||
<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;" ValidationGroup="GrpCargaAsignados"></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="TabPanel3" runat="server" HeaderText="Mensual">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpMensual" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table ADSCROLLER2 table-hover">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre" ItemStyle-CssClass="Texto">
|
||||
<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>
|
||||
<asp:HyperLink runat="server" ID="HLNombre" Target="_blank" ItemStyle-HorizontalAlign="Left"> <%# Eval("Nombre") %></asp:HyperLink>
|
||||
</span>
|
||||
</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="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="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="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="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="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" />
|
||||
</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 GvAnual table-hover">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px">
|
||||
<ItemTemplate>
|
||||
<span class="truncate " style="width: 300px;">
|
||||
<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 HeaderText="Nombre" DataField="Nombre" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px" />--%>
|
||||
<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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="50px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Por Centro Costo">
|
||||
<ContentTemplate>
|
||||
<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:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px">
|
||||
<ItemTemplate>
|
||||
<span class="truncate " style="width: 300px;">
|
||||
<asp:Label ID="lblchart" Visible="false" CssClass="chartcc" 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>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<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" />
|
||||
</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" />
|
||||
<asp:HiddenField ID="HdfTituloscc" ClientIDMode="Static" Value="" 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>
|
||||
|
||||
</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());
|
||||
}
|
||||
$(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() {
|
||||
//var width = $('.GvAnual tr:nth-child(1) td:nth-child(1)').width() - 5;
|
||||
// $('.GvAnual > tbody > tr:nth-child > td:nth-child(1) > span').css("width", width);
|
||||
|
||||
}
|
||||
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();
|
||||
});
|
||||
$('body').on('click', 'table .chartcc', function (e) {
|
||||
var thisobj = $(this);
|
||||
tipo = 'cc';
|
||||
$('#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 {
|
||||
if (tipo == 'anio') { titulos = $('#HdfTitulosA').val().split(','); }
|
||||
else { titulos = $('#HdfTituloscc').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 {
|
||||
if (tipo == 'anio') { titulos = $('#HdfTitulosA').val().split(','); }
|
||||
else { titulos = $('#HdfTituloscc').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 {
|
||||
if (tipo == 'anio') { titulos = $('#HdfTitulosA').val().split(','); }
|
||||
else { titulos = $('#HdfTituloscc').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>
|
||||
|
||||
421
Finanzas/RepEstadoResultadosHorizontal.aspx.vb
Normal file
421
Finanzas/RepEstadoResultadosHorizontal.aspx.vb
Normal file
@@ -0,0 +1,421 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepEstadoResultadosHorizontal
|
||||
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
|
||||
Public Property DtHeaders As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtHeaders"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtHeaders") = 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
|
||||
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(Now.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 BtnCargaDatos.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim Conta As New ClsContabilidad
|
||||
Dim IdGV = ""
|
||||
|
||||
|
||||
If Tab.ActiveTabIndex = 0 Then
|
||||
IdGV = GvMensual2.ClientID
|
||||
|
||||
If Conta.GetEstadoResultadoMensualHorizontal(DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvMensual2.DataSource = Conta.DtResultados
|
||||
Else
|
||||
GvMensual2.DataSource = Nothing
|
||||
End If
|
||||
GvMensual2.DataBind()
|
||||
UpMensual.Update()
|
||||
ElseIf Tab.ActiveTabIndex = 1 Then
|
||||
IdGV = GvAnual.ClientID
|
||||
|
||||
If Conta.GetEstadoResultadosAnualHorizontal(DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
DtHeaders = 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 = $"a{Dr("Ejercicio").ToString}"
|
||||
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
|
||||
titulos.Append($"{IIf(Index = 1, "", ",")}{Dr("Ejercicio").ToString}")
|
||||
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
GvAnual.Columns(Index + 1).Visible = True
|
||||
CType(GvAnual.Columns(Index + 1), BoundField).DataField = $"Variaciona{Dr("Ejercicio").ToString}Importe"
|
||||
GvAnual.Columns(Index + 1).HeaderText = "$"
|
||||
|
||||
GvAnual.Columns(Index + 2).Visible = True
|
||||
CType(GvAnual.Columns(Index + 2), BoundField).DataField = $"Variaciona{Dr("Ejercicio").ToString}Porcentaje"
|
||||
GvAnual.Columns(Index + 2).HeaderText = "%"
|
||||
End If
|
||||
|
||||
Index += 3
|
||||
Next
|
||||
HdfTitulosA.Value = titulos.ToString
|
||||
|
||||
GvAnual.DataBind()
|
||||
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($"a{Dr("Ejercicio").ToString}")}")
|
||||
If Not DdlEjercicio.SelectedValue = Dr("Ejercicio").ToString Then
|
||||
Porcentajes.Append($"{prefix}{row($"Variaciona{Dr("Ejercicio").ToString}Porcentaje")}")
|
||||
Else
|
||||
Porcentajes.Append($"{prefix}0")
|
||||
End If
|
||||
Index += 3
|
||||
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()
|
||||
UPModal.Update()
|
||||
|
||||
Else
|
||||
GvAnual.DataSource = Nothing
|
||||
End If
|
||||
ElseIf Tab.ActiveTabIndex = 2 Then
|
||||
IdGV = GvCC.ClientID
|
||||
|
||||
If Conta.GetEstadoResultadosHorizontalCC(DdlEjercicio.SelectedValue.ToEntero, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
DtHeaders = 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
|
||||
Dim Titulos As New StringBuilder
|
||||
Titulos.Append("Sin SubProyecto")
|
||||
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
|
||||
Titulos.Append($",{Dr("SubProyecto")}")
|
||||
|
||||
|
||||
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
|
||||
HdfTituloscc.Value = Titulos.ToString
|
||||
|
||||
GvCC.DataBind()
|
||||
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
|
||||
valores.Append($"{row($"SubProyectoNA")}")
|
||||
Porcentajes.Append($"{row($"SubProyectoNAPorcentaje")}")
|
||||
For Each Dr As DataRow In DtHeaders.Rows
|
||||
valores.Append($",{row($"SubProyecto{Dr("SubProyecto").ToString}")}")
|
||||
If Not DdlSubProyecto.SelectedValue = Dr("SubProyecto").ToString Then
|
||||
Porcentajes.Append($",{row($"SubProyecto{Dr("SubProyecto").ToString}Porcentaje")}")
|
||||
Else
|
||||
Porcentajes.Append($",0")
|
||||
End If
|
||||
|
||||
Next
|
||||
Dim lbl As Label = GvCC.Rows(IndexRow).FCLabel("lblchart")
|
||||
lbl.Attributes.Add("data-value", valores.ToString)
|
||||
lbl.Attributes.Add("data-porcentaje", Porcentajes.ToString)
|
||||
IndexRow += 1
|
||||
Next
|
||||
UpCC.Update()
|
||||
UPModal.Update()
|
||||
|
||||
Else
|
||||
GvCC.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)
|
||||
|
||||
UpFiltros.Update()
|
||||
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.DataRow Then
|
||||
|
||||
|
||||
'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}"
|
||||
End If
|
||||
|
||||
|
||||
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")
|
||||
'e.Row.Style.Add("text-indent", "2em")
|
||||
cssclass = "txtid2em"
|
||||
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")
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
' e.Row.Style.Add("text-indent", "4em")
|
||||
cssclass = "txtid4em"
|
||||
|
||||
Dim lbl As Label = e.Row.FCLabel("lblchart")
|
||||
lbl.Visible = True
|
||||
lbl.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")))
|
||||
lbl.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
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
'e.Row.Style.Add("text-indent", "2em")
|
||||
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}"
|
||||
End If
|
||||
|
||||
|
||||
'TOTAL
|
||||
Dim cssclass As String = ""
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
cssclass = "txtid2em"
|
||||
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")
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
cssclass = "txtid4em"
|
||||
e.Row.FindControl("lblchart").Visible = True
|
||||
End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
cssclass = "txtid2em"
|
||||
Dim Index = 0
|
||||
For Index = 1 To GvAnual.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 GvAnual.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.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/RepAnexoCatalogoCC.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
Dim cssclass As String = ""
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "99" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
e.Row.Style.Add("font-style", "italic")
|
||||
cssclass = "txtid2em"
|
||||
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")
|
||||
End If
|
||||
|
||||
'NORMAL
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
|
||||
cssclass = "txtid4em"
|
||||
e.Row.FindControl("lblchart").Visible = True
|
||||
End If
|
||||
|
||||
'CABECERA
|
||||
If e.Row.DBCampo("CtaMayor").ToString = "3" Then
|
||||
e.Row.Style.Add("font-weight", "bold")
|
||||
cssclass = "txtid2em"
|
||||
Dim Index = 0
|
||||
For Index = 1 To GvAnual.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 GvAnual.Columns.Count - 1
|
||||
e.Row.Cells(Index).Text = ""
|
||||
Next Index
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
671
Finanzas/RepEstadoResultadosVertical.aspx
Normal file
671
Finanzas/RepEstadoResultadosVertical.aspx
Normal file
@@ -0,0 +1,671 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosVertical.aspx.vb" Inherits="Finanzas_RepEstadoResultadosVertical" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.chart, .chartanio {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.grafica {
|
||||
font-size: 4em;
|
||||
cursor: pointer;
|
||||
color: #AAA;
|
||||
margin: 0px 20px;
|
||||
}
|
||||
|
||||
.gselected {
|
||||
color: #009688;
|
||||
}
|
||||
|
||||
.noMargin {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.txtid2em > td:nth-child(1) > span {
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
.txtid4em > td:nth-child(1) > span {
|
||||
text-indent: 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;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Estado de Resultados - 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;" 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="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: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>
|
||||
<asp:HyperLink ID="Hpl" runat="server" Text='<%# Eval("Nombre")%>' NavigateUrl='<%#String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1:d}", Eval("CveCuenta"), Eval("FechaFin"))%>'></asp:HyperLink>
|
||||
</span>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" CssClass="table table-hover">
|
||||
<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>
|
||||
<asp:HyperLink runat="server" ID="HLNombre" Target="_blank" ItemStyle-HorizontalAlign="Left"> <%# Eval("Nombre") %></asp:HyperLink>
|
||||
</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());
|
||||
}
|
||||
$(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();
|
||||
} else {
|
||||
$(this).css("text-indent", "4em");;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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() {
|
||||
//var width = $('.GvAnual tr:nth-child(1) td:nth-child(1)').width() - 5;
|
||||
// $('.GvAnual > tbody > tr:nth-child > td:nth-child(1) > span').css("width", width);
|
||||
|
||||
}
|
||||
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>
|
||||
|
||||
388
Finanzas/RepEstadoResultadosVertical.aspx.vb
Normal file
388
Finanzas/RepEstadoResultadosVertical.aspx.vb
Normal file
@@ -0,0 +1,388 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Finanzas_RepEstadoResultadosVertical
|
||||
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
|
||||
Private Property VerticalValores As String
|
||||
Private Property VerticalProcentajes As String
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
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(Now.Year.ToString)
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
|
||||
DdlPeriodo.SelectedValue = Now.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.GetEstadoResultadosVertical(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.GetEstadoResultadoMensualHorizontal(DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvMensual2.DataSource = Conta.DtResultados
|
||||
Else
|
||||
GvMensual2.DataSource = Nothing
|
||||
End If
|
||||
GvMensual2.DataBind()
|
||||
UpMensual.Update()
|
||||
ElseIf Tab.ActiveTabIndex = 2 Then
|
||||
IdGV = GvAnual.ClientID
|
||||
|
||||
If Conta.GetEstadoResultadosAnualHorizontal(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 = $"a{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 = $"a{Dr("Ejercicio").ToString}Porcentaje"
|
||||
GvAnual.Columns(Index + 1).HeaderText = "%"
|
||||
Index += 2
|
||||
Next
|
||||
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($"a{Dr("Ejercicio").ToString}")}")
|
||||
Porcentajes.Append($"{prefix}{row($"a{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
|
||||
'ElseIf Tab.ActiveTabIndex = 3 Then
|
||||
' If Conta.GetEstadoResultadosHorizontalCC(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) 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
|
||||
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)
|
||||
|
||||
UpFiltros.Update()
|
||||
UPModal.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.Style.Add("text-indent", "2em")
|
||||
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.Style.Add("text-indent", "2em")
|
||||
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
|
||||
1139
Finanzas/RepOrigenAplicacion.aspx
Normal file
1139
Finanzas/RepOrigenAplicacion.aspx
Normal file
File diff suppressed because it is too large
Load Diff
360
Finanzas/RepOrigenAplicacion.aspx.vb
Normal file
360
Finanzas/RepOrigenAplicacion.aspx.vb
Normal file
@@ -0,0 +1,360 @@
|
||||
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(Now), Month(Now), 1).ToShortDateString
|
||||
TxtFechaAl.Text = Date.Now.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 = Now.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 = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
|
||||
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, 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(Date.Now) - 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
|
||||
220
Finanzas/RepRazonesFinancieras.aspx
Normal file
220
Finanzas/RepRazonesFinancieras.aspx
Normal file
@@ -0,0 +1,220 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRazonesFinancieras.aspx.vb" Inherits="Finanzas_RepRazonesFinancieras" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
#div_Grafica{
|
||||
width:100%;
|
||||
height:400px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Razones Financieras
|
||||
</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:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="btn-group pull-right btn-separete">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Width="95" class="btn btn-fit-height btnopaco" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</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">
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlRazones" runat="server" DataTextField="RazonFinanciera" DataValueField="Codigo" Class=" form-control input-inline input-small input-sm">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Centro de Costo</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubproyectos" CssClass="form-control select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Escala</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEscala" runat="server" CssClass="form-control select2me" Width="70px" >
|
||||
<asp:ListItem Value="1" Text="Unidad"></asp:ListItem>
|
||||
<asp:ListItem Value="1000" Text="Miles" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1000000" Text="Millones"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Periodo</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="form-control select2me" Width="100px" >
|
||||
<asp:ListItem Value="M" Text="Mensual" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="B" Text="Bimestral"></asp:ListItem>
|
||||
<asp:ListItem Value="T" Text="Trimestral"></asp:ListItem>
|
||||
<asp:ListItem Value="C" Text="Cuatrimentral"></asp:ListItem>
|
||||
<asp:ListItem Value="S" Text="Semestral"></asp:ListItem>
|
||||
<asp:ListItem Value="A" Text="Anual"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
Gráfica
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" CssClass="form-control select2me" Width="70px" >
|
||||
<asp:ListItem Value="L" Text="Lineas" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="B" Text="Barras"></asp:ListItem>
|
||||
<asp:ListItem Value="S" Text="Stacked"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
Titulos <asp:TextBox ID="TxtTitulo" runat="server" Width="200px" CssClass="input-sm"></asp:TextBox>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Inicio</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaI" 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="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Fin</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaF" 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="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Muestra valores</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkMuestraValores" runat="server" Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
|
||||
<ContentTemplate>
|
||||
<div id="div_Grafica" ></div>
|
||||
|
||||
<asp:GridView ID="GVDatos" CssClass="Widthall table table-striped tablita" GridLines="none" runat="server" OnRowDataBound="GVDatos_RowDataBound"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<script>
|
||||
|
||||
function LimpiaCeros(Divisor) {
|
||||
debugger;
|
||||
|
||||
$('.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) {
|
||||
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 recargatabla() {
|
||||
if ($('.tablita').data('cargada') == 1) {
|
||||
} else {
|
||||
$('.tablita').data('cargada', '1');
|
||||
$('table.tablita tr').each(function (index) {
|
||||
if (index > 0) {
|
||||
$($(this).find('td')).each(function (index2) {
|
||||
if (index2 > 0) {
|
||||
$(this).html('<span data-toggle="tooltip" title="' + $(this).html() + '">' + addCommas($(this).html()) + '</span>');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$($(this).find('th')).each(function (index2) {
|
||||
if (index2 = 0) {
|
||||
$(this).html('');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function addCommas(nStr) {
|
||||
nStr += '';
|
||||
var x = nStr.split('.');
|
||||
var x1 = x[0];
|
||||
var x2 = x.length > 1 ? '.' + x[1] : '';
|
||||
var rgx = /(\d+)(\d{3})/;
|
||||
while (rgx.test(x1)) {
|
||||
x1 = x1.replace(rgx, '$1' + ',' + '$2');
|
||||
}
|
||||
var retorno = x1 + x2;
|
||||
if (retorno == 'NaN') {
|
||||
retorno = nStr;
|
||||
}
|
||||
return retorno;
|
||||
}
|
||||
|
||||
function filldata() {
|
||||
CargaGrafica();
|
||||
recargatabla();
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
filldata()
|
||||
});
|
||||
filldata()
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
427
Finanzas/RepRazonesFinancieras.aspx.vb
Normal file
427
Finanzas/RepRazonesFinancieras.aspx.vb
Normal file
@@ -0,0 +1,427 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Partial Class Finanzas_RepRazonesFinancieras
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
DdlRazones.Attributes.Add("onclick", "$('#C_TxtTitulo').val ($('#C_DdlRazones option:selected').text()); ")
|
||||
TxtTitulo.Text = DdlRazones.SelectedItem.Text
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlRazones.DataSource = GlobalDTFinan_RazonesFinancieras
|
||||
DdlRazones.DataBind()
|
||||
|
||||
DdlSubproyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubproyectos.DataBind()
|
||||
DdlSubproyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubproyectos.SelectedIndex = 0
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim FechaInicio As Date = MinFecha
|
||||
Dim FechaFin As Date = MaxFecha
|
||||
|
||||
If TxtFechaI.Text.ToDate.Year > 1000 Then FechaInicio = TxtFechaI.Text.ToDate
|
||||
If TxtFechaF.Text.ToDate.Year > 1000 Then FechaFin = TxtFechaF.Text.ToDate
|
||||
|
||||
Dim objFin As New ClsFinanzas
|
||||
|
||||
objFin.GetRazonesFinancierasRep(UsuarioActual.CveEmpresa, DdlRazones.SelectedValue, FechaInicio, FechaFin, -1, -1)
|
||||
|
||||
Dim dtt As DataTable = objFin.DtResultados
|
||||
If dtt IsNot Nothing AndAlso dtt.Columns.Count > 0 Then
|
||||
|
||||
Select Case DdlPeriodo.SelectedValue
|
||||
Case "M"
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim5").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim6").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Cuat2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat3").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sem1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Sem2").Ordinal)
|
||||
Case "B"
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Ene").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Feb").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Mar").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Abr").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("May").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Jun").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Jul").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Ago").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sep").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Oct").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Nov").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Dic").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Cuat2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat3").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sem1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Sem2").Ordinal)
|
||||
Case "T"
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Ene").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Feb").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Mar").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Abr").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("May").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Jun").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Jul").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Ago").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sep").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Oct").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Nov").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Dic").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim5").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim6").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Cuat2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat3").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sem1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Sem2").Ordinal)
|
||||
Case "C"
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Ene").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Feb").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Mar").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Abr").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("May").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Jun").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Jul").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Ago").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sep").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Oct").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Nov").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Dic").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim5").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim6").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sem1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Sem2").Ordinal)
|
||||
Case "S"
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Ene").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Feb").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Mar").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Abr").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("May").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Jun").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Jul").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Ago").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Sep").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Oct").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Nov").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Dic").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Bim5").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Bim6").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Trim3").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Trim4").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat1").Ordinal) : dtt.Columns.RemoveAt(dtt.Columns("Cuat2").Ordinal)
|
||||
dtt.Columns.RemoveAt(dtt.Columns("Cuat3").Ordinal)
|
||||
End Select
|
||||
|
||||
Dim dtgrafica As DataTable = dtt.Copy
|
||||
dtgrafica.Columns.RemoveAt(1)
|
||||
Select Case DdlGrafica.SelectedValue
|
||||
Case "L"
|
||||
GeneraGraficaLineas(dtgrafica, TxtTitulo.Text)
|
||||
Case "B"
|
||||
GeneraGraficaBarras(dtgrafica, TxtTitulo.Text)
|
||||
Case "S"
|
||||
GeneraGraficaStacked(dtgrafica, TxtTitulo.Text)
|
||||
End Select
|
||||
|
||||
End If
|
||||
GVDatos.DataSource = dtt
|
||||
|
||||
objFin.Dispose()
|
||||
|
||||
GVDatos.DataBind()
|
||||
RegistraScript($"LimpiaCeros({DdlEscala.SelectedValue});", "xyc")
|
||||
|
||||
End Sub
|
||||
Private Sub GeneraGraficaLineas(data As DataTable, Titulo As String)
|
||||
|
||||
Dim Subtitulo As String = "<div style=""width:50%; "">Subtitulo </div>"
|
||||
Dim json As String = ToJsonString(GraficaLineas(data, Titulo, Subtitulo, "0", False, G1:=True))
|
||||
Dim json2 As String = ToJsonString(GraficaLineas(data, Titulo, Subtitulo, "0", True, G1:=True))
|
||||
'Literal1.Text = json
|
||||
RegistraScript(String.Format("function CargaGrafica() {{$('#div_Grafica').highcharts({0});}}function CargaGrafica2() {{$('#div_Grafica').highcharts({1});}} CargaGrafica();", json, json2))
|
||||
|
||||
End Sub
|
||||
'Private Sub GetGraficaInicio()
|
||||
|
||||
' Dim Gral As New ClsGenerales
|
||||
' Dim ds As DataSet = Gral.GetIndicadores(UsuarioActual.CveEmpresa)
|
||||
' Dim data = ds.Tables(4)
|
||||
' data.Columns.RemoveAt(0)
|
||||
' GeneraGraficaBarras(data, TxtTitulo.Text)
|
||||
' Gral.Dispose()
|
||||
' ds.Dispose()
|
||||
'End Sub
|
||||
Private Sub GeneraGraficaBarras(data As DataTable, Titulo As String)
|
||||
|
||||
Dim Subtitulo As String = "<div style=""width:50%; "">Subtitulo </div>"
|
||||
Dim json As String = ToJsonString(GraficaStandar(data, "column", Titulo, Subtitulo, False))
|
||||
Dim json2 As String = ToJsonString(GraficaStandar(data, "column", Titulo, Subtitulo, True))
|
||||
'Literal1.Text = json
|
||||
RegistraScript(String.Format("function CargaGrafica() {{$('#div_Grafica').highcharts({0});}}function CargaGrafica2() {{$('#div_Grafica').highcharts({1});}} CargaGrafica();", json, json2))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraGraficaStacked(data As DataTable, Titulo As String)
|
||||
|
||||
Dim Subtitulo As String = "<div style=""width:50%; "">Subtitulo </div>"
|
||||
Dim json As String = ToJsonString(GraficaStacked(data, "column", Titulo, Subtitulo, False))
|
||||
Dim json2 As String = ToJsonString(GraficaStacked(data, "column", Titulo, Subtitulo, True))
|
||||
'Literal1.Text = json
|
||||
RegistraScript(String.Format("function CargaGrafica() {{$('#div_Grafica').highcharts({0});}}function CargaGrafica2() {{$('#div_Grafica').highcharts({1});}} CargaGrafica();", json, json2))
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Metodos Graficar"
|
||||
Public Function GraficaLineas(data As DataTable, Optional Titulo As String = "", Optional Subtitulo As String = "", Optional SinCols As String = "0", Optional VerValor As Boolean = False, Optional G1 As Boolean = False) As HighChart
|
||||
Dim grafica As New HighChart
|
||||
'Dim removerCols
|
||||
'If IsNothing(SinCols) Then
|
||||
|
||||
'End If
|
||||
|
||||
If Not IsNothing(data) Then
|
||||
|
||||
grafica.chart = New Chart
|
||||
grafica.chart.type = "line"
|
||||
grafica.title = New Title
|
||||
grafica.title.text = Titulo
|
||||
grafica.subtitle = New Title
|
||||
grafica.subtitle.text = Subtitulo
|
||||
grafica.subtitle.useHTML = True
|
||||
grafica.yAxis = New Axis
|
||||
grafica.yAxis.title = New Title
|
||||
grafica.yAxis.title.text = " "
|
||||
grafica.xAxis = New Axis
|
||||
If VerValor Then
|
||||
grafica.plotOptions = New PlotOptions
|
||||
grafica.plotOptions.line = New Line
|
||||
grafica.plotOptions.line.dataLabels = New DataLabels
|
||||
grafica.plotOptions.line.dataLabels.enabled = True
|
||||
End If
|
||||
grafica.xAxis.categories = New List(Of String)
|
||||
|
||||
Dim index As Integer = 0
|
||||
Dim contador As Integer = 0
|
||||
For Each col As DataColumn In data.Columns
|
||||
|
||||
If contador = 0 Then
|
||||
index = contador
|
||||
Else
|
||||
grafica.xAxis.categories.Add(col.ColumnName)
|
||||
End If
|
||||
contador += 1
|
||||
|
||||
Next
|
||||
grafica.series = New List(Of Series)
|
||||
|
||||
For Each row As DataRow In data.Rows
|
||||
Dim serie As New Series
|
||||
serie.data = New List(Of Object)
|
||||
Dim anterior As Double = 0
|
||||
For i As Integer = 0 To data.Columns.Count - 1
|
||||
If i = index Then
|
||||
serie.name = row(i).ToString()
|
||||
Else
|
||||
Dim actual = row(i).ToString().ToDouble
|
||||
serie.data.Add(actual)
|
||||
anterior = actual
|
||||
'If Not G1 OrElse (actual >= anterior) Then
|
||||
'End If
|
||||
End If
|
||||
Next
|
||||
grafica.series.Add(serie)
|
||||
Next
|
||||
|
||||
End If
|
||||
Return grafica
|
||||
End Function
|
||||
Public Function GraficaStandar(data As DataTable, charttype As String, Optional Titulo As String = "", Optional Subtitulo As String = "", Optional VerValor As Boolean = False) As HighChart
|
||||
Dim grafica As New HighChart
|
||||
If Not IsNothing(data) Then
|
||||
|
||||
grafica.chart = New Chart
|
||||
grafica.chart.type = charttype
|
||||
grafica.title = New Title
|
||||
grafica.title.text = Titulo
|
||||
grafica.subtitle = New Title
|
||||
grafica.subtitle.text = Subtitulo
|
||||
grafica.subtitle.useHTML = True
|
||||
grafica.yAxis = New Axis
|
||||
grafica.yAxis.title = New Title
|
||||
grafica.yAxis.title.text = " "
|
||||
grafica.xAxis = New Axis
|
||||
grafica.xAxis.categories = New List(Of String)
|
||||
|
||||
Dim index As Integer = 0
|
||||
Dim contador As Integer = 0
|
||||
|
||||
If charttype = "bar" Then
|
||||
For Each col As DataRow In data.Rows
|
||||
|
||||
'If contador = 0 Then
|
||||
' index = contador
|
||||
'Else
|
||||
' grafica.xAxis.categories.Add(col(0).ToString)
|
||||
'End If
|
||||
grafica.xAxis.categories.Add(col(0).ToString)
|
||||
contador += 1
|
||||
|
||||
Next
|
||||
grafica.series = New List(Of Series)
|
||||
|
||||
For i As Integer = 1 To data.Columns.Count - 1
|
||||
Dim serie As New Series
|
||||
serie.data = New List(Of Object)
|
||||
serie.name = data.Columns(i).ColumnName
|
||||
For Each row As DataRow In data.Rows
|
||||
serie.data.Add(row(i).ToString().ToDouble)
|
||||
Next
|
||||
If VerValor Then
|
||||
|
||||
serie.dataLabels = New DataLabels
|
||||
serie.dataLabels.enabled = True
|
||||
End If
|
||||
grafica.series.Add(serie)
|
||||
Next
|
||||
|
||||
Else
|
||||
For Each col As DataColumn In data.Columns
|
||||
|
||||
If contador = 0 Then
|
||||
index = contador
|
||||
Else
|
||||
grafica.xAxis.categories.Add(col.ColumnName)
|
||||
End If
|
||||
contador += 1
|
||||
|
||||
Next
|
||||
grafica.series = New List(Of Series)
|
||||
|
||||
For Each row As DataRow In data.Rows
|
||||
Dim serie As New Series
|
||||
serie.data = New List(Of Object)
|
||||
For i As Integer = 0 To data.Columns.Count - 1
|
||||
If i = index Then
|
||||
serie.name = row(i).ToString()
|
||||
Else
|
||||
serie.data.Add(row(i).ToString().ToDouble)
|
||||
End If
|
||||
Next
|
||||
If VerValor Then
|
||||
|
||||
serie.dataLabels = New DataLabels
|
||||
serie.dataLabels.enabled = True
|
||||
End If
|
||||
grafica.series.Add(serie)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Return grafica
|
||||
End Function
|
||||
Public Function GraficaStandarB(data As DataTable, charttype As String, Optional Titulo As String = "", Optional Subtitulo As String = "", Optional VerValor As Boolean = False) As HighChart
|
||||
Dim grafica As New HighChart
|
||||
If Not IsNothing(data) Then
|
||||
|
||||
grafica.chart = New Chart
|
||||
grafica.chart.type = charttype
|
||||
grafica.title = New Title
|
||||
grafica.title.text = Titulo
|
||||
grafica.subtitle = New Title
|
||||
grafica.subtitle.text = Subtitulo
|
||||
grafica.subtitle.useHTML = True
|
||||
grafica.yAxis = New Axis
|
||||
grafica.yAxis.title = New Title
|
||||
grafica.yAxis.title.text = " "
|
||||
grafica.xAxis = New Axis
|
||||
grafica.xAxis.categories = New List(Of String)
|
||||
|
||||
Dim index As Integer = 0
|
||||
Dim contador As Integer = 0
|
||||
|
||||
If charttype = "bar" Then
|
||||
For Each col As DataRow In data.Rows
|
||||
|
||||
grafica.xAxis.categories.Add(col(0).ToString)
|
||||
contador += 1
|
||||
|
||||
Next
|
||||
grafica.series = New List(Of Series)
|
||||
|
||||
For i As Integer = 1 To data.Columns.Count - 1
|
||||
Dim serie As New Series
|
||||
serie.data = New List(Of Object)
|
||||
serie.name = data.Columns(i).ColumnName
|
||||
For Each row As DataRow In data.Rows
|
||||
serie.data.Add(row(i).ToString().ToDouble)
|
||||
Next
|
||||
If VerValor Then
|
||||
|
||||
serie.dataLabels = New DataLabels
|
||||
serie.dataLabels.enabled = True
|
||||
End If
|
||||
grafica.series.Add(serie)
|
||||
Next
|
||||
|
||||
Else
|
||||
For Each col As DataRow In data.Rows
|
||||
|
||||
grafica.xAxis.categories.Add(col(0))
|
||||
contador += 1
|
||||
|
||||
Next
|
||||
grafica.series = New List(Of Series)
|
||||
For x As Integer = 1 To data.Columns.Count - 1
|
||||
Dim serie As New Series
|
||||
serie.data = New List(Of Object)
|
||||
serie.name = data.Columns(x).ColumnName
|
||||
For i As Integer = 0 To data.Rows.Count - 1
|
||||
serie.data.Add(data.Rows(i)(x).ToString().ToDouble)
|
||||
Next
|
||||
grafica.series.Add(serie)
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
Return grafica
|
||||
End Function
|
||||
|
||||
Public Function GraficaStacked(data As DataTable, charttype As String, Optional Titulo As String = "", Optional Subtitulo As String = "", Optional VerValor As Boolean = False) As HighChart
|
||||
|
||||
Dim grafica As HighChart
|
||||
grafica = GraficaStandar(data, charttype, Titulo, Subtitulo, VerValor)
|
||||
If IsNothing(grafica.plotOptions) Then
|
||||
grafica.plotOptions = New PlotOptions()
|
||||
End If
|
||||
If IsNothing(grafica.plotOptions.column) Then
|
||||
grafica.plotOptions.column = New Column
|
||||
End If
|
||||
grafica.plotOptions.column.stacking = "normal"
|
||||
|
||||
If VerValor Then
|
||||
grafica.yAxis.stackLabels = New DataLabels
|
||||
grafica.yAxis.stackLabels.enabled = True
|
||||
'grafica.yAxis.stackLabels.color = "#FFFFFF"
|
||||
grafica.yAxis.stackLabels.rotation = -90
|
||||
grafica.yAxis.stackLabels.y = -35
|
||||
End If
|
||||
Return grafica
|
||||
|
||||
End Function
|
||||
Public Function ToJsonString(obj As Object) As String
|
||||
Dim settings As New JsonSerializerSettings
|
||||
settings.NullValueHandling = NullValueHandling.Ignore
|
||||
settings.Formatting = Formatting.Indented
|
||||
Return JsonConvert.SerializeObject(obj, settings).ToString
|
||||
End Function
|
||||
|
||||
#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
|
||||
For i = 1 To e.Row.Cells.Count - 1
|
||||
'Mind that i used i=1 not 0 because the width of cells(0) has already been set
|
||||
Dim cell2 As TableCell = e.Row.Cells(i)
|
||||
cell2.CssClass = "ceros"
|
||||
cell2.HorizontalAlign = HorizontalAlign.Right
|
||||
Next
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
581
Finanzas/RepRotacionCartera.aspx
Normal file
581
Finanzas/RepRotacionCartera.aspx
Normal file
@@ -0,0 +1,581 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepRotacionCartera.aspx.cs" Inherits="Finanzas_RepRotacionCartera" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.select2-selection {
|
||||
margin-top: 0px;
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Rotación de Cartera
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpExportar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgGenerarExcel" runat="server" OnClick="ImgGenerarExcel_Click"> <i class="fa fa-ad-excel"></i> <span style="padding-left:5px;">Generar Excel</span> </asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgGenerarExcel" />
|
||||
</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 id="PFiltro" class="portlet solid grey-cascade portlet-filter">
|
||||
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
|
||||
<div class="col-md-1"><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<%--width: 120px !important;--%>
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></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>
|
||||
<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>
|
||||
<div class="col-md-1"><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<%--width: 120px !important;--%>
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></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>
|
||||
<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>
|
||||
|
||||
<asp:CompareValidator ID="CVFechasRef" runat="server" ForeColor="#a94442" ControlToCompare="TxtFechaI" ControlToValidate="TxtFechaF" Type="Date" Operator="GreaterThan" Display="None" ErrorMessage="<b><span style='text-decoration: underline;'>ERROR:</span></b><br /><b>''Fecha R.F.''</b> debe ser mayor a Fecha R.I." ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCE2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechasRef" Width="270px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
<div class="col-md-1"><span>Grupo: </span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" Width="100%" Class="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
|
||||
<div runat="server" id="DivDdlSucursal" visible="true">
|
||||
<div class="col-md-1"><span>Sucursal:</span></div>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:DropDownList ID="DdlSucursal" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="select2me"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="DdlSucursal" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="DivDdlCliente" visible="true">
|
||||
<div class="col-md-1"><span>Cliente:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" Width="100%" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class=" select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivDdlVendedor" visible="true">
|
||||
<div class="col-md-1"><span>Vendedor:</span></div>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:DropDownList ID="DdlVendedores" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="select2me"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="DdlVendedores" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivDdlProveedor" visible="false">
|
||||
<div class="col-md-1"><span>Proveedor:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" AppendDataBoundItems="true" Class=" select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivDdlTipoProveedor" visible="false">
|
||||
<div class="col-md-1"><span>Tipo Prov.:</span></div>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:DropDownList ID="DdlTipoProveedor" runat="server" Width="100%" Class="select2me">--%>
|
||||
<asp:ListBox ID="DdlTipoProveedor" data-text="Todos" SelectionMode="Multiple" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<%--<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>--%>
|
||||
<asp:ListItem Selected="False" Text="Proveedor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Acreedor" Value="2"></asp:ListItem>
|
||||
<%--<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>--%>
|
||||
</asp:ListBox>
|
||||
<%--</asp:DropDownList>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="line-height: normal; margin-top: 5px;"><span>Fecha Fin Cobranza:</span></div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px; margin-top: 5px;">
|
||||
<%--width: 120px !important;--%>
|
||||
<asp:TextBox ID="TxtFechaCobranza" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaCobranza" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaCobranza" runat="server" TargetControlID="TxtFechaCobranza" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaCobranza" TargetControlID="TxtFechaCobranza" PopupButtonID="LnkFechaCobranza" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCobranza" runat="server" ControlToValidate="TxtFechaCobranza" 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="CVFechaCobranza" runat="server" ControlToValidate="TxtFechaCobranza" Display="None" ErrorMessage="El campo <b>''Fecha Final Cobranza''</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="VCEFechaCobranza" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCobranza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaCobranza2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCobranza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" class="Widthall" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" OnActiveTabChanged="Tab_ActiveTabChanged" AutoPostBack="true">
|
||||
|
||||
<ajax:TabPanel ID="TabRepResumen" runat="server" HeaderText="Resumen">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UPRRPResumen" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" id="dvIndicadoresClientesResumen" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalVentasResumen"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL VENTAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="LtlCarteraFinalClienteResumen" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionClienteResumen"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Dias de Recuperacion de Ventas</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="Span1" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionClienteResumen"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title">Rotacion </div>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionClienteResumen"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="dvIndicadoresProveedoresResumen" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalComprasResumen"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL COMPRAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="LtlCarteraFinalProveedorResumen" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionProveedorResumen"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Dias de Pago de Compras</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="RecuperacionBarraProveedorResumen" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionProveedorResumen"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title">Rotacion </div>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionProveedorResumen"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="dvIndicadoresDiasRecuperacion" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<%-- <div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="Literal11"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL COMPRAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="Literal12" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionResumen"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Recuperado vs Cobrado</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="Span3" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionResumen"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title"></div>
|
||||
<%--Rotacion--%>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionResumen"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabRepClientes" runat="server" HeaderText="Cliente">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPRRPClientes" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" id="dvIndicadoresClientes" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalVentas"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL VENTAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="LtlCarteraFinalCliente" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionCliente"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Dias de Recuperacion</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="RecuperacionBarraCliente" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionCliente"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title">Rotacion </div>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionCliente"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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="TxtBusquedaCliente" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCliente','{0}')", GvDatosCliente.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCliente','{0}')", GvDatosCliente.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatosCliente" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD " AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" ToolTip="Listado de Rotación de Cartera" OnRowDataBound="GvDatosCliente_RowDataBound" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HypCliente" runat="server" Text='<%# Eval("GPO")%>' Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Ventas" ItemStyle-Width="10%" HeaderText="Ventas" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Pagado" ItemStyle-Width="10%" HeaderText="Pagado" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Rotacion" ItemStyle-Width="10%" HeaderText="Rotación" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Dias" ItemStyle-Width="5%" HeaderText="Promedio Pago <br> (días)" HtmlEncode="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="DiasCredito" ItemStyle-Width="5%" HeaderText="Días Crédito" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Dif" ItemStyle-Width="5%" HeaderText="Dif" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabRepProveedor" runat="server" HeaderText="Proveedor">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UPRRPProveedores" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" id="dvIndicadoresProveedores" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalCompras"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL COMPRAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="LtlCarteraFinalProveedor" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionProveedor"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Dias de Pago</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="RecuperacionBarraProveedor" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionProveedor"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title">Rotacion </div>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionProveedor"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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="TxtBusquedaProveedor" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaProveedor','{0}')", GvDatosProveedores.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaProveedor','{0}')", GvDatosProveedores.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatosProveedores" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD " AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" ToolTip="Listado de Rotación de Cartera" OnRowDataBound="GvDatosProveedores_RowDataBound" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HypProveedor" runat="server" Text='<%# Eval("GPO")%>' Target="_blank" TextDecorations="None"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Compras" ItemStyle-Width="10%" HeaderText="Compras" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Pagado" ItemStyle-Width="10%" HeaderText="Pagado" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Rotacion" ItemStyle-Width="10%" HeaderText="Rotación" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Dias" ItemStyle-Width="5%" HeaderText="Días" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
399
Finanzas/RepRotacionCartera.aspx.cs
Normal file
399
Finanzas/RepRotacionCartera.aspx.cs
Normal file
@@ -0,0 +1,399 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Finanzas_RepRotacionCartera : ClsPaginas
|
||||
{
|
||||
#region "P R O P I E D A D E S"
|
||||
private DataTable DTDatosClientes
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTDatosClientes"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTDatosClientes"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable DTDatosProveedores
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTDatosProveedores"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTDatosProveedores"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
|
||||
private void InicializaDatos()
|
||||
{
|
||||
DateTime FechaInicio = new DateTime(DateTime.Today.Year, 1, 1);
|
||||
TxtFechaI.Text = FechaInicio.ToShortDateString();
|
||||
TxtFechaF.Text = DateTime.Today.ToShortDateString();
|
||||
TxtFechaCobranza.Text = DateTime.Today.ToShortDateString();
|
||||
|
||||
CargaClientes();
|
||||
CargaVendedores();
|
||||
CargaSucursales();
|
||||
CargaProveedores();
|
||||
|
||||
//MuestraFiltrosCliente();
|
||||
|
||||
MuestraFiltrosResumen();
|
||||
CargaDatos(0);
|
||||
//CargaDatos(1);
|
||||
//CargaDatos(2);
|
||||
|
||||
// CargaIndicadoresResumen();
|
||||
}
|
||||
|
||||
private void CargaDatos(int opcion)
|
||||
{
|
||||
ClsFinanzas ObjFinanzas = new ClsFinanzas();
|
||||
|
||||
DateTime FechaInicio = Convert.ToDateTime(TxtFechaI.Text);
|
||||
DateTime FechaFin = Convert.ToDateTime(TxtFechaF.Text);
|
||||
DateTime FechaFinCobranza = Convert.ToDateTime(TxtFechaCobranza.Text);
|
||||
|
||||
String Sucursales = ModExtensiones.GetSelectedValuesM( DdlSucursal) == "" ? "-1" : ModExtensiones.GetSelectedValuesM(DdlSucursal);
|
||||
String Vendedores = ModExtensiones.GetSelectedValuesM(DdlVendedores) == "" ? "-1" : ModExtensiones.GetSelectedValuesM(DdlVendedores);
|
||||
String TipoProveedor = ModExtensiones.GetSelectedValuesM(DdlTipoProveedor) == "" ? "-1" : ModExtensiones.GetSelectedValuesM(DdlTipoProveedor);
|
||||
|
||||
if (opcion == 0)
|
||||
{
|
||||
if (ObjFinanzas.GetRotacionCarteraCliente(FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero(), "-1", "-1", -1, FechaFinCobranza))
|
||||
{
|
||||
DTDatosClientes = ObjFinanzas.DtResultados;
|
||||
}
|
||||
if (ObjFinanzas.GetRotacionCarteraProveedores(FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero(), "-1", "-1", -1, FechaFinCobranza))
|
||||
{
|
||||
DTDatosProveedores = ObjFinanzas.DtResultados;
|
||||
}
|
||||
CargaIndicadoresResumen();
|
||||
}
|
||||
else if (opcion == 1)
|
||||
{
|
||||
if (ObjFinanzas.GetRotacionCarteraCliente(FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero(), Vendedores, Sucursales, DdlCliente.SelectedValue.ToEntero(), FechaFinCobranza))
|
||||
{
|
||||
GvDatosCliente.Columns[0].HeaderText = DdlGrupo.SelectedItem.Text;
|
||||
DTDatosClientes = ObjFinanzas.DtResultados;
|
||||
GvDatosCliente.DataSource = DTDatosClientes;
|
||||
|
||||
if (DTDatosClientes.Rows.Count > 0 )
|
||||
{
|
||||
LtlTotalVentas.Text = DTDatosClientes.SUM("Ventas").ToString().FormatoNumero();
|
||||
LtlCarteraFinalCliente.Text = String.Format("$ {0}", DTDatosClientes.SUM("Pagado").ToString().FormatoNumero());
|
||||
|
||||
LtlMediaDiasRecuperacionCliente.Text = String.Format("{0} Días", (DTDatosClientes.SUM("TotalDias") / DTDatosClientes.SUM("TotalNumVentas")).ToString().FormatoNumero());
|
||||
LtlRotacionCliente.Text = (DTDatosClientes.SUM("Pagado") / DTDatosClientes.SUM("Ventas")).ToString().FormatoNumero();
|
||||
}
|
||||
else
|
||||
{
|
||||
limpiaIndicadoresCliente();
|
||||
}
|
||||
}
|
||||
ObjFinanzas.Dispose();
|
||||
GvDatosCliente.DataBind();
|
||||
UPRRPClientes.Update();
|
||||
}
|
||||
else if (opcion == 2)
|
||||
{
|
||||
if (ObjFinanzas.GetRotacionCarteraProveedores(FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero(), TipoProveedor,Sucursales, DdlProveedor.SelectedValue.ToEntero(), FechaFinCobranza)) // ((DdlTipoProveedor.SelectedValue.ToEntero() == 3)? -1 : DdlTipoProveedor.SelectedValue.ToEntero()), -1
|
||||
{
|
||||
GvDatosProveedores.Columns[0].HeaderText = DdlGrupo.SelectedItem.Text;
|
||||
DTDatosProveedores = ObjFinanzas.DtResultados;
|
||||
GvDatosProveedores.DataSource = DTDatosProveedores;
|
||||
|
||||
if (DTDatosProveedores.Rows.Count > 0)
|
||||
{
|
||||
LtlTotalCompras.Text = DTDatosProveedores.SUM("Compras").ToString().FormatoNumero();
|
||||
LtlCarteraFinalProveedor.Text = String.Format("$ {0}", DTDatosProveedores.SUM("Pagado").ToString().FormatoNumero());
|
||||
|
||||
LtlMediaDiasRecuperacionProveedor.Text = String.Format("{0} Días", (DTDatosProveedores.SUM("TotalDias")/ DTDatosProveedores.SUM("TotalNumCompras")).ToString().FormatoNumero());
|
||||
LtlRotacionProveedor.Text = (DTDatosProveedores.SUM("Pagado") / DTDatosProveedores.SUM("Compras")).ToString().FormatoNumero();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
limpiaIndicadoresProveedor();
|
||||
}
|
||||
}
|
||||
ObjFinanzas.Dispose();
|
||||
GvDatosProveedores.DataBind();
|
||||
UPRRPProveedores.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void CargaIndicadoresResumen()
|
||||
{
|
||||
//Carga Indicadores Clientes en Tab Resumen
|
||||
LtlTotalVentasResumen.Text = DTDatosClientes.SUM("Ventas").ToString().FormatoNumero();
|
||||
LtlCarteraFinalClienteResumen.Text = String.Format("$ {0}", ( DTDatosClientes.SUM("Pagado").ToString().FormatoNumero() == "NaN") ? "0" : DTDatosClientes.SUM("Pagado").ToString().FormatoNumero());
|
||||
|
||||
LtlMediaDiasRecuperacionClienteResumen.Text = String.Format("{0} Días", ((DTDatosClientes.SUM("TotalDias") / DTDatosClientes.SUM("TotalNumVentas")).ToString().FormatoNumero()) == "NaN" ? "0" : (DTDatosClientes.SUM("TotalDias") / DTDatosClientes.SUM("TotalNumVentas")).ToString().FormatoNumero());
|
||||
LtlRotacionClienteResumen.Text = (DTDatosClientes.SUM("Pagado") / DTDatosClientes.SUM("Ventas")).ToString().FormatoNumero() == "NaN" ? "0" : (DTDatosClientes.SUM("Pagado") / DTDatosClientes.SUM("Ventas")).ToString().FormatoNumero();
|
||||
|
||||
//Carga Indicadores Proveedores en Tab Resumen
|
||||
LtlTotalComprasResumen.Text = DTDatosProveedores.SUM("Compras").ToString().FormatoNumero();
|
||||
LtlCarteraFinalProveedorResumen.Text = String.Format("$ {0}", (DTDatosProveedores.SUM("Pagado").ToString().FormatoNumero()) == "NaN" ? "0" : DTDatosProveedores.SUM("Pagado").ToString().FormatoNumero());
|
||||
|
||||
LtlMediaDiasRecuperacionProveedorResumen.Text = String.Format("{0} Días", ((DTDatosProveedores.SUM("TotalDias") / DTDatosProveedores.SUM("TotalNumCompras")).ToString().FormatoNumero()) == "NaN" ? "0" : (DTDatosProveedores.SUM("TotalDias") / DTDatosProveedores.SUM("TotalNumCompras")).ToString().FormatoNumero());
|
||||
LtlRotacionProveedorResumen.Text = ((DTDatosProveedores.SUM("Pagado") / DTDatosProveedores.SUM("Compras")).ToString().FormatoNumero() == "NaN" ? "0" : (DTDatosProveedores.SUM("Pagado") / DTDatosProveedores.SUM("Compras")).ToString().FormatoNumero());
|
||||
|
||||
//Carga Indicador Diferencia Dias
|
||||
LtlMediaDiasRecuperacionResumen.Text = String.Format("{0} Días", (( (DTDatosClientes.SUM("TotalDias") / DTDatosClientes.SUM("TotalNumVentas")) - (DTDatosProveedores.SUM("TotalDias") / DTDatosProveedores.SUM("TotalNumCompras"))).ToString().FormatoNumero()) == "NaN" ? "0" : ( (DTDatosClientes.SUM("TotalDias") / DTDatosClientes.SUM("TotalNumVentas")) - (DTDatosProveedores.SUM("TotalDias") / DTDatosProveedores.SUM("TotalNumCompras"))).ToString().FormatoNumero());
|
||||
|
||||
UPRRPResumen.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void limpiaIndicadoresCliente()
|
||||
{
|
||||
LtlTotalVentas.Text = "0".FormatoNumero();
|
||||
LtlCarteraFinalCliente.Text = "0".FormatoNumero();
|
||||
|
||||
LtlMediaDiasRecuperacionCliente.Text = "0 Días";
|
||||
LtlRotacionCliente.Text = "0".FormatoNumero();
|
||||
}
|
||||
protected void limpiaIndicadoresProveedor()
|
||||
{
|
||||
LtlTotalCompras.Text = "0".FormatoNumero();
|
||||
LtlCarteraFinalProveedor.Text = "0".FormatoNumero();
|
||||
|
||||
LtlMediaDiasRecuperacionProveedor.Text = "0 Días";
|
||||
LtlRotacionProveedor.Text = "0".FormatoNumero();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos(Tab.ActiveTabIndex);
|
||||
}
|
||||
|
||||
protected void GvDatosCliente_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (GvDatosCliente.Columns[0].HeaderText == "Cliente")
|
||||
{
|
||||
//e.Row.FCHyperLink("HypCliente").NavigateUrl = string.Format("/Ventas/Clientes.aspx?CveCliente={0}", e.Row.DBCampo("CveCliente"));
|
||||
e.Row.FCHyperLink("HypCliente").NavigateUrl = string.Format("/Finanzas/RepRotacionCarteraDetalle.aspx?CveCliente={0}&FechaInicio={1}&FechaFin={2}&FechaFinCobranza={3}", e.Row.DBCampo("CveCliente"), TxtFechaI.Text, TxtFechaF.Text, TxtFechaCobranza.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCHyperLink("HypCliente").ForeColor = System.Drawing.Color.Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatosProveedores_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (GvDatosProveedores.Columns[0].HeaderText == "Proveedor")
|
||||
{
|
||||
e.Row.FCHyperLink("HypProveedor").NavigateUrl = string.Format("/Compras/Proveedores.aspx?CveProveedor={0}", e.Row.DBCampo("CveProveedor"));
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCHyperLink("HypProveedor").ForeColor = System.Drawing.Color.Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "CARGA DDL"
|
||||
|
||||
private void CargaSucursales()
|
||||
{
|
||||
DdlSucursal.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
|
||||
DdlSucursal.DataBind();
|
||||
//DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlSucursal.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
private void CargaClientes()
|
||||
{
|
||||
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa);
|
||||
DdlCliente.DataBind();
|
||||
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlCliente.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
private void CargaProveedores()
|
||||
{
|
||||
DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
DdlProveedor.DataBind();
|
||||
DdlProveedor.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
private void CargaVendedores()
|
||||
{
|
||||
|
||||
DdlVendedores.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedores.DataBind();
|
||||
//DdlVendedores.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlVendedores.SelectedValue = "-1";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "CARGA CAMBIO REPORTE"
|
||||
private void MuestraFiltrosResumen()
|
||||
{
|
||||
DdlGrupo.Items.Clear();
|
||||
DdlGrupo.Items.Insert(0, new ListItem("Cliente vs Proveedor", "1"));
|
||||
DdlGrupo.SelectedValue = "1";
|
||||
|
||||
DivDdlCliente.Visible = false;
|
||||
DivDdlVendedor.Visible = false;
|
||||
|
||||
DivDdlProveedor.Visible = false;
|
||||
DivDdlTipoProveedor.Visible = false;
|
||||
|
||||
DivDdlSucursal.Visible = false;
|
||||
|
||||
UpFiltros.Update();
|
||||
|
||||
}
|
||||
private void MuestraFiltrosCliente()
|
||||
{
|
||||
DdlGrupo.Items.Clear();
|
||||
DdlGrupo.Items.Insert(0, new ListItem("Cliente", "1"));
|
||||
DdlGrupo.Items.Insert(1, new ListItem("Vendedor", "2"));
|
||||
DdlGrupo.Items.Insert(2, new ListItem("Sucursal", "3"));
|
||||
DdlGrupo.SelectedValue = "1";
|
||||
|
||||
DivDdlCliente.Visible = true;
|
||||
DivDdlVendedor.Visible = true;
|
||||
|
||||
DivDdlProveedor.Visible = false;
|
||||
DivDdlTipoProveedor.Visible = false;
|
||||
|
||||
DivDdlSucursal.Visible = true;
|
||||
|
||||
UpFiltros.Update();
|
||||
|
||||
}
|
||||
private void MuestraFiltrosProveedor()
|
||||
{
|
||||
DdlGrupo.Items.Clear();
|
||||
DdlGrupo.Items.Insert(0, new ListItem("Proveedor", "1"));
|
||||
DdlGrupo.Items.Insert(1, new ListItem("Tipo Proveedor", "2"));
|
||||
DdlGrupo.Items.Insert(2, new ListItem("Sucursal", "3"));
|
||||
DdlGrupo.SelectedValue = "1";
|
||||
|
||||
DivDdlProveedor.Visible = true;
|
||||
DivDdlTipoProveedor.Visible = true;
|
||||
|
||||
DivDdlCliente.Visible = false;
|
||||
DivDdlVendedor.Visible = false;
|
||||
|
||||
DivDdlSucursal.Visible = true;
|
||||
|
||||
UpFiltros.Update();
|
||||
}
|
||||
|
||||
protected void Tab_ActiveTabChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Tab.ActiveTabIndex == 1)
|
||||
{
|
||||
MuestraFiltrosCliente();
|
||||
CargaDatos(1);
|
||||
}
|
||||
else if (Tab.ActiveTabIndex == 2)
|
||||
{
|
||||
MuestraFiltrosProveedor();
|
||||
CargaDatos(2);
|
||||
}
|
||||
else if (Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
MuestraFiltrosResumen();
|
||||
CargaDatos(0);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "GENERAR EXCEL"
|
||||
protected void GeneraPDF(string Formato = "PDF")
|
||||
{
|
||||
List<ReportParameter> @params = new List<ReportParameter>();
|
||||
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
|
||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
@params.Add(new ReportParameter("FechaInicio", TxtFechaI.Text));
|
||||
@params.Add(new ReportParameter("FechaFin", TxtFechaF.Text));
|
||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
@params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
|
||||
@params.Add(new ReportParameter("Grupo", DdlGrupo.SelectedItem.Text));
|
||||
@params.Add(new ReportParameter("TipoReporte", Tab.ActiveTab.HeaderText));
|
||||
|
||||
@params.Add(new ReportParameter("Sucursal", ModExtensiones.GetSelectedText(DdlSucursal) == "" ? "Todos" : ModExtensiones.GetSelectedText(DdlSucursal)));
|
||||
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
@params.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
@params.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
|
||||
|
||||
if (Tab.ActiveTabIndex == 1)
|
||||
{
|
||||
@params.Add(new ReportParameter("Filtro1", DdlCliente.SelectedItem.Text));
|
||||
@params.Add(new ReportParameter("Filtro2", ModExtensiones.GetSelectedText(DdlVendedores) == "" ? "Todos" : ModExtensiones.GetSelectedText(DdlVendedores)));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRotacionCarteraCliente.rdlc", DTDatosClientes, @params, "ReporteRotacionCarteraCliente", Formato);
|
||||
}
|
||||
else
|
||||
{
|
||||
@params.Add(new ReportParameter("Filtro1", DdlProveedor.SelectedItem.Text));
|
||||
@params.Add(new ReportParameter("Filtro2", ModExtensiones.GetSelectedText(DdlTipoProveedor) == "" ? "Ambos" : ModExtensiones.GetSelectedText(DdlTipoProveedor)));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRotacionCarteraProveedor.rdlc", DTDatosProveedores, @params, "ReporteRotacionCarteraProveedor", Formato);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void ImgGenerarExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
|
||||
}else
|
||||
{
|
||||
GeneraPDF("Excel");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
343
Finanzas/RepRotacionCarteraDetalle.aspx
Normal file
343
Finanzas/RepRotacionCarteraDetalle.aspx
Normal file
@@ -0,0 +1,343 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepRotacionCarteraDetalle.aspx.cs" Inherits="Finanzas_RepRotacionCarteraDetalle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Rotación de Cartera Detalle
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<%-- <asp:UpdatePanel ID="UpExportar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgGenerarExcel" runat="server" OnClick="ImgGenerarExcel_Click"> <i class="fa fa-ad-excel"></i> <span style="padding-left:5px;">Generar Excel</span> </asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgGenerarExcel" />
|
||||
</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 id="PFiltro" class="portlet solid grey-cascade portlet-filter">
|
||||
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
|
||||
<div class="col-md-1"><span>Fecha Inicio:</span></div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<%--width: 120px !important;--%>
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></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>
|
||||
<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>
|
||||
<div class="col-md-1"><span>Fecha Fin:</span></div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<%--width: 120px !important;--%>
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></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>
|
||||
<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>
|
||||
|
||||
<asp:CompareValidator ID="CVFechasRef" runat="server" ForeColor="#a94442" ControlToCompare="TxtFechaI" ControlToValidate="TxtFechaF" Type="Date" Operator="GreaterThan" Display="None" ErrorMessage="<b><span style='text-decoration: underline;'>ERROR:</span></b><br /><b>''Fecha R.F.''</b> debe ser mayor a Fecha R.I." ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCE2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechasRef" Width="270px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<div class="col-md-1" style="line-height: normal;"><span>Fecha Fin Cobranza:</span></div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
|
||||
<asp:TextBox ID="TxtFechaCobranza" runat="server" CssClass="form-control text-size-12" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaCobranza" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaCobranza" runat="server" TargetControlID="TxtFechaCobranza" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaCobranza" TargetControlID="TxtFechaCobranza" PopupButtonID="LnkFechaCobranza" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCobranza" runat="server" ControlToValidate="TxtFechaCobranza" 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="CVFechaCobranza" runat="server" ControlToValidate="TxtFechaCobranza" Display="None" ErrorMessage="El campo <b>''Fecha Final Cobranza''</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="VCEFechaCobranza" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCobranza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaCobranza2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCobranza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="col-md-1"><span>Grupo: </span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" Width="100%" Class="select2me"></asp:DropDownList>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
|
||||
<%-- <div runat="server" id="DivDdlSucursal" visible="true">
|
||||
<div class="col-md-1"><span>Sucursal:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSucursal" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="DivDdlCliente" visible="true">
|
||||
<div class="col-md-1"><span>Cliente:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" Width="100%" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class=" select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivDdlVendedor" visible="true">
|
||||
<div class="col-md-1"><span>Vendedor:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVendedores" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div runat="server" id="DivDdlProveedor" visible="false">
|
||||
<div class="col-md-1"><span>Proveedor:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" AppendDataBoundItems="true" Class=" select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivDdlTipoProveedor" visible="false">
|
||||
<div class="col-md-1"><span>Tipo Prov.:</span></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoProveedor" runat="server" Width="100%" Class="select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Proveedor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Acreedor" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" class="Widthall" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPRRPClientes" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" id="dvIndicadoresClientes" runat="server" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalVentas"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL VENTAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="LtlCarteraFinalCliente" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionCliente"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Dias de Recuperacion</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="RecuperacionBarraCliente" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionCliente"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title">Rotacion </div>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionCliente"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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="TxtBusquedaCliente" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCliente','{0}')", GvDatosCliente.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCliente','{0}')", GvDatosCliente.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatosCliente" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD " AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" ToolTip="Listado de Rotación de Cartera" OnRowDataBound="GvDatosCliente_RowDataBound" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HypFolio" runat="server" Text='<%# Eval("SerieFolio")%>' Target="_blank"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Fecha" ItemStyle-Width="10%" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Ventas" ItemStyle-Width="10%" HeaderText="Ventas" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Pagado" ItemStyle-Width="10%" HeaderText="Pagado" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<%--<asp:BoundField DataField="Rotacion" ItemStyle-Width="10%" HeaderText="Rotación" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />--%>
|
||||
<asp:BoundField DataField="Dias" ItemStyle-Width="5%" HeaderText="Promedio Pago <br> (días)" HtmlEncode="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="DiasCredito" ItemStyle-Width="5%" HeaderText="Días Crédito" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabPanel ID="TabRepProveedor" runat="server" HeaderText="Proveedor">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UPRRPProveedores" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" id="dvIndicadoresProveedores" visible="false">
|
||||
<div class="col-lg-4 col-md-4 col-md-offset-2">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top: 5px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp">
|
||||
<small class="font-green-sharp">$</small>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalCompras"></asp:Literal>
|
||||
</span>
|
||||
</h3>
|
||||
<small>TOTAL COMPRAS</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-money"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size: 12px">
|
||||
Pagado:
|
||||
<asp:Literal Text="text" ID="LtlCarteraFinalProveedor" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlMediaDiasRecuperacionProveedor"></asp:Literal>
|
||||
</span>
|
||||
|
||||
</h3>
|
||||
<small>Dias de Recuperacion</small>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="progress">
|
||||
<span style="width: 100%;" id="RecuperacionBarraProveedor" runat="server" class="progress-bar progress-bar-success red-haze">
|
||||
<span class="sr-only">
|
||||
<asp:Literal runat="server" ID="LtlRecuperacionProveedor"></asp:Literal></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="status" style="font-size: 12px">
|
||||
<div class="status-title">Rotacion </div>
|
||||
<div class="status-number">
|
||||
<asp:Literal runat="server" ID="LtlRotacionProveedor"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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="TxtBusquedaProveedor" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaProveedor','{0}')", GvDatosProveedores.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaProveedor','{0}')", GvDatosProveedores.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatosProveedores" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD " AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" ToolTip="Listado de Rotación de Cartera" OnRowDataBound="GvDatosProveedores_RowDataBound" Width="99%">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HypProveedor" runat="server" Text='<%# Eval("GPO")%>' Target="_blank" TextDecorations="None"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Compras" ItemStyle-Width="10%" HeaderText="Compras" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Pagado" ItemStyle-Width="10%" HeaderText="Pagado" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Rotacion" ItemStyle-Width="10%" HeaderText="Rotación" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Dias" ItemStyle-Width="5%" HeaderText="Días" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
384
Finanzas/RepRotacionCarteraDetalle.aspx.cs
Normal file
384
Finanzas/RepRotacionCarteraDetalle.aspx.cs
Normal file
@@ -0,0 +1,384 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Finanzas_RepRotacionCarteraDetalle : ClsPaginas
|
||||
{
|
||||
#region "P R O P I E D A D E S"
|
||||
private DataTable DTDatosClientes
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTDatosClientes"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTDatosClientes"] = value;
|
||||
}
|
||||
}
|
||||
private DataTable DTDatosProveedores
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTDatosProveedores"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTDatosProveedores"] = value;
|
||||
}
|
||||
}
|
||||
private int CveCliente
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCliente"].ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCliente"] = value;
|
||||
}
|
||||
}
|
||||
private String FechaInicio
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["FechaInicio"].ToString();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["FechaInicio"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private String FechaFin
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["FechaFin"].ToString();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["FechaFin"] = value;
|
||||
}
|
||||
}
|
||||
private String FechaFinCobranza
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["FechaFinCobranza"].ToString();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["FechaFinCobranza"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
|
||||
private void InicializaDatos()
|
||||
{
|
||||
|
||||
if (Request["CveCliente"] != null && !Request["CveCliente"].ToString().Equals("") && Request["CveCliente"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveCliente"] = Request["CveCliente"];
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["CveMovimiento"] = -1;
|
||||
}
|
||||
|
||||
if (Request["FechaInicio"] != null && !Request["FechaInicio"].ToString().Equals("") )
|
||||
{
|
||||
ViewState["FechaInicio"] = Request["FechaInicio"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["FechaInicio"] = DateTime.Today.ToShortDateString();
|
||||
}
|
||||
|
||||
if (Request["FechaFin"] != null && !Request["FechaFin"].ToString().Equals(""))
|
||||
{
|
||||
ViewState["FechaFin"] = Request["FechaFin"];
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["FechaFin"] = (new DateTime(DateTime.Today.Year, 1, 1)).ToShortDateString();
|
||||
}
|
||||
|
||||
if (Request["FechaFinCobranza"] != null && !Request["FechaFinCobranza"].ToString().Equals(""))
|
||||
{
|
||||
ViewState["FechaFinCobranza"] = Request["FechaFinCobranza"];
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewState["FechaFinCobranza"] = FechaFin;
|
||||
}
|
||||
|
||||
TxtFechaI.Text = FechaInicio;
|
||||
TxtFechaF.Text = FechaFin;
|
||||
TxtFechaCobranza.Text = FechaFinCobranza;
|
||||
|
||||
//TxtFechaCobranza.Text = DateTime.Today.ToShortDateString();
|
||||
|
||||
//CargaClientes();
|
||||
//CargaVendedores();
|
||||
//CargaSucursales();
|
||||
//CargaProveedores();
|
||||
|
||||
MuestraFiltrosCliente();
|
||||
CargaDatos();
|
||||
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsFinanzas ObjFinanzas = new ClsFinanzas();
|
||||
|
||||
DateTime FechaInicio = Convert.ToDateTime(TxtFechaI.Text);
|
||||
DateTime FechaFin = Convert.ToDateTime(TxtFechaF.Text);
|
||||
DateTime FechaFinCobranza = Convert.ToDateTime(TxtFechaCobranza.Text);
|
||||
|
||||
|
||||
if (ObjFinanzas.GetRotacionCarteraClienteDetalle(FechaInicio, FechaFin, FechaFinCobranza, UsuarioActual.CveEmpresa, CveCliente))
|
||||
{
|
||||
//GvDatosCliente.Columns[0].HeaderText = DdlGrupo.SelectedItem.Text;
|
||||
DTDatosClientes = ObjFinanzas.DtResultados;
|
||||
GvDatosCliente.DataSource = DTDatosClientes;
|
||||
|
||||
if (DTDatosClientes.Rows.Count > 1)
|
||||
{
|
||||
//LtlTotalVentas.Text = DTDatosClientes.SUM("Ventas").ToString().FormatoNumero();
|
||||
//LtlCarteraFinalCliente.Text = String.Format("$ {0}", DTDatosClientes.SUM("Pagado").ToString().FormatoNumero());
|
||||
|
||||
//LtlMediaDiasRecuperacionCliente.Text = String.Format("{0} Días", (DTDatosClientes.SUM("TotalDias") / DTDatosClientes.SUM("TotalNumVentas")).ToString().FormatoNumero());
|
||||
//LtlRotacionCliente.Text = (DTDatosClientes.SUM("Pagado") / DTDatosClientes.SUM("Ventas")).ToString().FormatoNumero();
|
||||
}
|
||||
else
|
||||
{
|
||||
limpiaIndicadoresCliente();
|
||||
}
|
||||
|
||||
}
|
||||
ObjFinanzas.Dispose();
|
||||
GvDatosCliente.DataBind();
|
||||
UPRRPClientes.Update();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void limpiaIndicadoresCliente()
|
||||
{
|
||||
LtlTotalVentas.Text = "0".FormatoNumero();
|
||||
LtlCarteraFinalCliente.Text = "0".FormatoNumero();
|
||||
|
||||
LtlMediaDiasRecuperacionCliente.Text = "0 Días";
|
||||
LtlRotacionCliente.Text = "0".FormatoNumero();
|
||||
}
|
||||
protected void limpiaIndicadoresProveedor()
|
||||
{
|
||||
//LtlTotalCompras.Text = "0".FormatoNumero();
|
||||
//LtlCarteraFinalProveedor.Text = "0".FormatoNumero();
|
||||
|
||||
//LtlMediaDiasRecuperacionProveedor.Text = "0 Días";
|
||||
//LtlRotacionProveedor.Text = "0".FormatoNumero();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
protected void GvDatosCliente_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (GvDatosCliente.Columns[0].HeaderText == "Folio")
|
||||
{
|
||||
e.Row.FCHyperLink("HypFolio").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"));
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCHyperLink("HypFolio").ForeColor = System.Drawing.Color.Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//protected void GvDatosProveedores_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
//{
|
||||
// if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
// {
|
||||
// if (GvDatosProveedores.Columns[0].HeaderText == "Proveedor")
|
||||
// {
|
||||
// e.Row.FCHyperLink("HypProveedor").NavigateUrl = string.Format("/Compras/Proveedores.aspx?CveProveedor={0}", e.Row.DBCampo("CveProveedor"));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// e.Row.FCHyperLink("HypProveedor").ForeColor = System.Drawing.Color.Black;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region "CARGA DDL"
|
||||
|
||||
private void CargaSucursales()
|
||||
{
|
||||
//DdlSucursal.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
|
||||
//DdlSucursal.DataBind();
|
||||
//DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlSucursal.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
private void CargaClientes()
|
||||
{
|
||||
//DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa);
|
||||
//DdlCliente.DataBind();
|
||||
//DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlCliente.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
private void CargaProveedores()
|
||||
{
|
||||
//DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
//DdlProveedor.DataBind();
|
||||
//DdlProveedor.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlProveedor.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
private void CargaVendedores()
|
||||
{
|
||||
|
||||
//DdlVendedores.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
//DdlVendedores.DataBind();
|
||||
//DdlVendedores.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlVendedores.SelectedValue = "-1";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "CARGA CAMBIO REPORTE"
|
||||
private void MuestraFiltrosCliente()
|
||||
{
|
||||
//DdlGrupo.Items.Clear();
|
||||
//DdlGrupo.Items.Insert(0, new ListItem("Cliente", "1"));
|
||||
//DdlGrupo.Items.Insert(1, new ListItem("Vendedor", "2"));
|
||||
//DdlGrupo.Items.Insert(2, new ListItem("Sucursal", "3"));
|
||||
//DdlGrupo.SelectedValue = "1";
|
||||
|
||||
//DivDdlCliente.Visible = true;
|
||||
//DivDdlVendedor.Visible = true;
|
||||
|
||||
//DivDdlProveedor.Visible = false;
|
||||
//DivDdlTipoProveedor.Visible = false;
|
||||
|
||||
//UpFiltros.Update();
|
||||
|
||||
}
|
||||
private void MuestraFiltrosProveedor()
|
||||
{
|
||||
//DdlGrupo.Items.Clear();
|
||||
//DdlGrupo.Items.Insert(0, new ListItem("Proveedor", "1"));
|
||||
//DdlGrupo.Items.Insert(1, new ListItem("Tipo Proveedor", "2"));
|
||||
//DdlGrupo.Items.Insert(2, new ListItem("Sucursal", "3"));
|
||||
//DdlGrupo.SelectedValue = "1";
|
||||
|
||||
//DivDdlProveedor.Visible = true;
|
||||
//DivDdlTipoProveedor.Visible = true;
|
||||
|
||||
//DivDdlCliente.Visible = false;
|
||||
//DivDdlVendedor.Visible = false;
|
||||
|
||||
//UpFiltros.Update();
|
||||
}
|
||||
|
||||
protected void Tab_ActiveTabChanged(object sender, EventArgs e)
|
||||
{
|
||||
//if (Tab.ActiveTabIndex == 0)
|
||||
//{
|
||||
// MuestraFiltrosCliente();
|
||||
//}
|
||||
//else if (Tab.ActiveTabIndex == 1)
|
||||
//{
|
||||
// MuestraFiltrosProveedor();
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "GENERAR EXCEL"
|
||||
//protected void GeneraPDF(string Formato = "PDF")
|
||||
//{
|
||||
// List<ReportParameter> @params = new List<ReportParameter>();
|
||||
|
||||
// System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
// var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
|
||||
// @params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
// @params.Add(new ReportParameter("FechaInicio", TxtFechaI.Text));
|
||||
// @params.Add(new ReportParameter("FechaFin", TxtFechaF.Text));
|
||||
// @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
// @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
|
||||
// @params.Add(new ReportParameter("Grupo", DdlGrupo.SelectedItem.Text));
|
||||
// @params.Add(new ReportParameter("Sucursal", DdlSucursal.SelectedItem.Text));
|
||||
|
||||
// @params.Add(new ReportParameter("TipoReporte", Tab.ActiveTab.HeaderText));
|
||||
|
||||
|
||||
// if (Imagen.Exists)
|
||||
// {
|
||||
// @params.Add(new ReportParameter("LogoPath", logouri));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// @params.Add(new ReportParameter("LogoPath", ""));
|
||||
// }
|
||||
|
||||
|
||||
// if (Tab.ActiveTabIndex == 0)
|
||||
// {
|
||||
// @params.Add(new ReportParameter("Filtro1", DdlCliente.SelectedItem.Text));
|
||||
// @params.Add(new ReportParameter("Filtro2", DdlVendedores.SelectedItem.Text));
|
||||
|
||||
// ImprimirPDF("Empresas/Grales/Formatos/RepRotacionCarteraCliente.rdlc", DTDatosClientes, @params, "ReporteRotacionCarteraCliente", Formato);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// @params.Add(new ReportParameter("Filtro1", DdlProveedor.SelectedItem.Text));
|
||||
// @params.Add(new ReportParameter("Filtro2", DdlTipoProveedor.SelectedItem.Text));
|
||||
|
||||
// ImprimirPDF("Empresas/Grales/Formatos/RepRotacionCarteraProveedor.rdlc", DTDatosProveedores, @params, "ReporteRotacionCarteraProveedor", Formato);
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
//protected void ImgGenerarExcel_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// //GeneraPDF("Excel");
|
||||
//}
|
||||
#endregion
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user