fleetmap-reports 1.0.772 → 1.0.773
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
CHANGED
|
@@ -127,8 +127,8 @@ function getDeviceData (allInOne, d) {
|
|
|
127
127
|
const deviceSummary = allInOne.summary.filter(t => t.deviceId === d.id)
|
|
128
128
|
|
|
129
129
|
const drivingTime = deviceTrips.reduce((a, b) => a + b.duration, 0)
|
|
130
|
-
const drivingConsumption = deviceTrips.
|
|
131
|
-
const drivingDistance = deviceSummary.
|
|
130
|
+
const drivingConsumption = deviceTrips.reduce((a, b) => a + b.spentFuel, 0)
|
|
131
|
+
const drivingDistance = deviceSummary.distance
|
|
132
132
|
const idleTime = deviceSummary.engineHours - drivingTime
|
|
133
133
|
const idleConsumption = deviceSummary.spentFuel - drivingConsumption
|
|
134
134
|
|