Clicking on Submit button changes field values giving an incorrect total calculation