{# 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 %} Invoice #{{ invoice.folder_no }} — {{ company_name }}

{{ company_name }}

{{ company_address }}
✆ {{ company_phone }}

{% if invoice.status == 'REFUNDED' %}Refund Invoice{% else %}Invoice{% endif %}

{{ invoice.status }}
Invoice / Folder# {{ invoice.folder_no }}
Date {{ invoice.invoice_date|date:"d M Y" }}
Receipt# {{ invoice.receipt_no }}
{% if invoice.inv_category %}
Category / Airline {{ invoice.inv_category }}
{% endif %} {% if invoice.inv_title %}
Title / Ref {{ invoice.inv_title }}
{% endif %}
Printed {% now "d M Y, H:i" %}
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 %}
{% for ln in ticket_lines %} {% endfor %} {% if ticket_lines.count > 1 %} {% endif %}
# Ticket No. Passenger Flight / Airline Sector Dep. Date PNR Amount (PKR)
{{ 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 }}
Total — {{ ticket_lines.count }} Ticket(s) {{ invoice.total_receivable|floatformat:2 }}
{% endif %} {% if visa_lines %}
Visa Services {{ visa_lines|length }} entr{{ visa_lines|length|pluralize:"y,ies" }}
{% for vl in visa_lines %} {% endfor %} {% if visa_lines|length > 1 %} {% endif %}
# Passenger Passport# Visa# Visa Type Country Issue Date Amount (PKR)
{{ 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 %}
Total — {{ visa_lines|length }} Visa Entr{{ visa_lines|length|pluralize:"y,ies" }} {{ invoice.total_visa_amount|floatformat:2 }}
{% endif %} {% if hotel_lines %}
Hotel Accommodation {{ hotel_lines|length }} entr{{ hotel_lines|length|pluralize:"y,ies" }}
{% for hl in hotel_lines %} {% endfor %} {% if hotel_lines|length > 1 %} {% endif %}
# Passenger Passport# Hotel Check-in Nights Checkout Amount (PKR)
{{ 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 %}
Total — {{ hotel_lines|length }} Hotel Entr{{ hotel_lines|length|pluralize:"y,ies" }} {{ invoice.total_hotel_amount|floatformat:2 }}
{% endif %} {% if transport_lines %}
Transport Services {{ transport_lines|length }} entr{{ transport_lines|length|pluralize:"y,ies" }}
{% for tl in transport_lines %} {% endfor %} {% if transport_lines|length > 1 %} {% endif %}
# Passenger Car Type Persons Arrival Date Arrival Time Vehicle# Amount (PKR)
{{ 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 }}
Total — {{ transport_lines|length }} Transport Entr{{ transport_lines|length|pluralize:"y,ies" }} {{ invoice.total_transport_amount|floatformat:2 }}
{% endif %} {% if insurance_lines %}
Insurance / Coverage {{ insurance_lines|length }} entr{{ insurance_lines|length|pluralize:"y,ies" }}
{% for il in insurance_lines %} {% endfor %} {% if insurance_lines|length > 1 %} {% endif %}
# Client Company Plan Policy# Start End Amount (PKR)
{{ 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 }}
Total — {{ insurance_lines|length }} Insurance Entr{{ insurance_lines|length|pluralize:"y,ies" }} {{ invoice.total_insurance_amount|floatformat:2 }}
{% 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 }}
Balance Due (This Inv.) PKR {{ balance_due|floatformat:2 }}
{% if bank_payments %}
Payment Received
{% for bp in bank_payments %} {% endfor %}
{{ forloop.counter }}. {{ bp.bank_name }} PKR {{ bp.amount|floatformat:2 }}
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 %}
Authorized By
Prepared By
Client Signature