{% extends "base.html" %} {% block title %}Jobcard - {{ jobcard.jobcard_code }}{% endblock %} {% block header %}Operations Jobcard{% endblock %} {% block content %} {% set quote = jobcard.quote %} {% set client_deadline = jobcard.client_deadline or (quote.client_deadline if quote else none) %} {% set client_deadline_source = 'Jobcard' if jobcard.client_deadline else ('Quote fallback' if quote and quote.client_deadline else none) %} {% set branch = jobcard.branch %} {% set opp = quote.opportunity if quote else none %} {% set client_name = jobcard.client.company_name if jobcard.client else (opp.company if opp else '—') %} {% set contact_name = opp.contact_name if opp and opp.contact_name else '—' %} {% set contact_email = opp.contact_email if opp and opp.contact_email else '—' %} {% set contact_phone = opp.contact_phone if opp and opp.contact_phone else '—' %} {% set owner_id = jobcard.current_owner_id or jobcard.assigned_to_id %} {% set can_manage_jobcard = (owner_id == current_user.id) or current_user.has_perm("operations.jobcard.view_all") %} {% set latest_pi = latest_pi if latest_pi is defined else none %} {% set latest_invoice = latest_invoice if latest_invoice is defined else none %} {% set is_closed = jobcard.status == "Ready For Billing" %} {% set pending_closure_approval_request = pending_closure_approval_request if pending_closure_approval_request is defined else none %} {% set is_closure_approval_pending = pending_closure_approval_request is not none %} {% set is_billing_locked = latest_pi or latest_invoice %} {% set jobcard_processes = jobcard_processes if jobcard_processes is defined else [] %} {% set process_assignments_by_process = process_assignments_by_process if process_assignments_by_process is defined else {} %} {% set missing_required_fields_by_service = missing_required_fields_by_service if missing_required_fields_by_service is defined else {} %} {% set workload_summary = workload_summary if workload_summary is defined else {'required_count': 0, 'completed_count': 0, 'missing_count': 0, 'is_complete': true} %} {% set deadline_extension_requests = deadline_extension_requests if deadline_extension_requests is defined else [] %} {% set pending_deadline_extension_request = pending_deadline_extension_request if pending_deadline_extension_request is defined else none %} {% set latest_approved_deadline_extension = latest_approved_deadline_extension if latest_approved_deadline_extension is defined else none %} {% set deadline_extension_quote_owner = deadline_extension_quote_owner if deadline_extension_quote_owner is defined else none %} {% set can_request_deadline_extension = current_user.has_perm("operations.vendor.assign") and client_deadline and not pending_deadline_extension_request and not is_billing_locked %} {% set is_mtpe_jobcard = jobcard.mtpe_required or jobcard.mtpe_language_pair or jobcard.mtpe_mt_name or jobcard.mtpe_accuracy or jobcard.mtpe_feedback or jobcard.mtpe_remarks %} {% set language_pairs = language_pairs if language_pairs is defined else [] %} {% set mt_names = mt_names if mt_names is defined else [] %} {% set service_count = jobcard.services.count() if jobcard.services else 0 %} {% set process_count = jobcard_processes|length if jobcard_processes else 0 %} {% set completed_count = namespace(value=0) %} {% set assigned_count = namespace(value=0) %} {% set checklist_pending_count = namespace(value=0) %} {% set qc_pending_count = namespace(value=0) %} {% set internal_process_completed_count = namespace(value=0) %} {% set internal_process_assigned_count = namespace(value=0) %} {% set can_create_ticket = current_user.has_perm("ticketing.create") %} {% set can_view_ticketing = current_user.has_perm("ticketing.view") %} {% set rework_ticket_count = namespace(value=0) %} {% for svc in jobcard.services %} {% if svc.status == "Completed" %} {% set completed_count.value = completed_count.value + 1 %} {% endif %} {% set svc_assignments = assignments_by_service.get(svc.id, []) if assignments_by_service is defined else [] %} {% set production_assignments = svc_assignments | selectattr("assignment_type", "equalto", "PRODUCTION") | list %} {% if production_assignments|length > 0 or svc.status == "Completed" %} {% set assigned_count.value = assigned_count.value + 1 %} {% endif %} {% if svc.checklist_questions.count() > 0 and svc.checklist_status != "Submitted" %} {% set checklist_pending_count.value = checklist_pending_count.value + 1 %} {% endif %} {% if svc.rework_tickets is defined %} {% set rework_ticket_count.value = rework_ticket_count.value + svc.rework_tickets.count() %} {% endif %} {% for a in svc_assignments %} {% if a.assignment_type == "QC" and a.status != "Completed" %} {% set qc_pending_count.value = qc_pending_count.value + 1 %} {% endif %} {% endfor %} {% endfor %} {% for jp in jobcard_processes %} {% set jp_assignments = process_assignments_by_process.get(jp.id, []) %} {% if jp.status == "Completed" %} {% set internal_process_completed_count.value = internal_process_completed_count.value + 1 %} {% endif %} {% if jp_assignments|length > 0 %} {% set internal_process_assigned_count.value = internal_process_assigned_count.value + 1 %} {% endif %} {% endfor %}
Operations Jobcard

{{ jobcard.jobcard_code }}

{% if latest_invoice %} Invoice Raised {% elif latest_pi %} PI Raised {% elif jobcard.status == "Closure Approval Pending" %} Closure Approval Pending {% elif jobcard.status == "Ready For Billing" %} Ready For Billing {% elif jobcard.status == "Sample Completed" or jobcard.is_sample_job %} Sample Completed {% elif jobcard.status == "Completed" %} Completed {% elif jobcard.status == "In Progress" %} In Progress {% else %} {{ jobcard.status or 'Submitted' }} {% endif %} {% if quote %} Quote: {{ quote.quote_code }} {% endif %} {% if jobcard.current_owner %} PM: {{ jobcard.current_owner.name }} {% endif %} {% if rework_ticket_count.value > 0 %} Rework Tickets: {{ rework_ticket_count.value }} {% endif %}
Client
{{ client_name }}
{{ branch.branch_location if branch else '—' }} {% if branch and branch.city %}, {{ branch.city }}{% endif %}
{% if jobcard.is_sample_job %}
Sample / Non-Billable Job
This jobcard is operationally completed but is excluded from profit-margin closure, PI generation and Invoice generation.
{% if jobcard.sample_reason %}
Reason: {{ jobcard.sample_reason }}
{% endif %}
{% if jobcard.sample_marked_by %}
Marked by {{ jobcard.sample_marked_by.name }}
{% endif %} {% if jobcard.sample_marked_at %}
{{ jobcard.sample_marked_at.strftime('%d-%m-%Y %I:%M %p') }}
{% endif %}
{% endif %}
Client Delivery Deadline
{% if client_deadline %}
{{ client_deadline.strftime('%d-%m-%Y %I:%M %p') }}
Commitment source: {{ client_deadline_source }}. This deadline is used for PM on-time delivery KPI.
{% if latest_approved_deadline_extension %}
Deadline Extended Original: {{ latest_approved_deadline_extension.original_deadline.strftime('%d-%m-%Y %I:%M %p') }}
{% endif %} {% else %}
Client deadline not configured
Add the client commitment once. After saving, it becomes the deadline used for PM on-time KPI and cannot be changed from this page.
{% if can_manage_jobcard %} {% endif %} {% endif %}
PM On-time KPI Deadline
{% if pending_deadline_extension_request or latest_approved_deadline_extension or deadline_extension_requests|length > 0 %}
Client Deadline Extension Workflow
{% if pending_deadline_extension_request %}
Extension approval in progress
{{ pending_deadline_extension_request.original_deadline.strftime('%d-%m-%Y %I:%M %p') }} {{ pending_deadline_extension_request.proposed_deadline.strftime('%d-%m-%Y %I:%M %p') }}
{{ pending_deadline_extension_request.reason }}
{% elif latest_approved_deadline_extension %}
Client deadline was extended
Original {{ latest_approved_deadline_extension.original_deadline.strftime('%d-%m-%Y %I:%M %p') }} · Current {{ latest_approved_deadline_extension.proposed_deadline.strftime('%d-%m-%Y %I:%M %p') }}
{% else %}
Deadline-extension history
{% endif %}
{% if pending_deadline_extension_request %} {{ pending_deadline_extension_request.status }} {% elif latest_approved_deadline_extension %} Approved {% endif %}

{% for ext in deadline_extension_requests %}
{{ ext.original_deadline.strftime('%d-%m-%Y %I:%M %p') }} {{ ext.proposed_deadline.strftime('%d-%m-%Y %I:%M %p') }}
{{ ext.status }}
Requested by {{ ext.requested_by.name if ext.requested_by else '—' }} · {{ ext.extension_hours }} hours {% if ext.requires_admin_approval %}· Sales + Admin approval{% else %}· Sales approval{% endif %}
{{ ext.reason }}
{% for h in ext.history %}
{{ h.action }} by {{ h.acted_by.name if h.acted_by else '—' }} on {{ h.acted_at.strftime('%d-%m-%Y %I:%M %p') if h.acted_at else '—' }} {% if h.remark %}— {{ h.remark }}{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if current_user.has_perm("operations.vendor.assign") and not is_closed and not is_billing_locked and not is_closure_approval_pending %} Assignment {% endif %} {% if current_user.has_perm("operations.vendor.assign") and can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %}
{% endif %} {% if current_user.has_perm("operations.vendor.assign") and can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %} {% if can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %} {% if can_create_ticket %} Raise Rework Ticket {% endif %} {% if can_view_ticketing and rework_ticket_count.value > 0 %} View Rework Tickets {% endif %} {% if current_user.has_perm("operations.jobcard.transfer") and can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %} {% if current_user.has_perm("operations.jobcard.reopen_request") and is_closed and not latest_invoice %} {% if pending_reopen_request %} {% else %} {% endif %} {% endif %} {% if current_user.has_perm("operations.jobcard.close") and can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %} {% if can_request_deadline_extension %} {% elif pending_deadline_extension_request %} {% endif %} {% if current_user.has_perm("operations.deadline_extension.view") %} Extension Approvals {% endif %} {% if quote %} Open Quote {% endif %} Back
{% if pending_reopen_request %}
Reopen request pending
Requested by {{ pending_reopen_request.requested_by.name if pending_reopen_request.requested_by else '—' }} on {{ pending_reopen_request.requested_at.strftime('%d-%m-%Y %I:%M %p') if pending_reopen_request.requested_at else '—' }}
{{ pending_reopen_request.reason }}
{% endif %} {% if pending_closure_approval_request %}
Low margin closure approval pending
Requested by {{ pending_closure_approval_request.requested_by.name if pending_closure_approval_request.requested_by else '—' }} on {{ pending_closure_approval_request.requested_at.strftime('%d-%m-%Y %I:%M %p') if pending_closure_approval_request.requested_at else '—' }}
Margin: {{ "%.2f"|format(pending_closure_approval_request.profit_margin_pct or 0) }}% | {% set closure_currency = commercial_overview.currency if commercial_overview is defined and commercial_overview else (quote.currency if quote else 'INR') %} Profit: {{ closure_currency }} {{ indian_amount(pending_closure_approval_request.profit_amount or 0) }} | Vendor Cost: {{ closure_currency }} {{ indian_amount(pending_closure_approval_request.total_vendor_costs or 0) }}
This jobcard will be marked Ready For Billing only after approval.
{% endif %}
Jobcard Overview

Execution Snapshot

Track assignment, production, QC, billing readiness, internal process flow, and project profitability in one place.
{{ jobcard.status or 'Submitted' }}
Process Summary
Current progress across production, internal process, checklist, QC, and billing.
{{ completed_count.value }} / {{ service_count }} Completed
Jobcard Created
{{ jobcard.created_at.strftime('%d-%m-%Y %I:%M %p') if jobcard.created_at else '—' }}
Production Assigned
{{ assigned_count.value }} / {{ service_count }} service line(s)
Internal Process
{% if process_count == 0 %} Not selected {% else %} {{ internal_process_completed_count.value }} / {{ process_count }} completed {% endif %}
Production In Progress
{{ completed_count.value }} / {{ service_count }} completed
Production Completed
{{ completed_count.value }} / {{ service_count }} service line(s)
Checklist
{% if checklist_pending_count.value == 0 %}Submitted{% else %}{{ checklist_pending_count.value }} pending{% endif %}
Quality Check
{% if qc_pending_count.value > 0 %}{{ qc_pending_count.value }} pending{% elif completed_count.value > 0 %}Completed{% else %}Not assigned{% endif %}
Jobcard Closed
{{ jobcard.closed_at.strftime('%d-%m-%Y %I:%M %p') if jobcard.closed_at else 'Awaiting closure' }}
Bill Raised
{% if latest_invoice %} {{ latest_invoice.invoice_no }} {% else %} Pending {% endif %}
Services
{{ service_count }}
Total line items
Assigned
{{ assigned_count.value }}
Vendor / internal mapped
Internal Processes
{{ process_count }}
{{ internal_process_completed_count.value }} completed
QC Pending
{{ qc_pending_count.value }}
Quality check pending
{% if commercial_overview is defined and commercial_overview %}
Financial Overview
Project Value, Vendor Cost & Profitability
{{ commercial_overview.currency }}
Total Amount Excluding Tax
{{ commercial_overview.currency }} {{ indian_amount(commercial_overview.quote_amount_ex_tax or 0) }}
Project value before tax
Total Vendor Costs
{{ commercial_overview.currency }} {{ indian_amount(commercial_overview.total_vendor_costs or 0) }}
Active external vendor production and process assignments
Profit Margin
{% if jobcard.is_sample_job %} N/A {% elif commercial_overview.profit_margin_pct is not none %} {{ "%.2f"|format(commercial_overview.profit_margin_pct) }}% {% else %} — {% endif %}
{% if jobcard.is_sample_job %} Sample work — no profit margin applicable {% else %} Profit: {{ commercial_overview.currency }} {{ indian_amount(commercial_overview.profit_amount or 0) }} {% endif %}
{% if jobcard.is_sample_job %}
Non-Billable
{% elif commercial_overview.profit_amount < 0 %}
Negative Margin
{% else %}
Profitable
{% endif %}
{% endif %}
{% set mtpe_entries = mtpe_entries if mtpe_entries is defined else [] %} {% if mtpe_entries|length > 0 %}
MTPE Details
Machine Translation Post Editing
Multiple MTPE entries captured for this jobcard.
{% if can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %}
{% for row in mtpe_entries %} {% endfor %}
# Language Pair MT Engine / MT Name Accuracy Feedback Remarks Added By Added At
{{ loop.index }} {{ row.language_pair }} {{ row.mt_name }} {{ "%.2f"|format(row.accuracy or 0) }}% {{ row.feedback }} {{ row.remarks }} {{ row.created_by.name if row.created_by else '—' }} {{ row.created_at.strftime('%d-%m-%Y %I:%M %p') if row.created_at else '—' }}
{% endif %}
PM Details
Current PM
{{ jobcard.current_owner.name if jobcard.current_owner else (jobcard.assigned_to.name if jobcard.assigned_to else '—') }}
Original Assigned To
{{ jobcard.assigned_to.name if jobcard.assigned_to else '—' }}
Assigned By
{{ jobcard.assigned_by.name if jobcard.assigned_by else '—' }}
Submitted At
{{ jobcard.submitted_at.strftime('%d-%m-%Y %I:%M %p') if jobcard.submitted_at else '—' }}
Client Details
Client
{{ client_name }}
Client Delivery Deadline
{% if client_deadline %}
{{ client_deadline.strftime('%d-%m-%Y %I:%M %p') }}
Used for PM on-time KPI
{% else %}
Not configured
{% endif %}
Branch / Location
{% if branch %} {{ branch.branch_location or branch.address or '—' }}{% if branch.city %}, {{ branch.city }}{% endif %}{% if branch.state %}, {{ branch.state }}{% endif %} {% else %} — {% endif %}
GSTIN
{{ quote.billing_gstin if quote and quote.billing_gstin else (branch.gst if branch else '—') or '—' }}
Billing / Contact
{% if is_closed or latest_pi or latest_invoice %}
Billing Branch
{{ jobcard.billing_company_branch.branch_name if jobcard.billing_company_branch else '—' }}
Closed By
{{ jobcard.closed_by.name if jobcard.closed_by else '—' }}
{% if jobcard.is_sample_job %}
Sample Job Reason
{{ jobcard.sample_reason or '—' }}
{% endif %}
Closure Remark
{{ jobcard.closure_remark or '—' }}
{% else %}
Contact Person
{{ contact_name }}
Email
{{ contact_email }}
Phone
{{ contact_phone }}
{% endif %}
Workload Compliance
Production and QC Workload Entry
Assignment remains unchanged. Workload classification must be completed before jobcard closure.
Open Workload Entry
Required
{{ workload_summary.required_count }}
Completed
{{ workload_summary.completed_count }}
Missing
{{ workload_summary.missing_count }}
{% if workload_summary.missing_count > 0 %}
This jobcard cannot be closed until workload is entered for every eligible Production and QC assignment.
{% else %}
Workload entry is complete for all eligible assignments.
{% endif %}
Execution Details
Service Lines
{{ service_count }} Service(s)
{% if service_count > 0 %}
{% for svc in jobcard.services %} {% set svc_assignments = assignments_by_service.get(svc.id, []) if assignments_by_service is defined else [] %} {% set production_assignments = svc_assignments | selectattr("assignment_type", "equalto", "PRODUCTION") | list %} {% set qc_assignments = svc_assignments | selectattr("assignment_type", "equalto", "QC") | list %} {% set missing_fields = missing_required_fields_by_service.get(svc.id, []) %}

{% if missing_fields %}
Required jobcard fields are pending for this service line.
Pending fields: {% for f in missing_fields %} {{ f.field_label }}{% if not loop.last %}, {% endif %} {% endfor %}
{% if can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %}
{% endif %}
{% if can_create_ticket %} Raise Rework {% endif %} {% if can_view_ticketing and svc.rework_tickets is defined and svc.rework_tickets.count() > 0 %} Rework Tickets: {{ svc.rework_tickets.count() }} {% endif %} {% if can_manage_jobcard and not is_closed and not is_billing_locked and svc.status != "Completed" %}
{% endif %}
Production Assignments
{% if production_assignments|length > 0 %}
{% for a in production_assignments %} {% endfor %}
Assigned To Qty Rate Total Deadline Checklist File Status Action
{% if a.assigned_to_type == "INTERNAL" %} Internal: {{ a.internal_user.name if a.internal_user else '—' }} {% else %} Vendor: {{ a.vendor.name if a.vendor else '—' }} {% endif %} {% if a.instruction %}
{{ a.instruction }}
{% endif %}
{{ "%.2f"|format(a.assigned_qty or 0) }} {% if a.assigned_to_type == "VENDOR" %} {{ "%.4f"|format(a.rate or 0) }} {% if a.flat_rate %}
Flat
{% endif %} {% else %} — {% endif %}
{% if a.assigned_to_type == "VENDOR" %} {% if a.flat_rate %} {{ "%.2f"|format(a.rate or 0) }} {% else %} {{ "%.2f"|format((a.assigned_qty or 0) * (a.rate or 0)) }} {% endif %} {% else %} — {% endif %} {{ a.deadline.strftime('%d-%m-%Y %I:%M %p') if a.deadline else '—' }} {% if a.checklist_status == "Submitted" %} Submitted {% else %} Pending {% endif %} {% if a.external_checklist_url %} {% endif %} {% if a.file_path %} {{ a.file_title or 'View File' }} {% else %} — {% endif %} {% if a.status == "Completed" %} Completed {% else %} {{ a.status }} {% endif %} {% if can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% if a.assigned_to_type == "VENDOR" and a.status not in ["Completed", "Cancelled", "Replaced"] and a.external_checklist_url %}
{% endif %} {% if a.assignment_type == "PRODUCTION" and a.assigned_to_type == "VENDOR" and a.status not in ["Cancelled", "Replaced"] and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %} {% if a.checklist_status != "Submitted" %} {% endif %} {% if a.status != "Completed" %}
{% endif %} {% else %} — {% endif %}
{% else %}
No production assignment found.
{% endif %}
Jobcard Fields
{% if can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% if missing_fields %}Complete Fields{% else %}Edit Fields{% endif %} {% endif %}
{% for f in svc.field_values %} {% else %} {% endfor %}
Field Value
{{ f.field_master.field_label if f.field_master else f.field_key }} {% if f.field_master and f.field_master.is_required and not f.field_value and not f.file_path %} Required {% endif %} {% if f.file_path %} View File {% elif f.field_value %} {{ f.field_value }} {% else %} — {% endif %}
No field values captured.
Quality Check
QC can be assigned anytime and multiple QC assignments are allowed.
{% if can_manage_jobcard and not is_closed and not is_billing_locked and not is_closure_approval_pending %} {% endif %}
{% if qc_assignments|length > 0 %}
{% for qc in qc_assignments %} {% endfor %}
QC Assigned To Qty Deadline Status Action
{% if qc.assigned_to_type == "INTERNAL" %} Internal: {{ qc.internal_user.name if qc.internal_user else '—' }} {% else %} Vendor: {{ qc.vendor.name if qc.vendor else '—' }} {% endif %} {% if qc.instruction %}
{{ qc.instruction }}
{% endif %} {% if qc.file_path %} {{ qc.file_title or 'View File' }} {% endif %}
{{ qc.assigned_qty }} {{ qc.deadline.strftime('%d-%m-%Y %I:%M %p') if qc.deadline else '—' }} {% if qc.status == "Completed" %} Completed {% else %} Pending {% endif %} {% if can_manage_jobcard and qc.status != "Completed" and not is_closed and not is_billing_locked %}
{% else %} — {% endif %}
{% else %}
No QC assigned yet.
{% endif %}
{% for a in production_assignments %} {% endfor %} {% for a in production_assignments %} {% if a.assignment_type == "PRODUCTION" and a.assigned_to_type == "VENDOR" and a.status not in ["Cancelled", "Replaced"] %} {% endif %} {% endfor %} {% endfor %}
{% else %}
No services found for this jobcard.
{% endif %}
{% if jobcard_processes and jobcard_processes|length > 0 %}
Internal Process Flow
MT / MTPE / TPE / Other Internal Processes
Assign process work to internal users or vendors against selected quote line items.
{{ process_count }} Process(es)
{% if is_closed or is_billing_locked or is_closure_approval_pending %}
Internal process assignments are locked because this jobcard is closed, billing exists, or closure approval is pending.
{% endif %}
{% for jp in jobcard_processes %} {% set process_assignments = process_assignments_by_process.get(jp.id, []) %} {% set process = jp.process_master %}
{{ process.name if process else 'Internal Process' }}
{% if process and process.code %} {{ process.code }} {% endif %}
{% if process and process.description %}
{{ process.description }}
{% else %}
No description added.
{% endif %}
{% if jp.status == "Completed" %} Completed {% elif jp.status == "In Progress" %} In Progress {% elif jp.status == "Assigned" %} Assigned {% elif jp.status == "On Hold" %} On Hold {% else %} {{ jp.status or 'Pending' }} {% endif %}
{{ process_assignments|length }} assignment(s)
{% if can_manage_jobcard and current_user.has_perm("operations.internal_process.assign") and not is_closed and not is_billing_locked and not is_closure_approval_pending %}
{% endif %}
Assignments
Process assignments for selected quote lines.
{{ process_assignments|length }} Row(s)
{% if process_assignments|length > 0 %}
{% for pa in process_assignments %} {% endfor %}
Service Line Assigned To Qty Rate Total Deadline File Status Update
{{ pa.jobcard_service.service_name if pa.jobcard_service else '—' }}
{% if pa.jobcard_service and pa.jobcard_service.quote_item %}
{{ pa.jobcard_service.quote_item.item_name }}
{% endif %}
{% if pa.assigned_to_type == "INTERNAL" %} Internal: {{ pa.internal_user.name if pa.internal_user else '—' }} {% else %} Vendor: {{ pa.vendor.name if pa.vendor else '—' }} {% endif %} {% if pa.instruction %}
{{ pa.instruction }}
{% endif %}
{{ "%.2f"|format(pa.assigned_qty or 0) }} {% if pa.assigned_to_type == "VENDOR" %} {{ "%.4f"|format(pa.rate or 0) }} {% if pa.flat_rate %}
Flat
{% endif %} {% else %} — {% endif %}
{% if pa.assigned_to_type == "VENDOR" %} {% if pa.flat_rate %} {{ "%.2f"|format(pa.rate or 0) }} {% else %} {{ "%.2f"|format((pa.assigned_qty or 0) * (pa.rate or 0)) }} {% endif %} {% else %} — {% endif %} {{ pa.deadline.strftime('%d-%m-%Y %I:%M %p') if pa.deadline else '—' }} {% if pa.file_path %} {{ pa.file_title or 'View File' }} {% else %} — {% endif %} {% if pa.status == "Completed" %} Completed {% elif pa.status == "In Progress" %} In Progress {% elif pa.status == "On Hold" %} On Hold {% elif pa.status == "Cancelled" %} Cancelled {% else %} {{ pa.status or 'Assigned' }} {% endif %} {% set can_update_process_assignment = can_manage_jobcard or (pa.assigned_to_type == "INTERNAL" and pa.internal_user_id == current_user.id) or current_user.has_perm("operations.jobcard.view_all") %} {% if current_user.has_perm("operations.internal_process.update") and can_update_process_assignment and not is_closed and not is_billing_locked and not is_closure_approval_pending %}
{% else %} — {% endif %}
{% else %}
No assignments added for this internal process yet.
{% endif %}
{% endfor %}
{% endif %} {% if quote %}
Proposal Summary
Commercial Details
Open Quote
Quote Opportunity Currency Subtotal Tax Total
{{ quote.quote_code }} {% if opp %}
{{ opp.title }}
{{ opp.company or '—' }}
{% else %} — {% endif %}
{{ quote.currency or 'INR' }} {{ indian_amount(quote.subtotal or 0) }} {{ indian_amount(quote.tax or 0) }} {{ indian_amount(quote.total_amount or quote.total or 0) }}
{% endif %} {% if can_view_ticketing and rework_ticket_count.value > 0 %}
Customer Feedback / Rework
Rework Tickets
{% if can_create_ticket %} Raise New Ticket {% endif %}
{% for svc in jobcard.services %} {% if svc.rework_tickets is defined %} {% for t in svc.rework_tickets %} {% endfor %} {% endif %} {% endfor %}
Ticket No Service Line Type Priority Status Raised By Date Action
{{ t.ticket_no }} {{ svc.service_name or '—' }} {% if svc.quote_item %}
{{ svc.quote_item.item_name }}
{% endif %}
{{ t.feedback_type }} {% if t.priority == "Critical" %} Critical {% elif t.priority == "High" %} High {% else %} {{ t.priority }} {% endif %} {{ t.status }} {{ t.raised_by.name if t.raised_by else '—' }} {{ t.created_at.strftime('%d-%m-%Y %I:%M %p') if t.created_at else '—' }} Open
{% endif %} {% if jobcard.transfer_history.count() > 0 %}
Transfer History
{% for row in jobcard.transfer_history.order_by('transferred_at').all()|reverse %} {% endfor %}
From To Transferred By Remark Date
{{ row.from_user.name if row.from_user else '—' }} {{ row.to_user.name if row.to_user else '—' }} {{ row.transferred_by.name if row.transferred_by else '—' }} {{ row.remark }} {{ row.transferred_at.strftime('%d-%m-%Y %I:%M %p') if row.transferred_at else '—' }}
{% endif %}
{% if not client_deadline and can_manage_jobcard %} {% endif %} {% if can_request_deadline_extension %} {% endif %} {% endblock %}