From c3506a071251510656393005bcadd7d16058b25b Mon Sep 17 00:00:00 2001 From: Robert van Dijk Date: Sat, 27 Jul 2024 16:18:11 +0200 Subject: [PATCH] Add Locale to String.format such that it always uses a decimal point and not a comma This ensures all tests also run locally --- .../admin/controller/DashboardSalesExportController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/wisv/events/admin/controller/DashboardSalesExportController.java b/src/main/java/ch/wisv/events/admin/controller/DashboardSalesExportController.java index af9804fc..515110df 100644 --- a/src/main/java/ch/wisv/events/admin/controller/DashboardSalesExportController.java +++ b/src/main/java/ch/wisv/events/admin/controller/DashboardSalesExportController.java @@ -159,10 +159,10 @@ public static String generateCsvContent(Map map) { csvContent.append(entry.getValue().eventTitle) .append(";").append(entry.getValue().organizedBy) // organized by .append(";").append(entry.getValue().productTitle) // product title - .append(";").append(String.format("%.2f", entry.getValue().totalIncome)) // total income + .append(";").append(String.format(Locale.US, "%.2f", entry.getValue().totalIncome)) // total income .append(";").append(entry.getValue().totalAmount) // total amount .append(";").append(entry.getValue().vatRate) // vat rate - .append(";").append(String.format("%.2f", entry.getValue().price)).append("\n"); // price + .append(";").append(String.format(Locale.US, "%.2f", entry.getValue().price)).append("\n"); // price } return csvContent.toString(); }