fix : Revenue Breakdown: Deduct Business Expenses for Correct Tax Estimate and Safe-to-Spend #339#361
Open
jenilbanavani wants to merge 6 commits into
Open
fix : Revenue Breakdown: Deduct Business Expenses for Correct Tax Estimate and Safe-to-Spend #339#361jenilbanavani wants to merge 6 commits into
jenilbanavani wants to merge 6 commits into
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #339
Summary
Implements #339 by deducting recurring business expenses before estimating income tax.
Changes
business_expensesandtaxable_profittoSpendableIncome.compute_spendable_income()to deduct recurring expenses before computing income tax.*Added tests covering recurring expense deduction, monthly/yearly normalization, and empty expense lists..
Manual verification
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
just dev).just test).just precommit).tuttle/model.py), I generated and reviewed an Alembic migration (just migrate "<msg>").