aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java2
-rw-r--r--src/org/traccar/reports/ReportUtils.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java
index eae2681c9..0f723a5e1 100644
--- a/src/org/traccar/notification/NotificationFormatter.java
+++ b/src/org/traccar/notification/NotificationFormatter.java
@@ -24,6 +24,7 @@ import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.tools.generic.DateTool;
+import org.apache.velocity.tools.generic.NumberTool;
import org.traccar.Context;
import org.traccar.helper.Log;
import org.traccar.model.Device;
@@ -51,6 +52,7 @@ public final class NotificationFormatter {
}
velocityContext.put("webUrl", Context.getVelocityEngine().getProperty("web.url"));
velocityContext.put("dateTool", new DateTool());
+ velocityContext.put("numberTool", new NumberTool());
velocityContext.put("timezone", ReportUtils.getTimezone(userId));
velocityContext.put("locale", Locale.getDefault());
return velocityContext;
diff --git a/src/org/traccar/reports/ReportUtils.java b/src/org/traccar/reports/ReportUtils.java
index e2a743b2f..02e3764bc 100644
--- a/src/org/traccar/reports/ReportUtils.java
+++ b/src/org/traccar/reports/ReportUtils.java
@@ -17,6 +17,7 @@
package org.traccar.reports;
import org.apache.velocity.tools.generic.DateTool;
+import org.apache.velocity.tools.generic.NumberTool;
import org.jxls.area.Area;
import org.jxls.builder.xls.XlsCommentAreaBuilder;
import org.jxls.common.CellRef;
@@ -115,6 +116,7 @@ public final class ReportUtils {
jxlsContext.putVar("speedUnit", getSpeedUnit(userId));
jxlsContext.putVar("webUrl", Context.getVelocityEngine().getProperty("web.url"));
jxlsContext.putVar("dateTool", new DateTool());
+ jxlsContext.putVar("numberTool", new NumberTool());
jxlsContext.putVar("timezone", getTimezone(userId));
jxlsContext.putVar("locale", Locale.getDefault());
jxlsContext.putVar("bracketsRegex", "[\\{\\}\"]");