557 lines
30 KiB
Plaintext
557 lines
30 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza.aspx.vb" Inherits="Contabilidad_RegPrePoliza" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.GvMov input, .GvMov td {
|
|
height: 20px !important;
|
|
}
|
|
|
|
.GvSize tr > th:nth-child(1), .GvSize tr > th:nth-child(3), .GvSize tr > th:nth-child(5),
|
|
.GvSize tr > td:nth-child(1), .GvSize tr > td:nth-child(3), .GvSize tr > td:nth-child(5) {
|
|
width: 17%;
|
|
}
|
|
|
|
.GvSize tr > th:nth-child(2), .GvSize tr > td:nth-child(2) {
|
|
width: 9%;
|
|
}
|
|
|
|
.GvSize tr > th:nth-child(4), .GvSize tr > th:nth-child(8),
|
|
.GvSize tr > td:nth-child(4), .GvSize tr > td:nth-child(8) {
|
|
width: 12%;
|
|
}
|
|
|
|
.GvSize tr > th:nth-child(6), .GvSize tr > th:nth-child(7),
|
|
.GvSize tr > td:nth-child(6), .GvSize tr > td:nth-child(7) {
|
|
width: 8%;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td align="left" style="width: 665px;">
|
|
|
|
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div id="DivConceptoPrePoliza" runat="server" class="chequesie22">
|
|
<div class="chequesie12">
|
|
<div class="row">
|
|
<label class="col-md-2 control-label text-left">Fecha: </label>
|
|
<div class="col-md-4" style="width: 42%;">
|
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
|
</span>
|
|
</div>
|
|
|
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes 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="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
<div class="col-md-1" style="width: 5px;">
|
|
<asp:CheckBox ID="ChkAutoConta" runat="server"></asp:CheckBox>
|
|
</div>
|
|
<label class="col-md-2">AutoContabilizar</label>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="chequesie22">
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label class="col-md-2">Observaciones:</label>
|
|
<div class="col-md-5">
|
|
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
|
</div>
|
|
|
|
<label class="col-md-1">Movimiento:</label>
|
|
<div class="col-md-4">
|
|
<asp:DropDownList ID="DdlPlantilla" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" Width="250px" ValidationGroup="GrpGuardar">
|
|
</asp:DropDownList>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row" id="trNotificar" runat="server" visible="False">
|
|
<label class="col-md-2">Notificar:</label>
|
|
<div class="col-md-10">
|
|
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
|
<label class="col-md-2">Cuenta Depósito:</label>
|
|
<div class="col-md-10">
|
|
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<br />
|
|
</div>
|
|
</div>
|
|
<div class="chequesie22">
|
|
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
|
<div class="col-md-12">
|
|
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
|
|
<tr class="Titulos TextTab">
|
|
<th>Concepto</th>
|
|
<th>Cta. Contable</th>
|
|
<th>Referencia</th>
|
|
<th>Descripción</th>
|
|
<th>SubProyecto</th>
|
|
<th>Cargo</th>
|
|
<th>Abono</th>
|
|
<th style="width: 100px;">Comandos</th>
|
|
<th runat="server" visible="false" id="nomostrar2"></th>
|
|
</tr>
|
|
<tr class="TextTab">
|
|
<th>
|
|
<asp:DropDownList ID="DdlConceptosContables" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px">
|
|
</asp:DropDownList><br />
|
|
</th>
|
|
<th>
|
|
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="160px">
|
|
</asp:DropDownList><br />
|
|
</th>
|
|
<th>
|
|
<asp:TextBox ID="TxtReferencia" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
|
</th>
|
|
<th>
|
|
<asp:TextBox ID="TxtDescripcion" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
|
</th>
|
|
<th>
|
|
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="160px">
|
|
</asp:DropDownList><br />
|
|
</th>
|
|
<th>
|
|
<asp:TextBox ID="TxtCargo" runat="server" Width="76px" Height="24px"></asp:TextBox>
|
|
</th>
|
|
<th>
|
|
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px"></asp:TextBox>
|
|
</th>
|
|
<th align="center">
|
|
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar"></asp:LinkButton>
|
|
</th>
|
|
<th runat="server" visible="false" id="nomostrar"></th>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
|
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
|
<tr class="Titulos">
|
|
<th>Cuenta</th>
|
|
<th>Referencia</th>
|
|
<th>Descripción</th>
|
|
<th>SubProyecto</th>
|
|
<th>Ref. Bancaria</th>
|
|
<th>Cargo</th>
|
|
<th>Abono</th>
|
|
<th></th>
|
|
</tr>
|
|
</table>
|
|
|
|
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
|
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Cuenta</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal><br />
|
|
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Referencia</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Literal>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Concepto</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtConcepto" runat="server" Width="150px" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
|
</ItemTemplate>
|
|
<ItemStyle />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="140px"></asp:DropDownList>
|
|
</ItemTemplate>
|
|
<ItemStyle />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Ref. Bancaria</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:DropDownList ID="DdlSaldos" CssClass="select2me" runat="server" DataValueField="CveIE" DataTextField="RazonSocialSaldo" Visible="false" Style="width: 150px;"></asp:DropDownList>
|
|
</ItemTemplate>
|
|
<ItemStyle />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Abono</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Eliminar">
|
|
<ItemTemplate>
|
|
<asp:ImageButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<RowStyle CssClass="Texto" />
|
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
<HeaderStyle CssClass="Titulos" />
|
|
</asp:GridView>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
|
|
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
|
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto" Width="100%" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Movimiento</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Concepto</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtConcepto" runat="server" MaxLength="100" CssClass="form-control input-sm" Text='<%# Eval("Concepto") %>'></asp:TextBox><br />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="380px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Cuenta</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" Width="200px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtCargo" runat="server" CssClass=" txtcargo form-control input-sm" Style="text-align: right" Text='<%# If(Eval("TipoMovto").ToString = "False", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:TextBox><br />
|
|
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Abono</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtAbono" runat="server" CssClass=" txtabono form-control input-sm" Style="text-align: right" Text='<%# If(Eval("TipoMovto").ToString = "True", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:TextBox><br />
|
|
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<RowStyle CssClass="Texto" />
|
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
<HeaderStyle CssClass="Titulos" />
|
|
</asp:GridView>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<table class="table table-striped table-advance table-hover Widthall">
|
|
<tr>
|
|
<td style="width: 730px"> </td>
|
|
<th style="width: 70px;">
|
|
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="70px"></asp:TextBox></th>
|
|
<th style="width: 70px;">
|
|
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="70px"></asp:TextBox></th>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="text-align: center;">
|
|
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
|
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
function FnSuma(t, txt, importe) {
|
|
|
|
if (t.checked) {
|
|
txt.value = FormatNumber(importe, 2, true, true, true);
|
|
} else {
|
|
txt.value = "";
|
|
}
|
|
|
|
$get('TxtAbono').value = FormatNumber(SumaValores(), 2, true, true, true);
|
|
|
|
//alert(txt.value);
|
|
}
|
|
|
|
//function FncImporte(t) {
|
|
// $get('TxtImporte').value = FormatNumber(t.value, 2, true, true, true);
|
|
// $get('HdnImporte').value = FormatNumber(t.value, 2, true, true, true);
|
|
//}
|
|
function FncImporte(txt, rowtxt, opcion) {
|
|
|
|
// opcion = 1, se registro desde el txtimporte
|
|
if (opcion == 1) {
|
|
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber(ToDouble($get(txt).value), 2, true, true, true);
|
|
debugger;
|
|
if ($get('ChkAbonoCuenta')) {
|
|
$get('ChkAbonoCuenta').checked = ($get(txt).value > 2000);
|
|
}
|
|
FormatoMoneda($get(txt));
|
|
} else {
|
|
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber(ToDouble($get(rowtxt).value), 2, true, true, true);
|
|
|
|
}
|
|
}
|
|
|
|
function FncImporteCuenta(txt) {
|
|
|
|
if ($get('ChkAbonoCuenta')) {
|
|
$get('ChkAbonoCuenta').checked = (parseFloat(txt.value.replace(/,/g, '')) > 2000);
|
|
}
|
|
FormatoMoneda(txt);
|
|
}
|
|
|
|
function SumaValores() {
|
|
var Importe = 0;
|
|
var topLevelElem = document.getElementById("form1");
|
|
var textBoxes = topLevelElem.getElementsByTagName("input");
|
|
for (var i = 0; i < textBoxes.length; i++) {
|
|
if (textBoxes[i].type == "text") {
|
|
if (textBoxes[i].id.indexOf('C_GvMov_TxtAbono') >= 0) {
|
|
if (textBoxes[i].value != '') {
|
|
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
|
alert(Importe);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return Importe;
|
|
|
|
}
|
|
|
|
function FnCambia(chk, txt) {
|
|
|
|
if (txt.value != '') {
|
|
chk.checked = true;
|
|
} else {
|
|
chk.checked = false;
|
|
}
|
|
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
|
|
}
|
|
function getCuenta(pId) {
|
|
|
|
$get('HdnCveCuenta').value = pId;
|
|
|
|
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
|
|
|
|
}
|
|
|
|
function OnSucceeded(result, userContext, methodName) {
|
|
|
|
if (methodName == 'wsGetNombreCuenta') {
|
|
$get('TxtCuentaContable').value = result;
|
|
}
|
|
}
|
|
|
|
function myItemSelectedHandler(source, eventArgs) {
|
|
|
|
//debugger;
|
|
var CC = $get('HdnCveCuenta');
|
|
CC.value = eventArgs.get_value();
|
|
|
|
// var b = $get('C_Tabs_TabConyuge_BtnTruco');
|
|
// b.Click;
|
|
var aTargetElement = 'BtnSelCuenta';
|
|
__doPostBack(aTargetElement, eventArgs.get_value());
|
|
|
|
//alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
|
|
|
|
}
|
|
|
|
function LimpiaImporte(t, txt) {
|
|
|
|
if (t.value != '' && $get(txt)) {
|
|
$get(txt).value = '';
|
|
}
|
|
}
|
|
|
|
$(document).ready(
|
|
function () {
|
|
CargaTxtFunciones();
|
|
|
|
Sys.Application.add_load(function (s, e) {
|
|
CargaTxtFunciones();
|
|
});
|
|
}
|
|
);
|
|
|
|
function CargaTxtFunciones() {
|
|
|
|
$(".txtcargo").each(function () {
|
|
|
|
$(this).keyup(function () {
|
|
calculateCargo();
|
|
comparar();
|
|
});
|
|
});
|
|
|
|
|
|
$(".txtabono").each(function () {
|
|
|
|
$(this).keyup(function () {
|
|
calculateAbono();
|
|
comparar();
|
|
});
|
|
});
|
|
|
|
}
|
|
|
|
function comparar() {
|
|
|
|
var TextoCargos = document.getElementById('<%= TxtTotalCargos.ClientID %>');
|
|
var TextoAbonos = document.getElementById('<%= TxtTotalAbonos.ClientID %>');
|
|
|
|
|
|
if (TextoCargos.value == TextoAbonos.value) {
|
|
|
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #04B431";
|
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #04B431";
|
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "";
|
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "";
|
|
}
|
|
else {
|
|
|
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #ff0000";
|
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #ff0000";
|
|
|
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "#ff0000";
|
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "#ff0000";
|
|
}
|
|
|
|
}
|
|
function calculateCargo() {
|
|
var sum = 0;
|
|
$(".txtcargo").each(function () {
|
|
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
|
sum += parseFloat(this.value.split(',').join(''));
|
|
}
|
|
});
|
|
$('#<%= TxtTotalCargos.ClientID %>').val(sum.toFixed(2));
|
|
}
|
|
|
|
function calculateAbono() {
|
|
var sum = 0;
|
|
|
|
$(".txtabono").each(function () {
|
|
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
|
sum += parseFloat(this.value.split(',').join(''));
|
|
}
|
|
});
|
|
$('#<%= TxtTotalAbonos.ClientID %>').val(sum.toFixed(2));
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
<style type="text/css">
|
|
.AutoExtender {
|
|
font-family: Verdana, Helvetica, sans-serif;
|
|
font-size: .9em;
|
|
font-weight: normal;
|
|
border: solid 1px #006699;
|
|
line-height: 20px;
|
|
padding: 2px;
|
|
background-color: White;
|
|
margin-left: 2px;
|
|
overflow: auto;
|
|
list-style-type: none;
|
|
}
|
|
|
|
.AutoExtenderList {
|
|
cursor: pointer;
|
|
color: darkgray;
|
|
text-align: left;
|
|
}
|
|
|
|
.AutoExtenderHighlight {
|
|
color: White;
|
|
background-color: #084784;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#divwidth {
|
|
width: 150px !important;
|
|
}
|
|
|
|
#divwidth div {
|
|
width: 150px !important;
|
|
}
|
|
</style>
|
|
</asp:Content>
|