Hi,
want to create an order and this order should have some itens. I created a table order and order_details using master_details relationship, so I add an order and then add details (itens) one by one. But I want to display unit price, total price (as the price may vary) and change values when the user changes the product selected.
I am using javascript onload events but I can not calculate total price when checking product by its name:
function compare() {
if (parseFloat(ctrlProd.getValue()) == 'Produto') {
ctrlTotal.setValue(parseFloat(ctrlPrice.getValue()));
} else{
ctrlTotal.setValue(parseFloat(ctrlPrice.getValue()) + parseFloat(ctrlPrice.getValue())((parseFloat(ctrlQuantity.getValue()))-1)0.6);
}
}
I dont know why this code doesnt work.
Regards
Anselmo