Files
2026-05-07 11:09:06 -04:00

32 lines
1.3 KiB
HTML

{% extends "admin/layouts/base.html" %}
{% block title %}Billing History{% endblock %}
{% block content %}
<h4 class="fw-bold mb-4"><i class="bi bi-receipt me-2"></i>Billing History</h4>
<div class="card shadow-sm">
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead class="table-dark">
<tr><th>Date</th><th>Tenant</th><th>Amount</th><th>Description</th><th>Invoice Ref</th><th>Paid</th></tr>
</thead>
<tbody>
{% for b in entries %}
<tr>
<td class="small">{{ b.created_at.strftime('%Y-%m-%d') }}</td>
<td>
<a href="{{ url_for('tenants.detail', tenant_id=b.tenant_id) }}" class="text-decoration-none">
{{ b.tenant.name if b.tenant else b.tenant_id }}
</a>
</td>
<td class="fw-semibold">${{ "%.2f"|format(b.amount) }}</td>
<td>{{ b.description }}</td>
<td class="text-muted small">{{ b.invoice_ref or '—' }}</td>
<td class="text-muted small">{{ b.paid_at.strftime('%Y-%m-%d') if b.paid_at else '—' }}</td>
</tr>
{% else %}
<tr><td colspan="6" class="text-center text-muted py-4">No billing entries yet.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}