{% extends "base.html" %} {% block content %}

Billing Records

{% if session['role'] in ['admin', 'patient'] %} 🧾 Generate Invoice {% endif %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
{% if bills %} {% for b in bills %} 10000 %}class="table-warning"{% endif %}> {% endfor %} {% else %} {% endif %}
# Patient Name Doctor Name Doctor Fee (₹) Room Charge (₹) Medicine Charge (₹) Total Bill (₹) Date
{{ loop.index }} {{ b.patient_name }} {{ b.doctor_name }} {{ b.doctor_fee or '-' }} {{ b.room_charge or '-' }} {{ b.medicine_charge or '-' }} ₹{{ b.total_bill }} {{ b.billing_date.strftime('%d-%m-%Y') if b.billing_date else '-' }}
No billing records available.
{% if bills %}
💰 Total Revenue: ₹{{ bills | sum(attribute='total_bill') }}
{% endif %}
{% endblock %}