Skip to content

fix(backend): correct amortization schedule and total due interest ca… - #1575

Open
extolkom wants to merge 1 commit into
LabsCrypt:mainfrom
extolkom:fix/1371-amortization-total-due
Open

fix(backend): correct amortization schedule and total due interest ca…#1575
extolkom wants to merge 1 commit into
LabsCrypt:mainfrom
extolkom:fix/1371-amortization-total-due

Conversation

@extolkom

Copy link
Copy Markdown

closes #1371

Fixes #1371 — amortization total due was understated by all interest.

  • backend/src/controllers/loanController.ts: fixed getLoanDetails totalOwed to principal + accruedInterest - totalRepaid, and ensured buildAmortizationSchedule returns totalDue = principal + totalInterest
  • backend/src/__tests__/loanEndpoints.test.ts: added regression assertions for totalOwed and amortization totalDue

Verification: npm run typecheck ✅, npm test ✅, npm run build ✅.

…lculation (LabsCrypt#1371)

Ensure total due and total owed include accrued interest instead of subtracting it in backend/src/controllers/loanController.ts (buildAmortizationSchedule & getLoanDetails).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Amortization total due is understated by all interest

1 participant