feat: implement EMI (Equated Monthly Installment) management feature … - #745
feat: implement EMI (Equated Monthly Installment) management feature …#745OnoPUNPUN wants to merge 1 commit into
Conversation
…with full service, entity, and UI support
|
Thanks for the work here. I've reviewed it, and I'm going to close this one — not because of fixable details, but because I'm not convinced Flow needs an EMI feature at all in this shape. Reasoning below so it's not a black box. LogicAs implemented, this isn't much different from a recurring transaction, which Flow already does. A fixed amount on a fixed interval for a fixed duration is a recurring transaction with an end date — wrapping that in a new entity doesn't earn its place. If EMI is going to exist as its own thing, it has to tell me something recurring transactions can't. Real life EMI includes interest, so the flow should ask for the total payment and the interval/number of installments (like every month at the 7th), derive the schedule, and then surface what I actually want to know: how much of this am I paying in interest? What's the remaining principal? What does this loan cost me in total? That's the part with real potential — it's what would make BNPL or leasing worth modeling. Right now none of it is there. UIIt's a separate page. That can work for something used rarely, but entering duration, number of installments, and per-installment amount as three flat fields isn't a flow — it's a form. The new UI also doesn't follow how other pages render lists or "add" buttons, so it reads as bolted on. DeletingDeleting an EMI should remove all EMI-tagged transactions, or at least offer that option. Without it, the feature doesn't save meaningful work over entering the transactions manually — and manual entry has the advantage of reflecting what I actually paid. ConclusionTo be clear about where this stands: I'm not looking to pursue EMI right now, so this isn't a "revise and resubmit." Even a version that added interest calculations and insights would need design discussion first, and I'd rather not have you spend time on a rework I can't commit to merging. Thank you for trying to make Flow better. The branch is genuinely useful as-is for your own build, and I'd encourage you to keep running it. |
EMI (Equated Monthly Installment) Tracking
This PR introduces EMI (Equated Monthly Installment) Tracking to allow users to create, manage, and track installment-based payments such as loans, device financing, and vehicle purchases within Flow.
Overview
The feature provides a dedicated EMI tracking system that integrates with Flow's existing transaction architecture. Users can monitor payment progress, track remaining balances, and automatically generate expense transactions when installments are paid.
Feature Workflow
Adding an EMI Tracker
A new EMI Tracker entry is available under the Profile section.
Users can create an EMI by providing:
Upon creation, a dedicated
Emitracking record is stored.Tracking Progress
The EMI List screen displays all trackers.
Features include:
Paying Installments
The EMI Details page provides a Pay Installment action.
When an installment is paid:
paidInstallmentsis incrementedremainingInstallmentsis decrementedpaidAmountis increasedremainingAmountis reducednextDueDateis advanced by one monthGenerated transactions are linked to the selected account and category.
To maintain the relationship between the transaction and the EMI tracker, transactions are associated using the
EmiExtensionmapping key:@flow/emi-referenceThese transactions behave exactly like normal expense transactions and are automatically included in:
Payment History
The EMI Details page includes a payment history timeline.
Features include:
Completion Logic
An EMI is marked as completed when:
paidInstallments == totalInstallmentsor
remainingAmount <= 0Once completed:
completednextDueDateis clearedEditing and Deletion
Editing allows modification of:
To preserve tracking integrity, payment-related values cannot be manually modified.
Deleting an EMI tracker removes only the tracking record.
Previously generated transactions remain intact and are not deleted.
Implementation Details
Entities and Schema
Added:
lib/entity/emi.dartlib/entity/transaction/extensions/default/emi.dartRegistered
EmiExtensioninsideExtensionsWrapper.Services
Added:
lib/services/emi.dartEmiServiceencapsulates:Routing and Navigation
Added routes in:
lib/routes.dartIntegrated entry point into:
ProfileTabUI
Added:
EMI List Page
EMI Edit Page
EMI Detail Page
Localization
Added EMI-related localization keys to:
en.jsonSynchronized localization keys across all supported language files to maintain translation integrity.
Scope Included
Scope Excluded