Form Calculation: Why the quantity changes when you click on the submit button?