Add credit card purchase tracking, statement management, and Ledger/Balance integration #200
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nidde/parenting-tool!200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "copilot/add-payment-section-credit-card"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Three gaps in the Credits system: credit cards lacked purchase/statement tracking, credits didn't appear in the Ledger accordion, and credits were missing from Balance calculations.
Credit Card Enhancements
credit_card_purchasestable — recording purchases auto-updatesused_credit; deletion reverses it; interest-free date auto-calculated from configurableinterest_free_dayscredit_card_statementstable — monthly billing cycle tracking with expected/actual payments, interest charged, overdue detection, mark-as-paid flowcredits:credit_limit(enables utilization %),planned_monthly_payment(payoff projections),billing_cycle_day,interest_free_daysCreditService::calculatePayoffProjection()— months to payoff, total interest, handles impossible-payoff detectionLedger Integration
FinanceServicenow aggregatesCreditCardStatementevents alongsideCreditPaymenteventsLedgerServiceprocesses statements into a dedicatedcredit_card_statementsaccordion section with per-card breakdownLedgerApiControllerreturnscredit_card_statementsdata to frontendBalance Integration
BalanceServiceyear/month calculations includeCreditCardStatement::getTotalExpectedForDateRange/getTotalActualForDateRangegetDetailedMonthlyBalance()pushes credit and statement payments as individual expense line itemsFrontend
CreditCardStatements.vue— statement history table, summary cards (balance/paid/interest/utilization), add/mark-paid dialogsCreditCardPurchases.vue— purchase recording, interest-free period display, available creditCreditDialog.vue— 4 new fields for credit card configurationCreditTable.vue— statement and purchase action buttonscreditCardStatementsByMonthstateType of Change
Testing
17 new tests across 4 files:
CreditCardStatementTest(4) — relationships, mark paid, overdue detection, date range totalsCreditCardPurchaseTest(3) — relationships, interest-free status, date range totalsCreditServiceTest(6) — statement CRUD, purchase with balance updates, payoff projectionCreditControllerTest(4) — statement store/mark/delete, purchase store/delete endpointsCode Quality
CI/CD Checks
Additional Notes
3 additive migrations (post-v1.0 compatible). All existing credit tests continue to pass unchanged. CodeQL security scan clean.
Comment
@coderabbitai helpto get the list of available commands and usage tips.