Bug #3039
For multiple destination trips, the kilometer calculation is wrong.
100%
Description
For multiple destination trips, the kilometer calculation is wrong. starting and ending positions are only considered for the final amount calculation. actually want to consider the whole travel distance for amount calculation.
STR.
1. Open the rider app.
2. Request a round trip.
3. Accept and complete the trip.
4. Check the fare amount.
ER.
4. Amount should be calculated based on the total distance traveled.
AR
4. Only consider the distance between the start and end point.
Files
Impact Analysis
Google direction api is calling to get the distance when ending the trip everytime and comparing the trip distance with the distance returned by direction api call. Changed the direction api call to add multiple destinations as waypoints, if the trip has multiple destinations then the location is passing to the direction api call and calculating the distance include of the multiple destinations.