fleetmap-reports 1.0.602 → 1.0.604

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.602",
3
+ "version": "1.0.604",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -5,7 +5,6 @@ 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)
9
8
  it('converts to pdf', async () => {
10
9
  const report = await getReports()
11
10
  const userData = await report.getUserData()
@@ -444,8 +444,8 @@ function exportTripReportToExcel (userData, reportData) {
444
444
  distance: Number(a.totalKms.toFixed(1)),
445
445
  averageSpeed: Math.round(a.averageSpeed * 1.85200),
446
446
  maxSpeed: Math.round(a.maxSpeed * 1.85200),
447
- consumption: a.fuelConsumption.toFixed(1),
448
- avgConsumption: a.avgFuelConsumption.toFixed(1),
447
+ consumption: a.fuelConsumption && a.fuelConsumption.toFixed(1),
448
+ avgConsumption: a.avgFuelConsumption && a.avgFuelConsumption.toFixed(1),
449
449
  subname: userData.byDriver ? a.deviceName : getDriverName(userData.drivers, a.driverUniqueId)
450
450
  }
451
451
  }))