From 37ab31ea722624f0e55c3df417424f3dc9981054 Mon Sep 17 00:00:00 2001 From: danielochinasa Date: Thu, 23 Oct 2025 16:58:14 +0100 Subject: [PATCH] Task/format value in Buying Power rule (#5824) * Format value in Buying Power rule * Update changelog --- CHANGELOG.md | 1 + apps/api/src/models/rules/liquidity/buying-power.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 285e8917a..70dc9ae17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Localized the number formatting in the static portfolio analysis rule: _Liquidity_ (Buying Power) - Upgraded `prisma` from version `6.17.1` to `6.18.0` ## 2.210.1 - 2025-10-22 diff --git a/apps/api/src/models/rules/liquidity/buying-power.ts b/apps/api/src/models/rules/liquidity/buying-power.ts index 70393278d..2cd4d6fee 100644 --- a/apps/api/src/models/rules/liquidity/buying-power.ts +++ b/apps/api/src/models/rules/liquidity/buying-power.ts @@ -40,7 +40,9 @@ export class BuyingPower extends Rule { languageCode: this.getLanguageCode(), placeholders: { baseCurrency: ruleSettings.baseCurrency, - thresholdMin: ruleSettings.thresholdMin + thresholdMin: ruleSettings.thresholdMin.toLocaleString( + ruleSettings.locale + ) } }), value: false @@ -53,7 +55,9 @@ export class BuyingPower extends Rule { languageCode: this.getLanguageCode(), placeholders: { baseCurrency: ruleSettings.baseCurrency, - thresholdMin: ruleSettings.thresholdMin + thresholdMin: ruleSettings.thresholdMin.toLocaleString( + ruleSettings.locale + ) } }), value: true