{% extends "pos/base.html" %} {% load humanize %} {% block title %}Job #{{ job.job_no }} — Workshop{% endblock %} {% block content %}
{% for msg in messages %}
{{ msg }}
{% endfor %} {# ── Header ── #}

Job #{{ job.job_no }}   {% if job.status == "draft" %}Draft {% elif job.status == "in_progress" %}In Progress {% elif job.status == "parts_requested" %}Parts Requested {% elif job.status == "ready" %}Ready {% elif job.status == "invoiced" %}Invoiced ✓ {% endif %}

{{ job.job_date|date:"d M Y" }} {% if job.pit %} | Pit: {{ job.pit }}{% endif %} {% if job.time_in %} | In: {{ job.time_in|time:"H:i" }}{% endif %} {% if job.time_out %} → Out: {{ job.time_out|time:"H:i" }}{% endif %}
Back {% if 'job_card_re_open' in allowed_features %} {% if job.status == "invoiced" %}
{% csrf_token %}
{% endif %} {% endif %} {% if 'delete_job_card' in allowed_features %} {% endif %}
{# ── Step Tracker ── #}
{% for step in steps %} {% endfor %}
{# ── Vehicle + Job Info ── #}
Vehicle & Job
{% if job.remarks %} {% endif %}
Reg No {{ job.vehicle.reg_no }}
Make / Model {{ job.vehicle.make }} {{ job.vehicle.model }} {{ job.vehicle.color }}
Frame No {{ job.vehicle.frame_no|default:"—" }}
Owner {{ job.vehicle.owner_name|default:"—" }}
Mobile {{ job.vehicle.owner_mobile|default:"—" }}
Pit / Terminal {{ job.pit|default:"—" }}
Odometer In {{ job.odometer_in|floatformat:0|intcomma }} km
Job Type {{ job.get_job_type_display }} — Group {{ job.job_group }}
Technician {{ tech_name|default:"—" }}
Remarks {{ job.remarks }}
{# ── Billing & Invoice ── #}
Billing
{% if customer_name %} {% endif %} {% if job.billing_type == "insurance" %} {% endif %} {% if job.status == "invoiced" %} {% endif %}
Type {{ job.get_billing_type_display }}
Customer {{ customer_name }}
Claim # {{ job.claim_no|default:"—" }}
Policy # {{ job.policy_no|default:"—" }}
Invoice # {{ job.invoice_no }}
Gate Pass #{{ job.job_no }} {% if job.gp_printed %} Printed {% else %} Not printed {% endif %}
{# ── Totals ── #}
Bill Summary
{% if job.services_discount_amt %} {% endif %} {% if job.services_tax_amt %} {% endif %} {% if job.parts_discount_amt %} {% endif %} {% if job.parts_tax_amt %} {% endif %} {% if job.counter_discount_amt %} {% endif %}
Services Sub-total {{ job.services_subtotal|floatformat:0|intcomma }}
Services Discount ({{ job.services_discount_per }}%) -{{ job.services_discount_amt|floatformat:0|intcomma }}
Services Tax ({{ job.services_tax_per }}%) {{ job.services_tax_amt|floatformat:0|intcomma }}
Services Net {{ job.services_net|floatformat:0|intcomma }}
Parts Sub-total (Issued) {{ job.parts_subtotal|floatformat:0|intcomma }}
Parts Discount ({{ job.parts_discount_per }}%) -{{ job.parts_discount_amt|floatformat:0|intcomma }}
Parts Tax ({{ job.parts_tax_per }}%) {{ job.parts_tax_amt|floatformat:0|intcomma }}
Parts Net {{ job.parts_net|floatformat:0|intcomma }}
Cash Counter Discount -{{ job.counter_discount_amt|floatformat:0|intcomma }}
NET AMOUNT PKR {{ job.net_amount|floatformat:0|intcomma }}
{# ── PRINT PANEL ── #}
Print Documents
{# Gate Pass — available from any status #} {# Invoice prints — only after invoiced #} {% if job.status == "invoiced" %} {% if job.billing_type in "corporate,insurance" %} {% endif %} {# Print All button #}
{% else %}
Invoice prints (Customer, Office, Finance, PST) will be available once this job is settled at the Cash Counter.
{% endif %}
{# ── Services Lines ── #}
Services ({{ services|length }})
{% if job.status == "draft" or job.status == "in_progress" %} Edit {% endif %}
{% for svc in services %} {% empty %} {% endfor %}
#ServiceDescriptionPrice
{{ svc.line_no }} {{ svc.service_name|default:"—" }} {{ svc.description|default:"" }} {{ svc.price|floatformat:0|intcomma }}
No services added
{# ── Parts Lines ── #}
Parts ({{ parts|length }})
{% if job.status == "in_progress" %} Edit Requisition {% elif job.status == "parts_requested" %} Awaiting Stock Issuer {% endif %}
{% for part in parts %} {% empty %} {% endfor %}
#PartReq. Qty Issued Qty RateBillable Total
{{ part.line_no }} {{ part.product_name }} {{ part.qty|floatformat:0 }} {{ part.issued_qty|floatformat:0 }} {{ part.rate|floatformat:0|intcomma }} {{ part.line_total|floatformat:0|intcomma }}
No parts added
{# ── Action Buttons ── #} {% if job.status != "invoiced" %}
{% if job.status == "draft" %} Vehicle / Check-in Services {% elif job.status == "in_progress" %} Vehicle / Check-in Services Stock Requisition → {% elif job.status == "parts_requested" %}
Waiting for Stock Issuer department to issue the requested parts.
{% elif job.status == "ready" %}
Parts issued. Ready for settlement.
Cash Counter → {% endif %}
{% endif %}
{# Delete Modal #} {% endblock %} {% block javascripts %} {% endblock %}