feat(loan): add currency formatting to loan account summary#2590
Conversation
📝 WalkthroughWalkthroughAdded currency-aware display formatting to LoanAccountSummaryScreen by integrating CurrencyFormatter and propagating currencyCode and decimalPlaces into LoanSummaryDataTable; monetary fields and table columns now use formatted output instead of raw toString() values. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt`:
- Around line 291-295: The code currently hard-codes maximumFractionDigits = 2
in CurrencyFormatter calls; update both occurrences in formatCurrency and
formatAmount to use the currency precision from loanWithAssociations.currency
(e.g., use currency?.decimalPlaces or currency.decimalPlaces ?: 0 to match
project null-safety conventions) so the CurrencyFormatter.format(...) passes the
currency-specific decimalPlaces instead of 2.
.../src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt
Show resolved
Hide resolved
|
@coderabbitai Improve the PR title based on: github.com/openMF/mobile-wallet/wiki/Commit-style-guide. Give us just the title. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🌐 Web query: 💡 Result: The openMF/mobile-wallet wiki “Commit style guide” specifies this commit message format:
Source: [1]
|
|
@gurnoorpannu Could you please update the PR title to this: |
sure |
|
Tip For best results, initiate chat on the files or code changes.
|
Fixes - MIFOSAC-639
Before:-


After:-
Please make sure these boxes are checked before submitting your pull request - thanks!
Run the static analysis check
./gradlew checkorci-prepush.shto make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.