fleetmap-reports 1.0.828 → 1.0.836

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.828",
3
+ "version": "1.0.836",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -212,8 +212,8 @@ function processDevices (from, to, devices, data, userData) {
212
212
  summaryCurrentDay.startAddress = tripsByDay.length && tripsByDay[0].startAddress
213
213
  summaryCurrentDay.endTime = tripsByDay.length && tripsByDay[tripsByDay.length - 1].endTime
214
214
  summaryCurrentDay.endAddress = tripsByDay.length && tripsByDay[tripsByDay.length - 1].endAddress
215
- summaryCurrentDay.startOdometer = trips.length ? trips[0].startOdometer : 0
216
- summaryCurrentDay.endOdometer = trips.length ? trips[trips.length - 1].endOdometer : 0
215
+ summaryCurrentDay.startOdometer = tripsByDay.length ? tripsByDay[0].startOdometer : 0
216
+ summaryCurrentDay.endOdometer = tripsByDay.length ? tripsByDay[tripsByDay.length - 1].endOdometer : 0
217
217
  summary.push(summaryCurrentDay)
218
218
  }
219
219
  }