fleetmap-reports 1.0.597 → 1.0.598

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.597",
3
+ "version": "1.0.598",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ const utils = require('../util/utils')
5
5
 
6
6
  // eslint-disable-next-line no-undef
7
7
  describe('Test_Reports', function () {
8
+ this.timeout(5000000)
8
9
  it('converts to pdf', async () => {
9
10
  const report = await getReports()
10
11
  const userData = await report.getUserData()
@@ -172,8 +172,8 @@ function processDevices (from, to, devices, data, userData, traccar) {
172
172
  const stop = getStop(new Date(trip.startTime), stops)
173
173
 
174
174
  if (stop && !trip.endTimeIsOut) {
175
- trip.stopDuration = (new Date(stop.endTime) - new Date(stop.startTime))
176
- trip.stopEngineHours = trip.idleTime + stop.idleTime
175
+ trip.stopDuration = ((new Date(stop.endTime) - new Date(stop.startTime)) - stop.engineHours)
176
+ trip.stopEngineHours = trip.idleTime + stop.engineHours
177
177
  } else {
178
178
  trip.stopDuration = 0
179
179
  trip.stopEngineHours = 0