{% extends 'base.html' %} {% block title %}My Bookings{% endblock %} {% block topbar_title %}My Bookings{% endblock %} {% block content %}
| Code | Route | Bus | Departure | Seats | Total | Status | Booked at | Action |
|---|---|---|---|---|---|---|---|---|
| {{ b.booking_code }} | {{ b.schedule.route.source_city.city_name }} โ {{ b.schedule.route.destination_city.city_name }}
{% if b.schedule.status == 'DELAYED' %} DELAYED{% endif %} |
{{ b.schedule.bus.bus_name }} | {{ b.schedule.departure_time|date:"Y-m-d H:i" }} | {% with seat_list=b.booking_seats.all %} {% if seat_list %} {% for bs in seat_list %}{{ bs.seat.seat_number }}{% if not forloop.last %}, {% endif %}{% endfor %} {% else %}{{ b.seats_count }}{% endif %} {% endwith %} | Rs. {{ b.total_amount }}
{% if b.cancellation_fee_amount > 0 %} fee: Rs. {{ b.cancellation_fee_amount }}{% endif %} |
{% if b.booking_status == 'CONFIRMED' or b.booking_status == 'CHECKED_IN' or b.booking_status == 'COMPLETED' %} {{ b.booking_status }} {% elif b.booking_status == 'PENDING_PAYMENT' %} AWAITING PAYMENT {% elif b.booking_status == 'CANCELLED' or b.booking_status == 'EXPIRED' %} {{ b.booking_status }} {% elif b.booking_status == 'REFUNDED' %} {{ b.booking_status }} {% else %} {{ b.booking_status }} {% endif %} | {{ b.booked_at|date:"Y-m-d H:i" }} | {% if b.booking_status == 'PENDING_PAYMENT' %} Complete payment Cancel {% elif b.booking_status == 'CONFIRMED' or b.booking_status == 'CHECKED_IN' %} ๐ซ Ticket Cancel {% elif b.booking_status == 'COMPLETED' %} ๐ซ Ticket {% if not b.rating %} {% endif %} {% elif b.schedule.arrival_time < now and b.booking_status in confirmed_like %} {% if not b.rating %} {% endif %} {% else %} โ {% endif %} |
| You have no bookings yet. | ||||||||