From 28c91c2d5f244772d791bcca3ed4664c55e64d5d Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 6 Sep 2021 16:32:18 -0700 Subject: [PATCH] =?UTF-8?q?correci=C3=B3n=20titulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contratos/ContratoAvance.aspx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Contratos/ContratoAvance.aspx b/Contratos/ContratoAvance.aspx index f96d770f8..6a421e1a4 100644 --- a/Contratos/ContratoAvance.aspx +++ b/Contratos/ContratoAvance.aspx @@ -93,9 +93,9 @@ - - - + + + @@ -132,7 +132,7 @@ - + <%# Eval("Abreviatura")%> @@ -356,7 +356,7 @@ var cantidad = parseFloat(txtCantidad.val()); - + debugger; if (!Math.round10) { Math.round10 = function (value, exp) { @@ -364,13 +364,14 @@ }; } - if (opcion == 2) { + if (opcion == 2) { //editar importe if (txtimporte.val().toString().length > 0) { var importe = parseFloat(txtimporte.val()); cantidad = parseFloat(importe / pu); txtCantidad.val(cantidad); + txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); }else{ cantidad = 0.0 @@ -379,12 +380,13 @@ } } - if (opcion == 3) { + if (opcion == 3) { //editar porcentaje if (txtPorcentaje.val().toString().length > 0) { var porcentaje = parseFloat(txtPorcentaje.val()); cantidad = (porcentaje * max / 100); txtCantidad.val(cantidad); + txtimporte.val((cantidad * pu).toFixed(2)); } else { cantidad = 0; txtCantidad.val(''); @@ -401,13 +403,13 @@ } - if (cantidad > 0) { - txtimporte.val(cantidad * pu); - txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); - } else { - txtimporte.val(''); - txtPorcentaje.val(''); - } + //if (cantidad > 0) { + // txtimporte.val((cantidad * pu).toFixed(2)); + // txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); + //} else { + // txtimporte.val(''); + // txtPorcentaje.val(''); + //} }