Calculating Grand total from subform subtotals

Calculating Grand total from subform subtotals

Hi, 

Ive created a form that calculates the grand total. This grand total adds the values for each new row in a subform.

Here is the code ive been using 

Quantity_Ordered on user input:

row.Subtotal1=(row.Quantity_Ordered  *  row.Unit_Price);
Total_Due=0.0;
for each item in Items_Ordered
{
Total_Due=(input.Total_Due  +  item.Subtotal1);
}

I keep getting an error message
Error details:
Error in executing On User Input script of the field, Quantity Ordered
         Error
Error in executing For Each Record task.
Error in executing Set Variable task. Unable to update template variable Total_Due.
Error evaluating NUMERIC expression : Unable to perform the operation + over the operand 8,555 and null.
Error in performing the operation + : Error.
Accessing the value item.{1}.


Please help me figure this out as it was working fine a few hours ago and i have not changed or altered any of the fields the script is calling. 

Thank YOU!

-Cory R