{% extends "pos/base.html" %} {% load static %} {% block title %}Ticket Vendor Ledger{% endblock %} {% block stylesheets %} {% endblock %} {% block heading %} Ticket Vendor Ledger {% endblock %} {% block content %}
{% if vendor_obj %} Show All {% endif %}
{% if vendor_obj %}
PDF
{% endif %}
{% if vendor_obj %}
{{ vendor_obj.name|title }} [ID: {{ vendor_obj.t_id }}]
{% if show_all %}Complete ledger — all time {% else %}{{ start_date|default:"—" }} → {{ end_date|default:"—" }} {% if svc_type %} · {{ svc_type|upper }}{% endif %} {% endif %}
Account Balance
{{ vendor_obj.balance|floatformat:0 }}
Current
Total Payable
{{ total_payable|floatformat:0 }}
This period
Paid
{{ total_paid|floatformat:0 }}
Settled
Pending Balance
{{ pending_balance|floatformat:0 }}
Outstanding
Ticket Invoices
{{ svc_counts.ticket|default:0 }}
Air tickets
Other Services
{{ other_svc_count }}
Visa / Hotel / etc.
Closing Balance
{{ closing_balance|floatformat:0 }}
End of period
{% for row in ledger_rows %} {% if row.row_type == 'opening' %} {% elif row.row_type == 'invoice' %} {# Service sub-rows #} {% for sr in row.sub_rows %} {% endfor %} {% endif %} {% empty %} {% endfor %}
# Date Folder# Services Client / Description PNR / Ref Ticket # Flight Category Payable Paid Balance
— {{ row.date }} — Opening Balance {{ row.balance|floatformat:2 }}
{{ forloop.counter }} {{ row.date }} #{{ row.folder_no }} {{ row.svc_flags }} {{ row.client_name }} {% if row.inv_title %}
{{ row.inv_title }}{% endif %} {% if row.status == 'REFUNDED' %}  REFUNDED {% endif %}
— — — {{ row.inv_category }} {{ row.inv_amount|floatformat:2 }} {% if row.received %}{{ row.received|floatformat:2 }}{% else %}—{% endif %} {{ row.balance|floatformat:2 }}
{{ sr.svc|upper|slice:":4" }} {{ sr.pax_name }} {% if sr.passport and sr.passport != '—' %}  PP: {{ sr.passport }} {% endif %} {{ sr.pnr|default:"—" }} {{ sr.ticket_no|default:"—" }} {{ sr.flight_no|default:"—" }} {{ sr.client|default:"—" }} {% if sr.amount %}{{ sr.amount|floatformat:2 }}{% else %}—{% endif %}

No transactions found.

PERIOD TOTALS {{ total_payable|floatformat:2 }} {{ total_paid|floatformat:2 }} {{ closing_balance|floatformat:2 }}
{% if cat_breakdown %}
Service-wise Breakdown
{% for cat in cat_breakdown %} {% endfor %}
Service Inv. Payable Balance
{{ cat.svc_type|upper|slice:":4" }} {{ cat.label }} {{ cat.count }} {{ cat.total_amount|floatformat:0 }} {{ cat.balance|floatformat:0 }}
Grand Total {{ total_inv_count }} {{ total_payable|floatformat:0 }} {{ closing_balance|floatformat:0 }}
{% endif %}
{% else %}

Select a vendor / airline and click Search to view their ledger.

Use Show All for complete history.

{% endif %} {% endblock %} {% block javascripts %} {% endblock %}