fleetmap-reports 1.0.326 → 1.0.327
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/kms-report.js +9 -4
package/package.json
CHANGED
package/src/kms-report.js
CHANGED
|
@@ -411,10 +411,15 @@ function exportKmsReportToExcel(userData, reportData) {
|
|
|
411
411
|
}
|
|
412
412
|
})
|
|
413
413
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
414
|
+
// add total
|
|
415
|
+
if (data.length) {
|
|
416
|
+
data = data.concat({
|
|
417
|
+
name: '',
|
|
418
|
+
group: '',
|
|
419
|
+
licenseplate: 'Total',
|
|
420
|
+
distance: data.reduce((prev, curr) => curr.distance ? {distance: (prev.distance || 0) + curr.distance} : prev).distance
|
|
421
|
+
})
|
|
422
|
+
}
|
|
418
423
|
|
|
419
424
|
return {
|
|
420
425
|
headers,
|