WEB-657: rename wc loan accounting rule CASH_BASED to ACC_DEF_REV_AM - #3687
Conversation
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Rule code plumbing src/app/core/utils/accounting.ts, src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.ts |
getAccountingRulesForLoans returns ACC_DEF_REV_AM, getAccountRuleName recognizes it, and the working-capital stepper branches on the same rule id. |
Locale labels src/assets/translations/*.json |
Locale translation catalogs add ACC_DEF_REV_AM labels for the accounting catalog. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
- adamsaghy
🚥 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 clearly and accurately summarizes the main change: renaming the working capital loan accounting rule from CASH_BASED to ACC_DEF_REV_AM. |
| 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. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/core/utils/accounting.ts`:
- Around line 41-45: Confirm the working-capital backend rule-code is returned
as ACC_DEF_REV_AM so the frontend switch logic in accounting.ts and the loan
product accounting stepper paths resolve correctly. Check the API response/model
that feeds the product accounting flow and align the backend value with the
existing ACC_DEF_REV_AM constant used in getAccountingRuleCode and related
stepper logic, rather than introducing or relying on CASH_BASED. If the backend
currently emits a different rule-code, update it at the source so the frontend
does not fall through its accounting selection logic.
In `@src/assets/translations/ne-NE.json`:
- Line 478: The Nepali translation for ACC_DEF_REV_AM uses an inconsistent term
for amortization; update the wording in the translation entry to use the
established term from the same file, matching the Amortization and Amortization
Schedule keys. Keep the rest of the phrase intact and replace the incorrect
"खम्बीकरण" wording with the consistent "परिशोधन" terminology so the translation
stays aligned across ne-NE.json.
🪄 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: cd09d9b9-3dd7-481f-a77d-82311903f4da
📒 Files selected for processing (15)
src/app/core/utils/accounting.tssrc/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.tssrc/assets/translations/cs-CS.jsonsrc/assets/translations/de-DE.jsonsrc/assets/translations/en-US.jsonsrc/assets/translations/es-CL.jsonsrc/assets/translations/es-MX.jsonsrc/assets/translations/fr-FR.jsonsrc/assets/translations/it-IT.jsonsrc/assets/translations/ko-KO.jsonsrc/assets/translations/lt-LT.jsonsrc/assets/translations/lv-LV.jsonsrc/assets/translations/ne-NE.jsonsrc/assets/translations/pt-PT.jsonsrc/assets/translations/sw-SW.json
6a6fed5 to
5bd8061
Compare
Description
Originally WC loans were created with a cash based accounting scheme in mind. But that does not accurately reflect the current model. Which is closer to an accrual based accounting. So the new name of this accounting will be "Accrual with deferred revenue amortization".
Related issues and discussion
#{WEB-657}
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
New Features
Bug Fixes