--Cambios PV Cobranza
This commit is contained in:
@@ -1539,8 +1539,6 @@
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
|
||||
// $get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
|
||||
}
|
||||
|
||||
function FnSumaValoresAnt() {
|
||||
@@ -1589,7 +1587,12 @@
|
||||
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||
|
||||
} else {
|
||||
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||
if (cambio == 'NaN') {
|
||||
$get("TxtFaltante").value = "0.00";
|
||||
} else {
|
||||
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||
}
|
||||
|
||||
$get("ChkSobFaltante").checked = true;
|
||||
$get("TxtCambio").value = "";
|
||||
}
|
||||
@@ -1618,8 +1621,15 @@
|
||||
}
|
||||
|
||||
function ValidaSobranteFaltante() {
|
||||
if (ToDouble($get("TxtFaltante").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1");
|
||||
|
||||
let sobFaltantePermitido = 1;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
sobFaltantePermitido = 10;
|
||||
}
|
||||
|
||||
if (ToDouble($get("TxtFaltante").value) > sobFaltantePermitido) {
|
||||
alert("El sobrante/faltante no debe ser mayor a " + sobFaltantePermitido);
|
||||
$get("TxtFaltante").value = "";
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
} else {
|
||||
@@ -1630,11 +1640,20 @@
|
||||
function CargaSobranteFaltante() {
|
||||
$('#ChkSobFaltante').change(function () {
|
||||
if (this.checked == true) {
|
||||
if (ToDouble($get("TxtCambio").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1")
|
||||
let sobFaltantePermitido = 1;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
sobFaltantePermitido = 10;
|
||||
}
|
||||
if (ToDouble($get("TxtCambio").value) > sobFaltantePermitido) {
|
||||
alert("El sobrante/faltante no debe ser mayor a " + sobFaltantePermitido)
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
} else {
|
||||
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||
if ($get("TxtCambio").value == 'NaN') {
|
||||
$get("TxtFaltante").value = "0.00";
|
||||
} else {
|
||||
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user