339 lines
21 KiB
Plaintext
339 lines
21 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogo.aspx.vb" Inherits="Conta_RepMovimientosAuxiliaresCatalogo" EnableEventValidation="false" %>
|
|
|
|
<asp:Content ContentPlaceHolderID="Css" runat="server">
|
|
<style>
|
|
.truncate {
|
|
width: 300px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
|
|
|
<li>
|
|
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
|
</li>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
|
Movimientos Auxiliares del Catálogo
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
|
|
<a href="javascript:;" class="expand"></a>
|
|
</div>
|
|
<div class="titlefiltros caption ">
|
|
<div class="row">
|
|
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Inicio:</label>
|
|
<div class="col-md-2" style="width: 110px;">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
|
|
<asp:CompareValidator ID="CVTxtFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaDel" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
</div>
|
|
<label class="col-md-1" style="width: 75px; padding-right: 2px;">Fecha Fin:</label>
|
|
<div class="col-md-2" style="width: 110px;">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
|
|
<asp:CompareValidator ID="CVTxtFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="CECVTxtFechaAl" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
</div>
|
|
<label class="col-md-1" style="display:none;">Tipo de Cuentas:</label>
|
|
<div class="col-md-1" style="display:none;">
|
|
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true" ClientIDMode="Static">
|
|
</asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-1" style="width: 60px;">Cuenta:</label>
|
|
<div class="col-md-4">
|
|
<%-- <asp:HiddenField ID="HdnCveCuenta" runat="server" ClientIDMode="Static" />
|
|
<asp:TextBox ID="TxtCuenta" CssClass="form-control-input" runat="server" ClientIDMode="Static" Enabled="false" TabIndex="5" onclick="this.setSelectionRange(0, this.value.length)" Width="100"></asp:TextBox>--%>
|
|
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
|
|
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="portlet-body" style="display: none">
|
|
<div class="row">
|
|
<label class="col-md-1">Moneda:</label>
|
|
<div class="col-md-1">
|
|
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" Width="70px">
|
|
</asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
|
<div class="col-md-2 ">
|
|
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Width="100px">
|
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
|
<div class="row">
|
|
<label class="col-md-3">Tipo:</label>
|
|
<div class="col-md-6">
|
|
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server" Width="100px">
|
|
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<br />
|
|
<div class="text-right">
|
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
</div>
|
|
|
|
|
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
|
<ContentTemplate>
|
|
|
|
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-smallpadding table-hover table-striped ScrollAD mysmallbtn Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1"
|
|
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" GridLines="None" EmptyDataText="No se encontrarios movimientos." AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
|
|
<Columns>
|
|
<asp:TemplateField ControlStyle-CssClass="Widthall">
|
|
<HeaderTemplate>
|
|
<table width="100%">
|
|
<tr>
|
|
<td colspan="3"><font size="2">Cuenta</font></td>
|
|
<td colspan="1"><font size="2">Nombre</font></td>
|
|
<td colspan="4"></td>
|
|
<td><font size="2">Saldo Inicial</font></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="60px" align="center">Fecha</td>
|
|
<td width="60px" align="center">Tipo</td>
|
|
<td width="60px" align="center">Número</td>
|
|
<td width="300px" align="left">Concepto</td>
|
|
<td width="100px" align="center">Referencia</td>
|
|
<td width="100px" align="center">Referencia Movto</td>
|
|
<td width="100px" align="center">SubProyecto</td>
|
|
<td width="100px" align="center">Cargos</td>
|
|
<td width="100px" align="center">Abonos</td>
|
|
<td width="100px" align="center">Saldo</td>
|
|
</tr>
|
|
</table>
|
|
<%--<hr />--%>
|
|
</HeaderTemplate>
|
|
<%-- <HeaderStyle />--%>
|
|
<ItemTemplate>
|
|
<table width="100%" border="0" style="border-spacing: 0px;">
|
|
<tr runat="server" id="tr1">
|
|
<td colspan="3" align="left" width="180px">
|
|
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
|
|
</td>
|
|
<td colspan="1" align="left" width="300px">
|
|
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
|
</td>
|
|
<td colspan="2" width="200px"></td>
|
|
<td style="font-weight: normal;" align="right" width="100px">Saldo Inicial:
|
|
</td>
|
|
<td style="font-weight: normal;" align="right" width="100px">
|
|
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
|
|
</td>
|
|
</tr>
|
|
<tr runat="server" id="tr2">
|
|
<td width="60px" style="border: 0px;" align="center">
|
|
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
|
</td>
|
|
<td width="60px" style="border: 0px;" align="center">
|
|
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
|
|
</td>
|
|
<td width="60px" style="border: 0px;" align="center">
|
|
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
|
|
<%--<asp:Label ID="LbNumero" runat="server" Text='<%# Eval("Folio")%>'></asp:Label>--%>
|
|
</td>
|
|
|
|
<td width="300px" align="left">
|
|
<div class="truncate" style="width: 300px;">
|
|
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>' ></asp:Label>
|
|
</div>
|
|
</td>
|
|
<td width="100px">
|
|
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
|
|
</td>
|
|
<td width="60px" style="border: 0px;" align="center">
|
|
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
|
|
<%--<asp:Label ID="LbNumero" runat="server" Text='<%# Eval("Folio")%>'></asp:Label>--%>
|
|
</td>
|
|
<td width="100px">
|
|
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
|
|
</td>
|
|
<td width="100px" align="right">
|
|
<asp:Label ID="LbCargos" runat="server"></asp:Label>
|
|
</td>
|
|
<td width="100px" align="right">
|
|
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
|
|
</td>
|
|
<td width="100px" align="right">
|
|
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</ItemTemplate>
|
|
<ItemStyle />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
|
|
</asp:GridView>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
|
|
|
|
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content4" 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)
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
|
|
$('#Buscar').keyup(function () {
|
|
var texto = $('#Buscar').val();
|
|
$('#<%=GvDatos.ClientID%> > tbody > tr').css({ 'display': 'none' });
|
|
$("#<%=GvDatos.ClientID%> > tbody > tr:contains('" + texto + "')").css({ 'display': '' });
|
|
|
|
$('#<%=GvDatos.ClientID%> > tbody > tr:nth-child(1)').css({ 'display': 'none' });
|
|
});--%>
|
|
|
|
//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>
|