{% extends "base.html" %}
{% block title %}Tax Report{% endblock %}
{% block content %}
<h2>🧾 Monthly Tax Report</h2>
<form method="get" class="row g-2 mb-3"><div class="col-md-3"><input type="number" class="form-control" name="year" value="{{ year }}"></div><div class="col-md-2"><button class="btn btn-primary w-100">View</button></div></form>
<table class="table table-bordered table-striped"><thead><tr><th>Month</th><th>Income</th><th>Direct Cost</th><th>Expenses</th><th>Net Profit</th></tr></thead><tbody>{% for r in report %}<tr><td>{{ r.month }}</td><td>{{ '%.2f'|format(r.income) }}</td><td>{{ '%.2f'|format(r.direct_cost) }}</td><td>{{ '%.2f'|format(r.expenses) }}</td><td><b>{{ '%.2f'|format(r.net_profit) }}</b></td></tr>{% else %}<tr><td colspan="5" class="text-center">No data for this year.</td></tr>{% endfor %}</tbody></table>
{% endblock %}
