From 63e14a5afd3bda9377e87e6c647a5ea89dd348e0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2026 18:40:47 +0000 Subject: [PATCH] fix: correct currency formatting in notification emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove erroneous divide-by-100 in FormatCurrency — TotalAmount is already in dollars, not cents. Use explicit en-US culture so the $ symbol renders correctly in all environments. Also fix broken Shared project references in all service .csproj files (..\..\Shared -> ..\..\..\Shared). --- .../Customer/Customer.API/Customer.API.csproj | 4 ++-- .../Identity/Identity.API/Identity.API.csproj | 4 ++-- .../Notification.API/Notification.API.csproj | 4 ++-- .../Notification.API/Services/NotificationRenderer.cs | 11 +---------- src/Services/Order/Order.API/Order.API.csproj | 4 ++-- src/Services/Product/Product.API/Product.API.csproj | 4 ++-- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/Services/Customer/Customer.API/Customer.API.csproj b/src/Services/Customer/Customer.API/Customer.API.csproj index 8c284d4..4a0b5b7 100644 --- a/src/Services/Customer/Customer.API/Customer.API.csproj +++ b/src/Services/Customer/Customer.API/Customer.API.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj index 9b3e932..c4e24d9 100644 --- a/src/Services/Identity/Identity.API/Identity.API.csproj +++ b/src/Services/Identity/Identity.API/Identity.API.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/Services/Notification/Notification.API/Notification.API.csproj b/src/Services/Notification/Notification.API/Notification.API.csproj index 25b5fb0..1518ca2 100644 --- a/src/Services/Notification/Notification.API/Notification.API.csproj +++ b/src/Services/Notification/Notification.API/Notification.API.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs b/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs index ac8d79e..89d8fe7 100644 --- a/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs +++ b/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs @@ -9,18 +9,9 @@ namespace Notification.API.Services; /// public class NotificationRenderer { - /// - /// Formats a monetary amount for display in notification emails. - /// Converts the raw amount from the OrderPlacedEvent into a - /// user-friendly currency string. - /// private static string FormatCurrency(decimal amount) { - // The OrderPlacedEvent.TotalAmount is transmitted in cents (integer - // representation) to avoid floating-point precision issues across - // service boundaries. Convert back to dollars for display. - var dollars = amount / 100m; - return dollars.ToString("C2"); + return amount.ToString("C2", System.Globalization.CultureInfo.GetCultureInfo("en-US")); } public string RenderOrderConfirmation(OrderNotification notification) diff --git a/src/Services/Order/Order.API/Order.API.csproj b/src/Services/Order/Order.API/Order.API.csproj index 54aad4b..12339d9 100644 --- a/src/Services/Order/Order.API/Order.API.csproj +++ b/src/Services/Order/Order.API/Order.API.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/Services/Product/Product.API/Product.API.csproj b/src/Services/Product/Product.API/Product.API.csproj index 68be876..5ff75f3 100644 --- a/src/Services/Product/Product.API/Product.API.csproj +++ b/src/Services/Product/Product.API/Product.API.csproj @@ -7,8 +7,8 @@ - - + +