I found this:

- here you forget brackets {} !! about line 150
(without it upgradeCost=0)
- and Calculations for Trip report must be before you print it with displayTripReport()
so...