-- mejoras en liquidación

This commit is contained in:
2022-04-08 13:43:12 -07:00
parent 36a599fac3
commit 4721ca048d
2 changed files with 311 additions and 610 deletions

View File

@@ -199,6 +199,19 @@
<asp:CheckBox ID="ChkLiquidacion" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
</div>
</div>
<div class="row" id="divAnticipo" runat="server" visible="false" >
<div class="col-md-2" >Anticipo:</div>
<div class="col-md-3">
<asp:TextBox ID="TxtAnticipo" runat="server" Width ="100px" ClientIDMode="Static" />
</div>
<div class="col-md-2" runat="server" id="Div3" visible="false">Liquidación:</div>
<div class="col-md-3" runat="server" id="Div4" visible="false">
<asp:CheckBox ID="CheckBox2" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
</div>
</div>
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
@@ -239,37 +252,35 @@
<br />
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="Widthall">
<table class="Widthall" >
<tr>
<td style="text-align: right; width: 20%">
<asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" />
</td>
<td style="text-align: left; width: 12%">
<td style="text-align: left; width: 16%">
<asp:CheckBox Text=" Emitir complemento de pago" ID="ChkComplementoPago" Visible="true" CssClass="md-checksd" runat="server" />
<br />
<asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label>
</td>
<td style="text-align: left; width: 30%">
<td style="text-align: left; ">
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
</td>
<td style="text-align: right; width: 18%">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 125px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px; margin-right: 20px" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row">
<div class="Widthall" style="text-align: right!important; margin-top: 20px!important; margin-bottom: 2px!important">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px; margin-right: 20px" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None" HeaderStyle-CssClass="ADtr">
<Columns>
<%--0--%>
@@ -338,7 +349,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--9--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-width="35px">
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-width="25px">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>&nbsp;
@@ -399,55 +410,56 @@
<%--17--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol1" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol1" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--18--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol2" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--19--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol3" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol3" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--20--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol4" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol4" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--21--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol5" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol5" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--22--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol6" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol6" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--23--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol7" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:TextBox ID="TxtLiqCol7" Width="55px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--24--%>
<asp:TemplateField Visible="false" HeaderText="Total Gastos">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol8" Width="50px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
<asp:TextBox ID="TxtLiqCol8" Width="55px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--25--%>
<asp:TemplateField Visible="false" HeaderText="Anticipo">
<asp:TemplateField Visible="false" HeaderText="Anticipo" ItemStyle-Width="120px">
<ItemTemplate>
<asp:TextBox ID="TxtAmort" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
<asp:DropDownList ID="DdlAnti" runat="server" Width="40px" DataTextField="RazonSocial" DataValueField="CveIE"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
@@ -616,21 +628,14 @@
} else {
txt.value = "";
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
let ClsSelLiqVenta = ".ClsSelLiqVenta" + CveVenta;
let ClsSelLiqVentaTotal = ".ClsSelLiqVentaTotal" + CveVenta;
$(ClsSelLiquidacionVenta).val('');
$(ClsSelLiquidacionVentaTotal).val('');
$(ClsSelLiqVenta).val('');
$(ClsSelLiqVentaTotal).val('');
}
//if (typeof t2 === "undefined") {
//} else {
//}
if (chkPesosBancos) {
CambiaPesosDolares()
} else if (chkDolaresBancos) {
@@ -654,6 +659,7 @@
var div = document.getElementById("DivTC")
let totalLiquidacion = 0.0;
let totalAnti = 0.0;
if ($get('TxtTC') != null) {
tc = ToDouble($get('TxtTC').value);
@@ -709,21 +715,29 @@
}
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
$(".ClsSelLiq").each(function () {
$(".ClsSelLiquidacion").each(function () {
let valorString = $(this).val();
valorString = valorString.replace(/,/g, '');
if (valorString.trim().length > 0) {
totalLiquidacion = totalLiquidacion + parseFloat(valorString);
}
totalLiquidacion = totalLiquidacion + ToDouble($(this).val());
});
$(".ClsSelLiqAnt").each(function () {
totalAnti = totalAnti + ToDouble($(this).val());
});
totalLiquidacion = totalLiquidacion + totalAnti;
if ($get('TxtAnticipo') != null) {
if ($get('TxtAnticipo').value == '') {
$get('TxtAnticipo').value = 0.00
}
else {
Importe = Importe + ToDouble($get('TxtAnticipo').value);
}
}
if ($get('TxtOtrosImportes') != null) {
if (pagoMultiple != 0) {
@@ -737,11 +751,10 @@
else {
return Importe + parseFloat(Comision) - totalLiquidacion;
}
}
else {
return Importe - totalLiquidacion
}
}
}
function FnCambia(chk, txt, saldo, op, pagoMultiple, monedaPago) {
@@ -912,34 +925,35 @@
$get("BtnCambiaTipoMoneda").click();
TipoCambioActual = TipoCambioTxt;
}
}
}
function SumaLiq(txt, CveVenta, pagoMultiple, monedaPago) {
let ClsSelLiqVenta = ".ClsSelLiqVenta" + CveVenta;
let ClsSelLiqVentaTotal = ".ClsSelLiqVentaTotal" + CveVenta;
let ClsSelLiqAnticipo = ".ClsSelLiqAnt" + CveVenta;
function SumaLiquidacion(txt, CveVenta, pagoMultiple, monedaPago) {
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
let Total = 0.0;
let Anticipos = 0.0;
$( ClsSelLiqVenta).each(function () {
$( ClsSelLiquidacionVenta).each(function () {
let valorString = $(this).val();
valorString = valorString.replace(/,/g, '');
if (valorString.trim().length > 0) {
Total = Total + parseFloat(valorString);
}
Total = Total + ToDouble($(this).val());
});
$(ClsSelLiqAnticipo).each(function () {
$(ClsSelLiquidacionVentaTotal).each(function () {
Anticipos = Anticipos + ToDouble($(this).val());
});
Total = Total + Anticipos;
$(ClsSelLiqVentaTotal).each(function () {
$(this).val(Total);
FormatoMoneda2($(this));
});
FormatoMoneda(txt);
var Suma = SumaValores(pagoMultiple, monedaPago);

File diff suppressed because it is too large Load Diff