Correcion BDH

This commit is contained in:
2020-10-16 12:12:33 -07:00
parent fa5d2042e2
commit d7d0dd0dcd
6 changed files with 436 additions and 276 deletions

View File

@@ -7182,6 +7182,38 @@
}
}
function CalculaSaldoRNCBonChk(TxtImporte, Saldo, Chk) {
if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = "";
}
}
function LimitaSaldoRNCBonChk(TxtImporte, Saldo) {
var Importe = 0;
if (TxtImporte.value.includes('.')) {
return;
}
if (TxtImporte.value.includes(',')) {
return;
}
var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$");
if (regex.test(TxtImporte.value)) {
if (TxtImporte.value != '') {
Importe = parseFloat(TxtImporte.value);
}
if (Importe > Saldo) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = FormatoNumero(Importe, 2);;
}
}
}
function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) {
var Importe = 0, ImporteSinPorcentaje = 0;
Importe = ($('#C_DdlNCNivelImporte').val() == "1" ? Total : SubTotal);
@@ -7629,7 +7661,7 @@
$get("TxtCambio").value = "0.00";
}
$get("TxtImporteContado").value = total;
$get("TxtImporteContado").value = total - totalRNC;
}
// ****************************************************************************************************************************************************************************