My condition to calculate a total based on selection is not working