{# templates/sales/ticket_customer_invoice.html #}
{# Customer-facing invoice — shows only amounts payable by the client. #}
{# No commission, no vendor payables, no profit details. #}
{% load static %}
Bill To
{{ invoice.client_name }}
{% if invoice.client_account %}
A/C No: {{ invoice.client_account }}
{% endif %}
Account Summary
Previous Balance
PKR {{ prev_balance|floatformat:2 }}
This Invoice
PKR {{ invoice.grand_total|floatformat:2 }}
Amount Received
PKR {{ invoice.amount_received|floatformat:2 }}
Outstanding Balance
PKR {{ running_balance|floatformat:2 }}
{% if invoice.include_ticket and ticket_lines %}
Ticket Details
{{ ticket_lines.count }} ticket{% if ticket_lines.count != 1 %}s{% endif %}
| # |
Ticket No. |
Passenger |
Flight / Airline |
Sector |
Dep. Date |
PNR |
Amount (PKR) |
{% for ln in ticket_lines %}
| {{ forloop.counter }} |
{{ ln.ticket_no|default:"—" }} |
{{ ln.pax_name|default:"—" }}
{{ ln.pax_title }}
|
{% if ln.airline_code %}{{ ln.airline_code }} — {% endif %}
{{ ln.flight_no|default:"" }}{% if ln.flight_class %} ({{ ln.flight_class }}){% endif %}
|
{{ ln.sector|default:"—" }} |
{{ ln.dep_date|date:"d M Y"|default:"—" }} |
{{ ln.pnr|default:"—" }} |
{{ ln.receivable|floatformat:2 }} |
{% endfor %}
{% if ticket_lines.count > 1 %}
| Total — {{ ticket_lines.count }} Ticket(s) |
{{ invoice.total_receivable|floatformat:2 }} |
{% endif %}
{% endif %}
{% if visa_lines %}
Visa Services
{{ visa_lines|length }} entr{{ visa_lines|length|pluralize:"y,ies" }}
| # |
Passenger |
Passport# |
Visa# |
Visa Type |
Country |
Issue Date |
Amount (PKR) |
{% for vl in visa_lines %}
| {{ forloop.counter }} |
{{ vl.name|default:"—" }} |
{{ vl.passport_no|default:"—" }} |
{{ vl.visa_no|default:"—" }} |
{{ vl.visa_type|default:"—" }} |
{{ vl.travel_country|default:"—" }} |
{{ vl.issue_date|date:"d M Y"|default:"—" }} |
{% with cr=vl.customer_receivable %}
{% if cr %}{{ cr|floatformat:2 }}{% else %}{{ vl.amount_pkr|floatformat:2 }}{% endif %}
{% endwith %}
|
{% endfor %}
{% if visa_lines|length > 1 %}
| Total — {{ visa_lines|length }} Visa Entr{{ visa_lines|length|pluralize:"y,ies" }} |
{{ invoice.total_visa_amount|floatformat:2 }} |
{% endif %}
{% endif %}
{% if hotel_lines %}
Hotel Accommodation
{{ hotel_lines|length }} entr{{ hotel_lines|length|pluralize:"y,ies" }}
| # |
Passenger |
Passport# |
Hotel |
Check-in |
Nights |
Checkout |
Amount (PKR) |
{% for hl in hotel_lines %}
| {{ forloop.counter }} |
{{ hl.passenger_name|default:"—" }} |
{{ hl.passport_no|default:"—" }} |
{{ hl.hotel_name|default:"—" }} |
{{ hl.checkin_date|date:"d M Y"|default:"—" }} |
{{ hl.duration_of_stay|default:0 }} |
{{ hl.checkout_date|date:"d M Y"|default:"—" }} |
{% with cr=hl.customer_receivable %}
{% if cr %}{{ cr|floatformat:2 }}{% else %}{{ hl.rent_amount|floatformat:2 }}{% endif %}
{% endwith %}
|
{% endfor %}
{% if hotel_lines|length > 1 %}
| Total — {{ hotel_lines|length }} Hotel Entr{{ hotel_lines|length|pluralize:"y,ies" }} |
{{ invoice.total_hotel_amount|floatformat:2 }} |
{% endif %}
{% endif %}
{% if transport_lines %}
Transport Services
{{ transport_lines|length }} entr{{ transport_lines|length|pluralize:"y,ies" }}
| # |
Passenger |
Car Type |
Persons |
Arrival Date |
Arrival Time |
Vehicle# |
Amount (PKR) |
{% for tl in transport_lines %}
| {{ forloop.counter }} |
{{ tl.passenger_name|default:"—" }} |
{{ tl.car_type|default:"—" }} |
{{ tl.no_of_persons }} |
{{ tl.arrival_date|date:"d M Y"|default:"—" }} |
{{ tl.arrival_time|default:"—" }} |
{{ tl.vehicle_no|default:"—" }} |
{{ tl.total_receivable|floatformat:2 }} |
{% endfor %}
{% if transport_lines|length > 1 %}
| Total — {{ transport_lines|length }} Transport Entr{{ transport_lines|length|pluralize:"y,ies" }} |
{{ invoice.total_transport_amount|floatformat:2 }} |
{% endif %}
{% endif %}
{% if insurance_lines %}
Insurance / Coverage
{{ insurance_lines|length }} entr{{ insurance_lines|length|pluralize:"y,ies" }}
| # |
Client |
Company |
Plan |
Policy# |
Start |
End |
Amount (PKR) |
{% for il in insurance_lines %}
| {{ forloop.counter }} |
{{ il.client_name|default:"—" }} |
{{ il.insurance_company|default:"—" }} |
{{ il.plan_package|default:"—" }} |
{{ il.policy_number|default:"—" }} |
{{ il.travel_start_date|date:"d M Y"|default:"—" }} |
{{ il.travel_end_date|date:"d M Y"|default:"—" }} |
{{ il.total_receivable|floatformat:2 }} |
{% endfor %}
{% if insurance_lines|length > 1 %}
| Total — {{ insurance_lines|length }} Insurance Entr{{ insurance_lines|length|pluralize:"y,ies" }} |
{{ invoice.total_insurance_amount|floatformat:2 }} |
{% endif %}
{% endif %}
{% if cat_totals|length > 1 %}
{% for ct in cat_totals %}
{{ ct.label }}
{{ ct.amount|floatformat:2 }}
{% endfor %}
{% endif %}
Previous Balance
PKR {{ prev_balance|floatformat:2 }}
Invoice Total (Grand Total)
PKR {{ invoice.grand_total|floatformat:2 }}
Received
PKR {{ invoice.amount_received|floatformat:2 }}
Balance Due (This Inv.)
PKR {{ balance_due|floatformat:2 }}
{% if bank_payments %}
Payment Received
{% for bp in bank_payments %}
| {{ forloop.counter }}. {{ bp.bank_name }} |
PKR {{ bp.amount|floatformat:2 }} |
{% endfor %}
| Total Received |
PKR {{ invoice.amount_received|floatformat:2 }} |
{% endif %}
{% if running_balance > 0 %}
⚠ Outstanding Balance: PKR {{ running_balance|floatformat:2 }} — Please arrange payment at your earliest convenience.
{% endif %}