Skip to content

fix : Revenue Breakdown: Deduct Business Expenses for Correct Tax Estimate and Safe-to-Spend #339#361

Open
jenilbanavani wants to merge 6 commits into
tuttle-dev:mainfrom
jenilbanavani:issue-339
Open

fix : Revenue Breakdown: Deduct Business Expenses for Correct Tax Estimate and Safe-to-Spend #339#361
jenilbanavani wants to merge 6 commits into
tuttle-dev:mainfrom
jenilbanavani:issue-339

Conversation

@jenilbanavani

Copy link
Copy Markdown

Fixes #339

Summary

Implements #339 by deducting recurring business expenses before estimating income tax.

Changes

  • Added business_expenses and taxable_profit to SpendableIncome.
  • Updated compute_spendable_income() to deduct recurring expenses before computing income tax.
  • Updated the Tax intent to pass recurring expenses into the spendable income calculation.
  • Updated the Tax & Reserves waterfall to display Business Expenses and Taxable Profit.
    *Added tests covering recurring expense deduction, monthly/yearly normalization, and empty expense lists..

Manual verification

  • Verified the Tax & Reserves waterfall using a recurring expense.
  • Confirmed Business Expenses reduce Taxable Profit before income tax is estimated.
  • Confirmed Safe to Spend reflects the corrected calculation.

AI Assistance

I used an AI coding assistant to help explore the codebase and draft parts of the implementation. I reviewed the implementation, tested the changes, and understand all submitted code.

Checklist

  • [X I have read the Contributing guide.
  • I have installed and tested the application for my platform (just dev).
  • The test suite passes locally (just test).
  • Pre-commit hooks are installed and pass (just precommit).
  • I have added or updated tests where appropriate.
  • I have updated the documentation / docstrings where appropriate.
  • If my change touches the schema (tuttle/model.py), I generated and reviewed an Alembic migration (just migrate "<msg>").
  • I understand and can explain all submitted changes; if AI assistance was significant, I have disclosed it in the summary above.

- Add business_expenses and taxable_profit fields to SpendableIncome
- compute_spendable_income accepts optional expenses list
- Expenses are normalized to monthly, prorated to YTD period
- Income tax is now computed on taxable_profit, not net_revenue
- Backward compatible: no expenses = same behavior as before
@jenilbanavani jenilbanavani changed the title Issue #339 fix : Revenue Breakdown: Deduct Business Expenses for Correct Tax Estimate and Safe-to-Spend #339 Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revenue Breakdown: Deduct Business Expenses for Correct Tax Estimate and Safe-to-Spend

1 participant