Corrección Proveedores Abonar Descuentos
This commit is contained in:
@@ -346,11 +346,13 @@
|
||||
<td style="text-align: right; width: 25%">
|
||||
<asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" Checked="true" />
|
||||
</td>
|
||||
<td style="text-align: left; width: 30%">
|
||||
<td style="text-align: left; width: 45%">
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -723,7 +725,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar) {
|
||||
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar, chk,Text,Tipo) {
|
||||
|
||||
let idTxtDescuento = TxtDescuento.id
|
||||
let idTxtAbonar = TxtAbonar.id
|
||||
@@ -738,17 +740,20 @@
|
||||
|
||||
if (isNaN(parseFloat(descuentoParts[0])) || descuentoParts[0] == "0") {
|
||||
$("#" + idTxtAbonar).val(saldo.toFixed(2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
|
||||
} else {
|
||||
let descuento = saldo * (parseFloat(descuentoParts[0]) / 100);
|
||||
abonarConDescuento = saldo - descuento;
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento.toFixed(2),2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
}
|
||||
|
||||
} else if (descuentoParts.length === 2) {
|
||||
|
||||
if (isNaN(parseFloat(descuentoParts[0]))) {
|
||||
$("#" + idTxtAbonar).val("");
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -759,7 +764,7 @@
|
||||
let descuento = saldo * (parseFloat(descuentoParts[0]) / 100);
|
||||
abonarConDescuento = saldo - descuento;
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento.toFixed(2), 2));
|
||||
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -769,10 +774,12 @@
|
||||
let abonarConDescuento2 = abonarConDescuento - (abonarConDescuento * (parseFloat(descuentoParts[1]) / 100));
|
||||
|
||||
$("#" + idTxtAbonar).val(FormatoNumero(abonarConDescuento2.toFixed(2), 2));
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
|
||||
|
||||
} else {
|
||||
$("#" + idTxtAbonar).val("");
|
||||
FnCambia(chk, TxtAbonar, saldo, 1, Text, Tipo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user