Calculate and save the value of the orders