320 lines
19 KiB
Plaintext
320 lines
19 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepMovimientosAuxiliaresCatalogoCI.aspx.vb" Inherits="AC_RepMovimientosAuxiliaresCatalogo" %>
|
|
|
|
<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" style="margin-left:2%;"><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 magindate">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" 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 ">
|
|
<div class="row">
|
|
<label class="col-md-1" style="margin-left:10px; width: 90px;">Fecha Inicio:</label>
|
|
<div class="col-md-2" style="width: 140px;">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
|
|
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
</div>
|
|
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Fin:</label>
|
|
<div class="col-md-2" style="width: 140px;">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
|
|
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
</div>
|
|
<label class="col-md-1">Tipo de Cuentas:</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="Id" TabIndex="4" onchange="Enable();" ClientIDMode="Static">
|
|
</asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-2" style="width: 60px;">Cuenta:</label>
|
|
<div class="col-md-3">
|
|
<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)"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
|
<div class="row">
|
|
<label class="col-md-1" style="margin-left:10px; width: 90px;">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" style="margin-top:10%">
|
|
</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 />
|
|
<div class="text-right">
|
|
Buscar :
|
|
<input type="text" id="Buscar" style="margin-right: 30px;" />
|
|
</div>--%>
|
|
|
|
|
|
<%-- <div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
|
<div style="margin-right: 15px">
|
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", TbDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", TbDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
</div>
|
|
</div>--%>
|
|
|
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
|
<ContentTemplate>
|
|
|
|
<asp:GridView ID="GvDatos" runat="server" CssClass="ScrollAD table table-smallpadding 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="3"></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">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")%>'></asp:Label>
|
|
</div>
|
|
</td>
|
|
<td width="100px" align="center">
|
|
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></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">
|
|
|
|
$(document).on('mouseenter', ".truncate", function () {
|
|
var $this = $(this);
|
|
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
|
$this.tooltip({
|
|
title: $this.text(),
|
|
placement: "top"
|
|
});
|
|
$this.tooltip('show');
|
|
}
|
|
});
|
|
|
|
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>
|