{% extends "pos/base.html" %} {% load static %} {% block title %}Delivery Challan #{{ run.run_no }}{% endblock %} {% block content %}
Delivery Challan #{{ run.run_no }}
{{ run.run_date|date:"d-m-Y" }} | Person: {{ run.delivery_person_name|default:"-" }} | Hub: {{ run.from_city|default:"-" }}
{% if run.status != "closed" and counters.pending > 0 %} Bulk Result Entry {% endif %} Back
{% if messages %} {% for message in messages %}
{{ message }}
{% endfor %} {% endif %}
Run Status {% if run.status == "closed" %} {{ run.get_status_display }} {% elif run.status == "out_for_delivery" %} {{ run.get_status_display }} {% elif run.status == "cancelled" %} {{ run.get_status_display }} {% else %} {{ run.get_status_display }} {% endif %}
Total Invoices {{ run.total_invoices }}
Total Balance {{ run.total_balance|floatformat:2 }}
Collected {{ run.total_collected|floatformat:2 }}
Pending {{ counters.pending }}
Delivered {{ counters.delivered }}
Not Delivered {{ counters.not_delivered }}
Partial {{ counters.partial }}
Damage {{ counters.damage }}
Shortage {{ counters.shortage }}
{% if run.remarks %}
Remarks: {{ run.remarks }} {% endif %} {% if run.status == "closed" %}
This delivery challan is closed. All assigned invoices have final results.
{% elif counters.pending > 0 %}
{{ counters.pending }} invoice(s) ka result abhi pending hai.
{% endif %}
Assigned Invoices
Har invoice ka delivery result yahan manage hoga
{% for line in lines %} {% empty %} {% endfor %}
# Invoice Builty Customer Receiver Route Payment Balance Collected Status Reason / Remarks Action
{{ forloop.counter }} #{{ line.invoice_no }} {{ line.builty_no|default:"-" }} {{ line.customer_name|default:"-" }} {{ line.receiver_name|default:"-" }}
{{ line.receiver_mobile|default:"" }}
{{ line.from_city|default:"-" }} → {{ line.to_city|default:"-" }} {% if line.payment_mode == "paid" %} Paid {% elif line.payment_mode == "to_pay" %} To Pay {% elif line.payment_mode == "credit" %} Credit {% else %} {{ line.payment_mode|default:"-" }} {% endif %} {% if line.balance_amount > 0 %} {{ line.balance_amount|floatformat:2 }} {% else %} {{ line.balance_amount|floatformat:2 }} {% endif %} {{ line.collected_amount|floatformat:2 }} {% if line.status == "pending" %} {{ line.get_status_display }} {% elif line.status == "delivered" %} {{ line.get_status_display }} {% elif line.status == "not_delivered" %} {{ line.get_status_display }} {% elif line.status == "partial" %} {{ line.get_status_display }} {% elif line.status == "damage" %} {{ line.get_status_display }} {% elif line.status == "shortage" %} {{ line.get_status_display }} {% elif line.status == "cancelled" %} {{ line.get_status_display }} {% else %} {{ line.get_status_display }} {% endif %} {% if line.status == "not_delivered" %} {{ line.get_failed_reason_display|default:"-" }} {% if line.result_remarks %}
{{ line.result_remarks }} {% endif %} {% elif line.result_remarks %} {{ line.result_remarks }} {% else %} - {% endif %}
{% if line.status == "pending" %} Result {% elif line.delivery_t_id %} Proof {% else %} Done {% endif %}
No invoices assigned.
Totals {{ summary.total_balance|floatformat:2 }} {{ summary.total_collected|floatformat:2 }}
{% endblock %}