fixed average calculation

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-03-15 17:15:05 -06:00
parent 0bbd3c5491
commit 72427fc19d

View File

@@ -476,7 +476,7 @@ function getRecordsDeltaStats(recordIds) {
var divisibleCount = recordIds.length - 1;
var averageOdo = diffOdo > 0 ? (diffOdo / divisibleCount).toFixed(2) : 0;
var averageDays = diffDate > 0 ? Math.floor((diffDate / divisibleCount) / 8.64e7) : 0;
var averageSum = costSum > 0 ? (costSum / divisibleCount).toFixed(2) : 0;
var averageSum = costSum > 0 ? (costSum / recordIds.length).toFixed(2) : 0;
costSum = costSum.toFixed(2);
Swal.fire({
title: "Record Statistics",