fix: correct currency formatting in notification emails#74
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
fix: correct currency formatting in notification emails#74devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
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).
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Order confirmation notification emails display incorrect monetary amounts. A
$149.99order renders as$1.50(or¤1.50on non-US locales).Root cause:
NotificationRenderer.FormatCurrencydivides the amount by 100, assumingOrderPlacedEvent.TotalAmountis in cents. In reality,TotalAmountis adecimalalready representing dollars — the shared contract (Shared.Contracts.Events.OrderPlacedEvent) and the HTTP DTO both transmit dollar values, not cent integers.The explicit
en-USculture also fixes a secondary issue where Linux environments without a US locale rendered the generic currency symbol¤instead of$.Also fixed: All five service
.csprojfiles had brokenProjectReferencepaths toShared.ContractsandShared.Infrastructure— they used..\..\Shared\(resolves tosrc/Services/Shared/) instead of the correct..\..\..\Shared\(resolves tosrc/Shared/), preventing builds.Before / After:
Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/c3de1ff27f2d42e8b4fa96d629e36bc9
Requested by: @sumitshatwara