312 lines
20 KiB
Plaintext
312 lines
20 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogo.aspx.vb" Inherits="AC2_RepAnexoCatalogo" EnableEventValidation="false" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.table-VH {
|
|
padding-top: 58px;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
<asp:Label runat="server" ID="LbTitulo" Text="Anexo del Catálogo"></asp:Label>
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
|
|
<li>
|
|
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
|
</li>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
|
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
|
</div>
|
|
<div class="titlefiltros caption ">
|
|
<%--<div class="row">--%>
|
|
<div class="row">
|
|
<div class="col-md-1 truncate">
|
|
Cuenta
|
|
</div>
|
|
<div class="col-md-3">
|
|
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
|
|
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
|
|
<div class="col-md-1 truncate">
|
|
Fecha Inicio:
|
|
</div>
|
|
<div class="col-md-1" style="min-width: 115px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
</div>
|
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
<div class="col-md-1 truncate">
|
|
Fecha Fin:
|
|
</div>
|
|
<div class="col-md-1" style="min-width: 115px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
</div>
|
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
|
<div class="row">
|
|
<div class="col-md-1 truncate">
|
|
Tipo Movto
|
|
</div>
|
|
<div class="col-md-2 truncate">
|
|
<asp:DropDownList ID="DdlCuenta" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
|
Tipo
|
|
</div>
|
|
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
|
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
|
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<div class="col-md-1" id="divProyecto" runat="server">
|
|
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
|
|
</asp:DropDownList>
|
|
</div>
|
|
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
|
</asp:DropDownList>
|
|
</div>
|
|
<div class="col-md-1">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<br />
|
|
|
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
|
<ContentTemplate>
|
|
|
|
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
|
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" EmptyDataText="No se encontraron cuentas con los parametros establecidos." AutoGenerateColumns="False" OnRowDataBound="GvIngresos_RowDataBound">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="Cuenta" HeaderStyle-HorizontalAlign="Left">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbCodigo" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="180" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Nombre" HeaderStyle-HorizontalAlign="Left">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="320" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Saldos Iniciales">
|
|
<HeaderTemplate>
|
|
<table width="100%">
|
|
<tr>
|
|
<td colspan="2">Saldos Iniciales</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Deudor</td>
|
|
<td>Acreedor</td>
|
|
</tr>
|
|
</table>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
|
<asp:Label ID="LbSaldoInicial2" runat="server" Width="30px" Visible="false"></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="145" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Cargos">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbCargos" runat="server" Text='<%# Eval("Cargos", "{0:N2}")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="145" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Abonos">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LbAbonos" runat="server" Text='<%# Eval("Abonos", "{0:N2}")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="145" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Saldos Actuales">
|
|
<HeaderTemplate>
|
|
<table width="100%">
|
|
<tr>
|
|
<td colspan="2">Saldos Actuales</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Deudor</td>
|
|
<td>Acreedor</td>
|
|
</tr>
|
|
</table>
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:HyperLink ID="HLSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
|
<%--<asp:Label ID="LbSaldoActual" runat="server" Text='<%# Eval("SaldoActual", "{0:N2}")%>'></asp:Label>--%>
|
|
<asp:Label ID="LbSaldoActual" runat="server" Width="30px" Visible="false"></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle Width="145" HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
|
</asp:GridView>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
|
|
<%-- function pageLoad(sender, args) {
|
|
|
|
$(function () {
|
|
//Genero las cuentas en el arreglo
|
|
var ArrCuentas = [<%= WSCuentas()%>];
|
|
|
|
$("#TxtCuenta").autocomplete({
|
|
minLength: 0,
|
|
source: ArrCuentas,
|
|
focus: function (event, ui) {
|
|
$("#TxtCuenta").val(ui.item.label);
|
|
$("#HdnCveCuenta").val(ui.item.value);
|
|
return false;
|
|
},
|
|
select: function (event, ui) {
|
|
|
|
$("#TxtCuenta").val(ui.item.label);
|
|
$("#HdnCveCuenta").val(ui.item.value);
|
|
|
|
//$("#project-description").html(ui.item.desc);
|
|
//$("#project-icon").attr("src", "images/" + ui.item.icon);
|
|
|
|
return false;
|
|
}
|
|
})
|
|
//.autocomplete("instance")._renderItem = function (ul, item) {
|
|
// return $("<li>")
|
|
// .append("<a>" + item.label + "</a>")
|
|
// .appendTo(ul);
|
|
//};
|
|
});
|
|
|
|
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
|
$('input[type=text]').on('keydown', function (e) {
|
|
// Si la tecla ENTER es presionada...
|
|
if (e.keyCode === 13) {
|
|
|
|
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
|
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
|
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
|
if (nextField.length > 0) { // Si se encontró un elemento:
|
|
nextField.focus(); // Hacerle focus / seleccionarlo
|
|
nextField.select();
|
|
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
|
|
$('select').on('keydown', function (e) {
|
|
// Si la tecla ENTER es presionada...
|
|
if (e.keyCode === 13) {
|
|
|
|
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
|
|
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
|
|
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
|
|
if (nextField.length > 0) { // Si se encontró un elemento:
|
|
nextField.focus(); // Hacerle focus / seleccionarlo
|
|
nextField.select();
|
|
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
|
|
}
|
|
}
|
|
});
|
|
|
|
}--%>
|
|
|
|
function Enable() {
|
|
var Producto = $get("DdlTipoCuentas").value;
|
|
if (Producto == "-2") {
|
|
//document.getElementById("TxtCuenta").disabled = false;
|
|
document.getElementById("C_DdlCuentas").disabled = false;
|
|
//document.getElementById("TxtCuenta").focus();
|
|
//alert(Producto);
|
|
}
|
|
else {
|
|
//document.getElementById("TxtCuenta").value = " ";
|
|
//document.getElementById("TxtCuenta").disabled = true;
|
|
$get("C_DdlCuentas").value = "-1";
|
|
document.getElementById("C_DdlCuentas").disabled = true;
|
|
}
|
|
}
|
|
|
|
function Scroll() {
|
|
var Tam = TamañoVentana();
|
|
var Alto = Tam.height - 360;
|
|
if (Alto < 100) {
|
|
Alto = 100;
|
|
}
|
|
$('#<%=GvDatos.ClientID%>').ADScroll({
|
|
height: Alto
|
|
});
|
|
}
|
|
</script>
|
|
</asp:Content>
|