RESULTA QUE PEDI AYUDA AQUI Y ME RESULTO PERO QUEDE ESTANCADO PARA SACAR EL IVA ES UN SCRIPT DE JAVA SI ALGUIEN ME PUDIESE AGREGAR EL IVA PORFA
SERIA EL NETO X 0.19
ESTA TODO BIEN SOLO QUE AL FINAL INTENTE SACARLO MULTIPLICANDO TODA LA SUMA POR 0,19 Y EL NUMERO ME APARECE ROJO. TAMBIEN LO INTENTE PONIENDO EL 0,19 COMO VARIABLE Y TAMPOCO ME SALIO. IGUAL DEBE SER SIMPLE. DIGO ESTO PQ NO SOY DE LOS QUE HACE TODO FACIL PRIMERO ME LA JUEGO.
Y NO SE MUCHO DE JAVA POR NO DECIR NADA
AHI VA EL SCRIPT
Código :
<script language="javascript">
function suma()
{
var num1 = eval(document.getElementById("x_Cantidad_1").value);
if(num1==undefined) num1 = 0;
var num2 = eval(document.getElementById("x_Unitario_1").value);
if(num2==undefined) num2 = 0;
document.getElementById("x_Total_1").value = num1 * num2;
var num3 = eval(document.getElementById("x_Cantidad_2").value);
if(num3==undefined) num3 = 0;
var num4 = eval(document.getElementById("x_Unitario_2").value);
if(num4==undefined) num4 = 0;
document.getElementById("x_Total_2").value = num3 * num4;
var num5 = eval(document.getElementById("x_Cantidad_3").value);
if(num5==undefined) num5 = 0;
var num6 = eval(document.getElementById("x_Unitario_3").value);
if(num6==undefined) num6 = 0;
document.getElementById("x_Total_3").value = num5 * num6;
var num7 = eval(document.getElementById("x_Cantidad_4").value);
if(num7==undefined) num7 = 0;
var num8 = eval(document.getElementById("x_Unitario_4").value);
if(num8==undefined) num8 = 0;
document.getElementById("x_Total_4").value = num7 * num8;
var num9 = eval(document.getElementById("x_Cantidad_5").value);
if(num9==undefined) num9 = 0;
var num10 = eval(document.getElementById("x_Unitario_5").value);
if(num10==undefined) num10 = 0;
document.getElementById("x_Total_5").value = num9 * num10;
var num11 = eval(document.getElementById("x_Cantidad_6").value);
if(num11==undefined) num11 = 0;
var num12 = eval(document.getElementById("x_Unitario_6").value);
if(num12==undefined) num12 = 0;
document.getElementById("x_Total_6").value = num11 * num12;
var num13 = eval(document.getElementById("x_Cantidad_7").value);
if(num13==undefined) num13 = 0;
var num14 = eval(document.getElementById("x_Unitario_7").value);
if(num14==undefined) num14 = 0;
document.getElementById("x_Total_7").value = num13 * num14;
var num15 = eval(document.getElementById("x_Cantidad_8").value);
if(num15==undefined) num15 = 0;
var num16 = eval(document.getElementById("x_Unitario_8").value);
if(num16==undefined) num16 = 0;
document.getElementById("x_Total_8").value = num15 * num16;
var num17 = eval(document.getElementById("x_Cantidad_9").value);
if(num17==undefined) num17 = 0;
var num18 = eval(document.getElementById("x_Unitario_9").value);
if(num18==undefined) num18 = 0;
document.getElementById("x_Total_9").value = num17 * num18;
var num19 = eval(document.getElementById("x_Cantidad_10").value);
if(num19==undefined) num19 = 0;
var num20 = eval(document.getElementById("x_Unitario_10").value);
if(num20==undefined) num20 = 0;
document.getElementById("x_Total_10").value = num19 * num20;
var num21 = eval(document.getElementById("x_Neto").value);
if(num21==undefined) num21 = 0;
document.getElementById("x_Neto").value = num1 * num2 + num3 * num4 + num5 * num6 + num7 * num8 + num9 * num10 + num11 * num12 + num13 * num14 + num15 * num16 + num17 * num18 + num19 * num20 ;
}
</script>
EL IVA ES 19% Y EL ID ES id="x_Iva"
GRACIAS !!!!!!
