313 lines
18 KiB
Plaintext
313 lines
18 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoMes.aspx.vb" Inherits="AC_RepAnexoCatalogoMes" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.table-VH {
|
|
padding-top: 58px;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo Por Mes"></asp:Label>
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
|
|
<%-- <li>
|
|
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Excel</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
|
</li>--%>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle magindate">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" Enabled="false"/>
|
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
|
</div>
|
|
<div class="titlefiltros caption ">
|
|
<ul class="list-inline text-size-12">
|
|
<li>F. I.</li>
|
|
|
|
<li style="margin-right: 30px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 93px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
</div>
|
|
</li>
|
|
|
|
<li>F. F.
|
|
</li>
|
|
|
|
<li style="margin-right: 30px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 94px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10" Height="24px"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" Height="24px" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
</div>
|
|
</li>
|
|
<li style="display:none!important">Tipo de Cuentas:
|
|
</li>
|
|
<li style="display:none!important">
|
|
<asp:DropDownList CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" onchange="Enable();">
|
|
</asp:DropDownList>
|
|
</li>
|
|
<li>Cuenta:
|
|
</li>
|
|
<li>
|
|
<asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
|
<asp:TextBox ID="TxtCuenta" runat="server" Width="300px" ClientIDMode="Static" Enabled="false" TabIndex="5" CssClass="form-control input-sm"></asp:TextBox>
|
|
</li>
|
|
|
|
<li runat="server" id="tdTipoReporte" visible="false" tyle="display:none!important" >Tipo: </li>
|
|
|
|
<li runat="server" id="tdTipoReporte2" visible="false" style="display:none!important">
|
|
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="150px">
|
|
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
|
<div class="row" style="display:none!important" >
|
|
<label class="col-md-1">Cuentas</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" Width="100%">
|
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
|
|
<label class="col-md-1 truncate" style="width: 90px; padding-right: 2px;">Segmento de negocio</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlSegmentoNegocio" runat="server" DataTextField="Nombre" DataValueField="Id" Width="100%">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<br />
|
|
|
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
|
<ContentTemplate>
|
|
|
|
<asp:GridView ID="GvDatos" runat="server" GridLines="None"
|
|
CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
|
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="120" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="350" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Saldos Iniciales" Visible="false">
|
|
<HeaderTemplate>
|
|
<table width="100%">
|
|
<tr>
|
|
<td colspan="2">Saldos Iniciales</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Deudor</td>
|
|
<td>Acreedor</td>
|
|
</tr>
|
|
</table>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
|
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="145" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField Visible="false">
|
|
<HeaderTemplate>
|
|
<table width="100%" style="margin-left: 35px;">
|
|
<tr>
|
|
<td colspan="2">Cargos</td>
|
|
</tr>
|
|
</table>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="120" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField Visible="false">
|
|
<HeaderTemplate>
|
|
<table width="100%" style="margin-left: 35px;">
|
|
<tr>
|
|
<td colspan="2">Abonos</td>
|
|
</tr>
|
|
</table>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="120" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Enero" DataField="SaldoActualEnero" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Febrero" DataField="SaldoActualFebrero" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Marzo" DataField="SaldoActualMarzo" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Abril" DataField="SaldoActualAbril" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Mayo" DataField="SaldoActualMayo" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Junio" DataField="SaldoActualJunio" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Julio" DataField="SaldoActualJulio" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Agosto" DataField="SaldoActualAgosto" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Septiembre" DataField="SaldoActualSeptiembre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Octubre" DataField="SaldoActualOctubre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Noviembre" DataField="SaldoActualNoviembre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField DataFormatString="{0:N2}" HeaderText="Diciembre" DataField="SaldoActualDiciembre" ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Right" />
|
|
|
|
|
|
<asp:TemplateField HeaderText="Saldos Actuales" Visible="false">
|
|
<HeaderTemplate>
|
|
<table width="100%">
|
|
<tr>
|
|
<td colspan="2">Saldos Actuales</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Deudor</td>
|
|
<td>Acreedor</td>
|
|
</tr>
|
|
</table>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
|
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
|
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="145" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
|
</asp:GridView>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
|
|
function pageLoad(sender, args) {
|
|
|
|
$(function () {
|
|
//Genero las cuentas en el arreglo
|
|
var ArrCuentas = [<%= WSCuentas()%>];
|
|
|
|
$("#TxtCuenta").autocomplete({
|
|
minLength: 0,
|
|
source: ArrCuentas,
|
|
focus: function (event, ui) {
|
|
$("#TxtCuenta").val(ui.item.label);
|
|
$("#HdnCveCuenta").val(ui.item.value);
|
|
return false;
|
|
},
|
|
select: function (event, ui) {
|
|
|
|
$("#TxtCuenta").val(ui.item.label);
|
|
$("#HdnCveCuenta").val(ui.item.value);
|
|
|
|
//$("#project-description").html(ui.item.desc);
|
|
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
|
|
|
return false;
|
|
}
|
|
})
|
|
//.autocomplete("instance")._renderItem = function (ul, item) {
|
|
// return $("<li>")
|
|
// .append("<a>" + item.label + "</a>")
|
|
// .appendTo(ul);
|
|
//};
|
|
});
|
|
|
|
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
|
$('input[type=text]').on('keydown', function (e) {
|
|
// Si la tecla ENTER es presionada...
|
|
if (e.keyCode === 13) {
|
|
|
|
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
|
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
|
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
|
if (nextField.length > 0) { // Si se encontró un elemento:
|
|
nextField.focus(); // Hacerle focus / seleccionarlo
|
|
nextField.select();
|
|
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
|
$('select').on('keydown', function (e) {
|
|
// Si la tecla ENTER es presionada...
|
|
if (e.keyCode === 13) {
|
|
|
|
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
|
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
|
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
|
if (nextField.length > 0) { // Si se encontró un elemento:
|
|
nextField.focus(); // Hacerle focus / seleccionarlo
|
|
nextField.select();
|
|
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function Enable() {
|
|
var Producto = $get("DdlTipoCuentas").value;
|
|
if (Producto == "-2") {
|
|
document.getElementById("TxtCuenta").disabled = false;
|
|
//document.getElementById("TxtCuenta").focus();
|
|
//alert(Producto);
|
|
}
|
|
else {
|
|
document.getElementById("TxtCuenta").value = " ";
|
|
document.getElementById("TxtCuenta").disabled = true;
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|