Files
SIG/Contabilidad/Poliza.aspx
JORGE LUIS CAUDILLO ESPARZA c35cf91883 Commit inicial Ventas Productivo
2019-08-14 16:40:54 -07:00

286 lines
20 KiB
Plaintext

<%@ Page Title="Contabilidad - Pólizas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Poliza.aspx.vb" Inherits="Contabilidad_Poliza" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<img src="/Imagenes/printer.png" alt="Imprimir Póliza" onclick="fnPrint();" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Pólizas
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnPoliza" runat="server" CssClass="btn btn-default" Text="Pólizas" Style="display: none;" PostBackUrl="/Contabilidad/RegPolizas.aspx" />
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" id="colFiltros" runat="server" width="20px"></div>
<div class="col-md-3" id="tdD" runat="server">
<div class="row">
<label class="col-md-3">Tipo:</label>
<div class="col-md-9">
<asp:DropDownList ID="DdlTipoPoliza" runat="server" DataValueField="Id" DataTextField="Nombre" CssClass="form-control input-sm input-small">
</asp:DropDownList>
</div>
</div>
</div>
<label class="col-md-1">Fecha:</label>
<div class="col-md-2">
<asp:TextBox ID="TxtFechaPol" runat="server" CssClass="Texto" MaxLength="10" ValidationGroup="Consultar" Width="70px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVFechaPol" runat="server" ControlToValidate="TxtFechaPol" Display="None" ErrorMessage="El campo <b>''Fecha de póliza''</b> es requerido por la aplicación, por favor ingresélo." ValidationGroup="Consultar"></asp:RequiredFieldValidator>
</div>
<label class="col-md-2">Número de póliza:</label>
<div class="col-md-2">
<asp:TextBox ID="txtNumPol" runat="server" CssClass="Texto" MaxLength="8" ValidationGroup="Consultar" Width="44px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvNumPol" runat="server" ControlToValidate="txtNumPol" Display="None" ErrorMessage="El campo <b>''Número de póliza''</b> es requerido por la aplicación, por favor ingresélo." ValidationGroup="Consultar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvNumPol" runat="server" ControlToValidate="txtNumPol" Display="None" ErrorMessage="El campo <b>''Número de póliza''</b> no tiene el formato correcto, por favor corrija. (Solo digítos númericos)." Operator="DataTypeCheck" Type="Integer" ValidationGroup="Consultar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvNumPol" runat="server" HighlightCssClass="vco" TargetControlID="rfvNumPol" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvNumPol" runat="server" HighlightCssClass="vco" TargetControlID="cvNumPol" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<table id="TbGral" width="100%" border="0" cellpadding='0' cellspacing="0">
<tr>
<td>
<table id="tbl">
<tr>
<td>
<asp:UpdatePanel ID="upTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="table" style="width: 100%;">
<tr style="height: 18px;">
<th align="center" colspan="2">
<asp:Label ID="LblEmpresa" runat="server" Font-Size="Large"></asp:Label></th>
</tr>
<tr style="height: 18px;">
<th align="center" colspan="2">Diario Cronológico del&nbsp;<asp:Label ID="LblFechaDe" runat="server"></asp:Label>&nbsp;al&nbsp;<asp:Label ID="LblFechaAl" runat="server"></asp:Label></th>
</tr>
<tr style="height: 18px;">
<td align="left" colspan="2">&nbsp;<b>Fecha:</b>&nbsp;<asp:Label ID="LblFechaActual" runat="server"></asp:Label></td>
</tr>
<tr>
<td>
<table class="table table-striped table-advance table-hover" style="width: 100%;">
<tr style="height: 18px;">
<th style="text-align: left;">&nbsp;<b>Tipo de Póliza:</b>&nbsp;<asp:Label ID="LblTipoPoliza" runat="server"></asp:Label></th>
</tr>
<tr style="height: 18px;">
<th style="text-align: left;">&nbsp;<b>Número de Póliza:</b>&nbsp;<asp:Label ID="LblNumPoliza" runat="server"></asp:Label></th>
</tr>
<tr style="height: 18px;">
<th style="text-align: left;">&nbsp;<b>Concepto:</b>&nbsp;<asp:Label ID="LblConcepto" runat="server"></asp:Label></th>
</tr>
</table>
</td>
</tr>
<tr style="height: 10px;">
<td></td>
</tr>
</table>
<table style="width: 100%;" class="table">
<thead>
<tr class="Titulos">
<th align="center" width="70px">
<asp:LinkButton ID="LbNumMovto" runat="server" Text="" CommandArgument="NumMovto" OnClick="LbOrden_Click">
N°
<asp:Literal ID="ImgNumMovto" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th align="center" width="100px">
<asp:LinkButton ID="LbRef" runat="server" Text="" CommandArgument="REFERENCIA" OnClick="LbOrden_Click">
Referencia
<asp:Literal ID="ImgREFERENCIA" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th align="center" width="150px">
<asp:LinkButton ID="LbCuenta" runat="server" Text="" CommandArgument="CuentaFormato" OnClick="LbOrden_Click">
Cuenta
<asp:Literal ID="ImgCuentaFormato" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th align="center" width="100px">SegNeg</th>
<th align="center" width="250px">
<asp:LinkButton ID="LbNombre" runat="server" Text="Nombre">
</asp:LinkButton>&nbsp;/&nbsp;<asp:LinkButton ID="lnkConcepto" runat="server" Text="Concepto">
</asp:LinkButton>
</th>
<th align="center" width="100px">
<asp:LinkButton ID="LbCargo" runat="server" Text="" CommandArgument="CARGO" OnClick="LbOrden_Click">
Cargo
<asp:Literal ID="ImgCARGO" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th align="center" width="100px">
<asp:LinkButton ID="LbAbono" runat="server" Text="" CommandArgument="AMOBO" OnClick="LbOrden_Click">
Abono
<asp:Literal ID="ImgABONO" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th>&nbsp;</th>
</tr>
</thead>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivDetalle" style="overflow-y: auto;">
<asp:UpdatePanel ID="upDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" ClientIDMode="Static" EmptyDataText="No se encontraron datos en la Póliza solicitada." ShowHeader="false" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Right" Width="70" />
<ItemTemplate>
<asp:Label ID="A" runat="server" Text='<%# Eval("NumMovto") %>'></asp:Label>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Center" Width="80" />
<ItemTemplate>
<asp:HyperLink ID="B" runat="server" Text='<%# Eval("REFERENCIA") %>' CssClass="Texto"></asp:HyperLink>
<asp:Literal ID="LitSIGRef" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Center" Width="150" />
<ItemTemplate>
<asp:Label ID="C" runat="server" Text='<%# Eval("CuentaFormato", "{0}") %>'></asp:Label>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Center" Width="100" />
<ItemTemplate>
<asp:Label ID="LblSegNeg" runat="server" Text='<%# Eval("SEGNEG", "{0}") %>'></asp:Label>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Left" Width="250" />
<ItemTemplate>
<asp:Label ID="D" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Right" Width="100" />
<ItemTemplate>
<asp:Label ID="E" runat="server" Text='<%# Eval("CARGO","{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle HorizontalAlign="Right" Width="100" />
<ItemTemplate>
<asp:Label ID="F" runat="server" Text='<%# Eval("ABONO","{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>&nbsp;</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
</asp:GridView>
<table class="table table-striped table-advance table-hover">
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td align="right" width="606px">Total Póliza:&nbsp;</td>
<td style="border-top: solid 1px #000000;" width="210px">
<table border="0" cellpadding="0" cellspacing="0" rules="all" style="border-collapse: collapse;" class="Texto">
<tr>
<td align="right" width="105px">
<asp:Label ID="LblCargo" runat="server"></asp:Label></td>
<td align="right" width="105px">
<asp:Label ID="LblAbono" runat="server"></asp:Label></td>
</tr>
</table>
</td>
<td>&nbsp;</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script language="javascript" type="text/javascript">
function fnPrint() {
//var divToPrint = document.getElementById('TbGral');
//var newWin = window.open("");
//newWin.document.write(divToPrint.outerHTML);
//newWin.print();
//newWin.close();
var data = $('#TbGral').html();
var mywindow = window.open();
mywindow.document.write('<html><head><title>Impresión Póliza</title>');
mywindow.document.write('<link type="text/css" rel="stylesheet" href="/Styles/Estilos.css"/>');
mywindow.document.write('</head><body>');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.print();
return true;
}
</script>
<script language="javascript" type="text/javascript">
var t;
function Acomoda() {
var g = t - document.body.offsetHeight + document.getElementById('GvDatos').offsetHeight;
g = g + 'px';
var obj;
obj = document.getElementById("DivDetalle");
obj.style.height = g;
document.getElementById("GvDatos").style.width = document.body.offsetWidth - 17;
}
function Browser() {
var g;
var AdaptedHeight = document.getElementById('IEhackInnerHeight').offsetTop;
document.getElementById('IEhackInnerHeight').style.top = AdaptedHeight + 'px';
if (typeof innerHeight == 'number')
t = window.innerHeight;
else
t = document.getElementById('IEhackInnerHeight').offsetTop;
}
function MuestraPoliza() {
var Boton = document.getElementById("C_cmdPoliza");
var ddl = document.getElementById("C_ddlTipo");
if (Boton && ddl && ddl.value != "1") {
Boton.style.display = "";
}
else
Boton.style.display = "none";
}
function PrintPoliza(Pagina, Ancho, Alto) {
var left = (screen.availWidth / 2) - (Ancho / 2) + self.screenLeft;
var top = (screen.availHeight / 2) - (Alto / 2) - 20;
PopUp = window.open(Pagina, 'Pop', 'width=' + Ancho + ', height=' + Alto + ',left=' + left + ',top=' + top);
if (!PopUp)
alert('No se pudo abrir la ventana.\nverifique que no tenga activado el bloqueador de ventanas emergentes.');
PopUp.print();
}
</script>
</asp:Content>