-- mejoras en liquidación
This commit is contained in:
@@ -199,6 +199,19 @@
|
|||||||
<asp:CheckBox ID="ChkLiquidacion" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
|
<asp:CheckBox ID="ChkLiquidacion" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
||||||
@@ -239,37 +252,35 @@
|
|||||||
<br />
|
<br />
|
||||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table class="Widthall">
|
<table class="Widthall" >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: right; width: 20%">
|
<td style="text-align: right; width: 20%">
|
||||||
<asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" />
|
<asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" />
|
||||||
</td>
|
</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" />
|
<asp:CheckBox Text=" Emitir complemento de pago" ID="ChkComplementoPago" Visible="true" CssClass="md-checksd" runat="server" />
|
||||||
<br />
|
<br />
|
||||||
<asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label>
|
<asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label>
|
||||||
</td>
|
</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" />
|
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</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">
|
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
|
<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"
|
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>
|
<Columns>
|
||||||
|
|
||||||
<%--0--%>
|
<%--0--%>
|
||||||
@@ -338,7 +349,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--9--%>
|
<%--9--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-width="35px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-width="25px">
|
||||||
<HeaderTemplate></HeaderTemplate>
|
<HeaderTemplate></HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>
|
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>
|
||||||
@@ -399,55 +410,56 @@
|
|||||||
<%--17--%>
|
<%--17--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--18--%>
|
<%--18--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--19--%>
|
<%--19--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--20--%>
|
<%--20--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--21--%>
|
<%--21--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--22--%>
|
<%--22--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--23--%>
|
<%--23--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--24--%>
|
<%--24--%>
|
||||||
<asp:TemplateField Visible="false" HeaderText="Total Gastos">
|
<asp:TemplateField Visible="false" HeaderText="Total Gastos">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--25--%>
|
<%--25--%>
|
||||||
<asp:TemplateField Visible="false" HeaderText="Anticipo">
|
<asp:TemplateField Visible="false" HeaderText="Anticipo" ItemStyle-Width="120px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtAmort" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -616,20 +628,13 @@
|
|||||||
} else {
|
} else {
|
||||||
txt.value = "";
|
txt.value = "";
|
||||||
|
|
||||||
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
let ClsSelLiqVenta = ".ClsSelLiqVenta" + CveVenta;
|
||||||
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
let ClsSelLiqVentaTotal = ".ClsSelLiqVentaTotal" + CveVenta;
|
||||||
|
|
||||||
$(ClsSelLiquidacionVenta).val('');
|
|
||||||
$(ClsSelLiquidacionVentaTotal).val('');
|
|
||||||
|
|
||||||
|
$(ClsSelLiqVenta).val('');
|
||||||
|
$(ClsSelLiqVentaTotal).val('');
|
||||||
|
|
||||||
}
|
}
|
||||||
//if (typeof t2 === "undefined") {
|
|
||||||
|
|
||||||
//} else {
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
if (chkPesosBancos) {
|
if (chkPesosBancos) {
|
||||||
CambiaPesosDolares()
|
CambiaPesosDolares()
|
||||||
@@ -654,6 +659,7 @@
|
|||||||
var div = document.getElementById("DivTC")
|
var div = document.getElementById("DivTC")
|
||||||
|
|
||||||
let totalLiquidacion = 0.0;
|
let totalLiquidacion = 0.0;
|
||||||
|
let totalAnti = 0.0;
|
||||||
|
|
||||||
if ($get('TxtTC') != null) {
|
if ($get('TxtTC') != null) {
|
||||||
tc = ToDouble($get('TxtTC').value);
|
tc = ToDouble($get('TxtTC').value);
|
||||||
@@ -709,21 +715,29 @@
|
|||||||
}
|
}
|
||||||
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
|
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
|
||||||
|
|
||||||
|
$(".ClsSelLiq").each(function () {
|
||||||
|
|
||||||
|
totalLiquidacion = totalLiquidacion + ToDouble($(this).val());
|
||||||
|
|
||||||
$(".ClsSelLiquidacion").each(function () {
|
|
||||||
|
|
||||||
let valorString = $(this).val();
|
|
||||||
valorString = valorString.replace(/,/g, '');
|
|
||||||
|
|
||||||
if (valorString.trim().length > 0) {
|
|
||||||
totalLiquidacion = totalLiquidacion + parseFloat(valorString);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".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 ($get('TxtOtrosImportes') != null) {
|
||||||
if (pagoMultiple != 0) {
|
if (pagoMultiple != 0) {
|
||||||
@@ -737,7 +751,6 @@
|
|||||||
else {
|
else {
|
||||||
return Importe + parseFloat(Comision) - totalLiquidacion;
|
return Importe + parseFloat(Comision) - totalLiquidacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Importe - totalLiquidacion
|
return Importe - totalLiquidacion
|
||||||
@@ -914,32 +927,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 Total = 0.0;
|
||||||
|
let Anticipos = 0.0;
|
||||||
|
|
||||||
|
$( ClsSelLiqVenta).each(function () {
|
||||||
|
|
||||||
$( ClsSelLiquidacionVenta).each(function () {
|
Total = Total + ToDouble($(this).val());
|
||||||
|
|
||||||
let valorString = $(this).val();
|
});
|
||||||
valorString = valorString.replace(/,/g, '');
|
$(ClsSelLiqAnticipo).each(function () {
|
||||||
|
|
||||||
if (valorString.trim().length > 0) {
|
Anticipos = Anticipos + ToDouble($(this).val());
|
||||||
Total = Total + parseFloat(valorString);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(ClsSelLiquidacionVentaTotal).each(function () {
|
Total = Total + Anticipos;
|
||||||
|
|
||||||
|
$(ClsSelLiqVentaTotal).each(function () {
|
||||||
$(this).val(Total);
|
$(this).val(Total);
|
||||||
FormatoMoneda2($(this));
|
FormatoMoneda2($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
FormatoMoneda(txt);
|
FormatoMoneda(txt);
|
||||||
|
|
||||||
var Suma = SumaValores(pagoMultiple, monedaPago);
|
var Suma = SumaValores(pagoMultiple, monedaPago);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user