Un foro de discusión para nuestra comunidad de hispano hablante
#8367
hola
una ayuda por favor,... ya tengo mi funcion en javascrit, y funcion bien. Hace operaciones de multi, sobre una grilla, y este funciona bien,...
pero necesito tambien cada vez se hace una operacion, este a su ves sake un TOTAL, DE ES ESA COLUMNA, con los nuevos resultados,... y a esta funcion, no se como mostrarlo en la grilla, o me aparesca la Sumatoria de esa columna,...


function cambio()
{
var totalC = Number_Rows_Grid("detalle_2g", "cantidad_1g");
var mm = getField("cambio_moneda1").value;
var pp;
var cant;
var unid;
var total=0;


for(var i=1; i<= totalC; i++)
{

pp = getGridField("detalle_2g", i, "moneda_2f").value;
cant= getGridField("detalle_2g", i, "cantidad_1g").value;
unid= getGridField("detalle_2g", i, "precioUnitario").value;

if(pp<3 && pp>0)
{
getGridField("detalle_2g", i, "Totales").value = mm*cant*unid;
total =total + getGridField("detalle_2g", i, "Totales").value,
}else{
getGridField("detalle_2g", i, "Totales").value = cant*unid;
total =total + getGridField("detalle_2g", i, "Totales").value,
}


}
// getField("detalle_2g","moneda_2f") = total; COMO AUMENTAR LA SUMATORIA DE LA COLUMNA
}


getField("detalle_2g","moneda_2f").onclick=cambio;

If you're looking to save big on your next online […]

If you're looking to save big on your next online […]

If you're looking to save big on your next online […]

Use the latest Freecash referral code "FC2507[…]