Fix: Make "Apply Annual Fees" currency-agnostic for non-INR deployments#3552
Fix: Make "Apply Annual Fees" currency-agnostic for non-INR deployments#3552Manishnemade12 wants to merge 1 commit into
Conversation
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Dialog response guard pattern src/app/clients/clients-view/clients-view.component.ts, src/app/loans/loans-view/loans-view.component.ts, src/app/savings/savings-account-view/savings-account-view.component.ts |
Dialog afterClosed() handlers return early when response is falsy across client (delete/unassign/view/delete signature), loan (recoverFromGuarantor, undoLoanAction, deleteLoanAccount), and savings (delete, calculate/post interest, enable/disable withhold tax, unblock) flows. |
Annual fee charge identification by type ID src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.ts, src/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.ts, src/app/savings/savings-account-view/savings-account-view.component.ts, src/app/shares/shares-account-view/shares-account-view.component.ts |
“Apply Annual Fees” option and applyCharge() now detect annual-fee charges using charge.chargeTimeType?.id === 7 instead of matching charge.name === 'Annual fee - INR'. Button text typo corrected to Apply Annual Fees. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
- IOhacker
- alberto-art3ch
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title directly addresses the main objective: replacing hardcoded currency-specific charge name matching with a currency-agnostic check using charge type IDs across multiple modules. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Tip
💬 Introducing Slack Agent: The best way for teams to turn conversations into code.
Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
- Generate code and open pull requests
- Plan features and break down work
- Investigate incidents and troubleshoot customer tickets together
- Automate recurring tasks and respond to alerts with triggers
- Summarize progress and report instantly
Built for teams:
- Shared memory across your entire org—no repeating context
- Per-thread sandboxes to safely plan and execute work
- Governance built-in—scoped access, auditability, and budget controls
One agent for your entire SDLC. Right inside Slack.
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 @coderabbitai help to get the list of available commands and usage tips.
|
Please open a jira ticket, squash and commit |
|
Hi @Manishnemade12, kindly open a Jira ticket as part of the contribution process. Also, the PR currently has 2 commits — please squash them into a single commit (will fix the Single Commit Check). Thanks! Jira board reference - here |
Thanks for reference. I will do it as soon as possible. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/shares/shares-account-view/shares-account-view.component.ts`:
- Line 123: Update the button label string in shares-account-view.component (the
object property where name: 'Apply Anuual Fees') to correct the typo to 'Apply
Annual Fees'; locate the occurrences of the name property in
shares-account-view.component.ts (e.g., the button/config object that currently
reads 'Apply Anuual Fees') and replace "Anuual" with "Annual" so the UI displays
the correct label.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b26f9684-16e1-484b-a40e-bba6283ec8cb
📒 Files selected for processing (6)
src/app/clients/clients-view/clients-view.component.tssrc/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-account-view.component.tssrc/app/loans/loans-view/loans-view.component.tssrc/app/savings/saving-account-actions/apply-annual-fees-savings-account/apply-annual-fees-savings-account.component.tssrc/app/savings/savings-account-view/savings-account-view.component.tssrc/app/shares/shares-account-view/shares-account-view.component.ts
|
@IOhacker @Flashl3opard done i created issue for this pr on jira |
…e charges by chargeTimeType ID Also: update shares account view component (squashed changes from two commits)
|
@IOhacker done i fixed typo |
Description
This PR fixes a critical internationalization (i18n) bug where the "Apply Annual Fees" menu option was completely hidden for any Fineract deployment not using the exact
<charge-name> - INRconvention (such as non-Rupee currencies like USD, EUR, KES, NGN, or localized charge names).Five occurrences across the Savings, Shares, and Recurring Deposits modules were hardcoded to check
charge.name === 'Annual fee - INR'. This string-matching brittle detection model was replaced with the stable, currency-agnostic Fineract API checkcharge.chargeTimeType?.id === 7. This conforms to Apache Fineract's global charge type enumeration for Annual Fees, ensuring the feature works accurately regardless of location, language, or currency.Screenshots, if any
(Not applicable, business logic fix enabling hidden dropdown options for localized currencies)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit