80 lines
2.8 KiB
HTML
80 lines
2.8 KiB
HTML
{% for bill in bills %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'billing:bill_detail' bill.bill_id %}" class="text-decoration-none">
|
|
{{ bill.bill_number }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<strong>{{ bill.patient.get_full_name }}</strong><br>
|
|
<small class="text-muted">MRN: {{ bill.patient.mrn }}</small>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="badge bg-secondary">{{ bill.get_bill_type_display }}</span>
|
|
</td>
|
|
<td>{{ bill.bill_date|date:"M d, Y" }}</td>
|
|
<td>
|
|
{{ bill.due_date|date:"M d, Y" }}
|
|
{% if bill.is_overdue %}
|
|
<br><small class="text-danger">Overdue</small>
|
|
{% endif %}
|
|
</td>
|
|
<td>${{ bill.total_amount|floatformat:2 }}</td>
|
|
<td>${{ bill.paid_amount|floatformat:2 }}</td>
|
|
<td>
|
|
<strong class="{% if bill.balance_amount > 0 %}text-warning{% else %}text-success{% endif %}">
|
|
${{ bill.balance_amount|floatformat:2 }}
|
|
</strong>
|
|
</td>
|
|
<td>
|
|
{% if bill.status == 'DRAFT' %}
|
|
<span class="badge bg-secondary">Draft</span>
|
|
{% elif bill.status == 'PENDING' %}
|
|
<span class="badge bg-warning">Pending</span>
|
|
{% elif bill.status == 'SUBMITTED' %}
|
|
<span class="badge bg-info">Submitted</span>
|
|
{% elif bill.status == 'PARTIAL_PAID' %}
|
|
<span class="badge bg-primary">Partially Paid</span>
|
|
{% elif bill.status == 'PAID' %}
|
|
<span class="badge bg-success">Paid</span>
|
|
{% elif bill.status == 'OVERDUE' %}
|
|
<span class="badge bg-danger">Overdue</span>
|
|
{% elif bill.status == 'COLLECTIONS' %}
|
|
<span class="badge bg-dark">Collections</span>
|
|
{% elif bill.status == 'WRITTEN_OFF' %}
|
|
<span class="badge bg-secondary">Written Off</span>
|
|
{% elif bill.status == 'CANCELLED' %}
|
|
<span class="badge bg-secondary">Cancelled</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="btn-group btn-group-sm">
|
|
<a href="{% url 'billing:bill_detail' bill.bill_id %}"
|
|
class="btn btn-outline-primary" title="View Details">
|
|
<i class="fas fa-eye"></i>
|
|
</a>
|
|
{% if bill.status == 'DRAFT' %}
|
|
<form method="post" action="{% url 'billing:submit_bill' bill.bill_id %}" class="d-inline">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-outline-success" title="Submit Bill">
|
|
<i class="fas fa-paper-plane"></i>
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="10" class="text-center py-4">
|
|
<div class="text-muted">
|
|
<i class="fas fa-file-invoice fa-3x mb-3"></i>
|
|
<p>No medical bills found.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|