Repository navigation
feat(loans): add charge refund flow - #632
Conversation
E2E — mocked backend🎭 E2E Tests✅ All green — 386 passed · 0 failed · 1 skipped, across 36 spec files in 5m 29s. By spec file
All 387 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 36441978808 from |
E2E — real Fineract🎭 E2E Tests✅ All green — 91 passed · 0 failed · 0 skipped, across 29 spec files in 5m 46s. By spec file
All 91 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 36441978808 from |
|
@wellkilo Please rebase and add videos and screenshot |
Offer Charge Refund for collected non-installment fees, including remaining-balance calculation after prior refunds, command-specific route permission handling, and Fineract business-date semantics. Add focused unit coverage plus a recorded mocked-browser flow with screenshots. Refs apache#506
3ee3ad3 to
0492062
Compare
|
Rebased onto the latest While rebasing, I also reconciled the overlapping loan changes from the recently merged contract-termination and chargeback work, then tightened this flow in four places:
Evidence added: The recorded mocked-browser test passes, as do the full unit suite (260 files / 1647 tests), lint, E2E type-check, formatting, API-surface checks, and the production build. The new rebased commit is GitHub-verified. |
What and why
Completes the remaining Charge Refund half of #506. Refund by Cash already landed in
700bd855; this adds the charge-level correction that was still unreachable from the UI.The loan Actions menu now offers Charge Refund when Fineract's status rules permit it and the loan has at least one collected, non-installment charge. The shared transaction form then:
loanChargeId,transactionAmount,paymentTypeId, and an optional note under thechargeRefundcommand;chargeRefund.Installment fees are deliberately excluded for now. Fineract additionally requires
installmentNumberordueDatefor those charges, which is a separate selector and deserves its own change.Review follow-up
main(d563a97c) and retained the independently added contract-termination and chargeback flows while resolving the overlapping loan component changes.CHARGEREFUND_LOANare not incorrectly blocked by the genericUPDATE_LOANroute guard.Verification
npm test -- --watch=false— 260 test files, 1647 tests passednpm run build— passed; the pre-existingheader.component.tsstylesheet budget warning remainsnpm run lint— passednpm run typecheck:e2e— passednpm run i18n:check— passednpm run check:icons— passednpm run check:a11y-names— passednpm run format:check— passednpm run api:surface— passed04920626is signed and GitHub reports it as VerifiedThe browser evidence below uses synthetic mocked data only and contains no customer data or PII.
Screenshots and video
Charge Refund action
Charge Refund form
Recorded flow
Watch the Charge Refund end-to-end flow (WebM)
AI assistance (optional)
AGENTS.md, source-backed Fineract contract review, local unit/lint/build checks, and a recorded mocked Playwright flowChecklist
src/app/api/.src/app/core/adapters/instead of direct browser globals or imperative third-party APIs.