I am working in a purchase order form with the following structure.
I wrote this code in the subform_quantity on user input section.
if (row.cost_plus_IVA != null)
{
row.final_cost = (row.cost_plus_IVA * row.quantity);
}
tot = 0.0;
for each row in subform
{
tot = (tot + row.cost_plus_IVA * row.quantity);
}
input.total_order_cost = tot;
I do not know what the problem is. It works perfect with the first row, all values are fetched properly, all the operations are done properly and the total order cost is shown. But when I want to add a second row It fails and I get this message "Invalid value found fieldName: total_order_cost".
How can I fix this?
Any help will be very very appreciated.