FINERACT-2455: Working Capital Loan - Write-Off - #6223
Conversation
875df73 to
73e7c91
Compare
6152194 to
246c7ad
Compare
galovics
left a comment
There was a problem hiding this comment.
Migration and permission wiring are solid, WorkingCapitalLoanWriteOffDomainService is clean. One real gap:
// TODO(D3): confirm the backdating rule. The ticket says "not supporting backdated transactions"; progressive
// loans allow a floor at the last user transaction date. Add the agreed date constraint here once confirmed.The validator only checks "not null" and "not in the future" for the write-off date - the actual backdating restriction the ticket calls for is admittedly unresolved and unimplemented. As it stands, a write-off can be backdated to any past date (before other transactions, before disbursement, whatever), and the write-off domain service doesn't guard against it either (zeroes outstanding unconditionally). For a terminal, balance-zeroing operation this seems worth nailing down before merge rather than after - self-acknowledged TODOs on the actual validation rule the PR is supposed to implement are the kind of thing I'd want resolved, not shipped.
71fab18 to
e6282ca
Compare
e6282ca to
d4e7c38
Compare
Description
Adds Write-Off and Undo Write-Off for Working Capital Loans, matching cumulative/progressive loans.
Write-off is terminal: zeroes outstanding balances and closes the loan as
CLOSED_WRITTEN_OFF; undo reopens it toACTIVEand restores the balance. Incoming parameters follow progressive loans.Accounting (accrual):
Dr LOSSES_WRITTEN_OFF(total) ·Cr LOAN_PORTFOLIO/FEES_RECEIVABLE/PENALTIES_RECEIVABLEper portion (no interest leg). Undo reverses via offsetting mirrors.Includes: domain/state machine + dedicated write-off domain service, transaction/handlers/API/validator wiring, accounting
WRITEOFFcase, business events, DB migration0063(0062reserved for the in-review Charge-Off PR), integration + E2E tests, and afineract-docchapter.FINERACT-2455
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.