fleetmap-reports 2.0.342 → 2.0.343
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/util/trips.js +3 -1
package/package.json
CHANGED
package/src/util/trips.js
CHANGED
|
@@ -219,7 +219,9 @@ function shouldRecalculate (trip, route) {
|
|
|
219
219
|
function getTripTotalKms (trip, stop, route) {
|
|
220
220
|
// we need to add stop kms to ensure that the total kms for the day, calculated with the odometer difference, will be equal to the sum of kms of all trips
|
|
221
221
|
const stopKms = stop &&
|
|
222
|
-
!route.find(p => p.attributes.putAccumulators
|
|
222
|
+
!route.find(p => p.attributes.putAccumulators
|
|
223
|
+
|| p.protocol === 'startek') //fix ticket 2263
|
|
224
|
+
&& (stop.endOdometer - stop.startOdometer)
|
|
223
225
|
let distance = trip.distance + (stop && stopKms > 0 ? stopKms : 0)
|
|
224
226
|
if (shouldRecalculate(trip, route)) {
|
|
225
227
|
distance = 0
|