- mejora en manejo de TXTTC

This commit is contained in:
2023-10-24 08:45:15 -07:00
parent 4eb757fd31
commit 85cc1bd5fc
2 changed files with 15 additions and 7 deletions

View File

@@ -570,19 +570,21 @@
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
if (t.checked) {
txt.value = FormatoNumero(importe, 2);
} else {
txt.value = "";
}
if (chkPesosBancos) {
if (chkPesosBancos && chkPesosBancos.checked) {
CambiaPesosDolares()
} else if (chkDolaresBancos) {
} else if (chkDolaresBancos && chkDolaresBancos.checked) {
CambiaDolaresPesos()
}
else {
var Suma = SumaValores();
$get('TxtImporte').value = FormatoNumero(Suma, 2);
}
}
function SumaValores(aplicaTC) {
@@ -637,6 +639,8 @@
function FnCambia(chk, txt, saldo, op, text, Tipo) {
debugger;
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
if (op == 1) {
if (txt.value != '') {
chk.checked = true;
@@ -659,8 +663,12 @@
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtOtrosImportes').value * -1)), 2);
}
CambiaPesosDolares()
CambiaDolaresPesos()
if (chkPesosBancos && chkPesosBancos.checked) {
CambiaPesosDolares()
} else if (chkDolaresBancos && chkDolaresBancos.checked) {
CambiaDolaresPesos()
}
}