Implement daily allowance calculation #22

Open
opened 2026-10-30 21:00:55 -06:00 by west · 0 comments
Owner

📋 Compute the base daily allowance from recurring income and expense sources.

🎯 Acceptance Criteria:

  • Sum all recurring income for the current period
  • Sum all recurring expenses for the current period
  • dailyAllowance = (totalIncome - totalExpenses) / daysInPeriod
  • Handles all frequency types: daily, weekly, biweekly, monthly, custom
  • Custom frequencies (e.g., "1st and 15th") correctly prorate
  • Returns a Decimal (not Float) for financial precision
  • Unit tested with edge cases (no recurring items, all income, all expenses)

📝 Notes: This is the foundation of the waterline. Use Swift Decimal for all monetary calculations.

📋 **Compute the base daily allowance from recurring income and expense sources.** 🎯 **Acceptance Criteria:** - [ ] Sum all recurring income for the current period - [ ] Sum all recurring expenses for the current period - [ ] dailyAllowance = (totalIncome - totalExpenses) / daysInPeriod - [ ] Handles all frequency types: daily, weekly, biweekly, monthly, custom - [ ] Custom frequencies (e.g., "1st and 15th") correctly prorate - [ ] Returns a Decimal (not Float) for financial precision - [ ] Unit tested with edge cases (no recurring items, all income, all expenses) 📝 **Notes:** This is the foundation of the waterline. Use Swift Decimal for all monetary calculations.
Sign in to join this conversation.
No description provided.