PESCO

Non-Conformance Report

{{ ncr.ncr_number }}
Stage: {{ stage_label }}
Generated {{ generated_at.strftime("%Y-%m-%d %H:%M") }} UTC

Request

{% if ncr.job_info %} {% endif %}
NCR Number{{ ncr.ncr_number }} Date{{ ncr.created_at.strftime("%Y-%m-%d") }}
Job Number{{ ncr.job_number }} Department{{ ncr.department.name }}
Deviation Category{{ ncr.deviation_category.name }} Requester{{ ncr.requester.display_name }}
Disposition Authority{{ ncr.disposition_authority.display_name }} Work Order{{ ncr.work_order or "—" }}
Part (ERP) {{ ncr.job_info.part_id or "—" }} {{ ncr.job_info.part_description or "" }} Customer (ERP){{ ncr.job_info.customer_name or "—" }}
{{ ncr.deviation_detail }}

Disposition

QC Authority{{ ncr.qc_authority or "—" }} Secondary Review {% if ncr.secondary_review_needed is none %}— {% elif ncr.secondary_review_needed %}Yes — {{ ncr.secondary_authorities | map(attribute="display_name") | join(", ") or "unassigned" }} {% else %}No{% endif %}
{% if ncr.disposition_notes %}
{{ ncr.disposition_notes | safe }}
{% else %}
No disposition notes recorded.
{% endif %}

Operations

Operations Complete {% if ncr.operations_complete %}Yes{% else %}Pending{% endif %} Completed By / At {% if ncr.operations_completed_by %} {{ ncr.operations_completed_by.display_name }} — {{ ncr.operations_completed_at.strftime("%Y-%m-%d %H:%M") }} UTC {% else %}—{% endif %}

QC Inspection

QC Approval {{ ncr.qc_approval | capitalize if ncr.qc_approval else "—" }} QC Closed {% if ncr.qc_closed %}Yes — {{ ncr.qc_closed_by.display_name }}, {{ ncr.qc_closed_at.strftime("%Y-%m-%d %H:%M") }} UTC {% else %}Pending{% endif %}
{% if ncr.inspection_notes %}
{{ ncr.inspection_notes }}
{% endif %}

Costing

Labor {% if ncr.labor_cost is not none %}${{ "%.2f" | format(ncr.labor_cost) }}{% else %}—{% endif %} Material {% if ncr.material_cost is not none %}${{ "%.2f" | format(ncr.material_cost) }}{% else %}—{% endif %}
Service {% if ncr.service_cost is not none %}${{ "%.2f" | format(ncr.service_cost) }}{% else %}—{% endif %} Other {% if ncr.other_cost is not none %}${{ "%.2f" | format(ncr.other_cost) }}{% else %}—{% endif %}
Total Cost of Nonconformance {% if ncr.total_cost is not none %}${{ "%.2f" | format(ncr.total_cost) }}{% else %}—{% endif %}
{% if ncr.closed_at %}

Closed by {{ ncr.closed_by.display_name }} on {{ ncr.closed_at.strftime("%Y-%m-%d %H:%M") }} UTC.

{% endif %} {% if images or other_files %}

Attachments ({{ images | length + other_files | length }})

{% if images %}
{% for img in images %}
{{ img.filename }}
{{ img.filename }} — {{ img.uploaded_by }}, {{ img.uploaded_at.strftime("%Y-%m-%d") }}
{% endfor %}
{% endif %} {% if other_files %} {% for f in other_files %} {% endfor %}
FileUploaded ByDateSize
{{ f.filename }}{{ f.uploaded_by }} {{ f.uploaded_at.strftime("%Y-%m-%d %H:%M") }}{{ f.size_kb }} KB
{% endif %} {% endif %}

Workflow History

{% for t in ncr.transitions %} {% endfor %}
Date (UTC)ActionFromToByNote
{{ t.acted_at.strftime("%Y-%m-%d %H:%M") }} {{ t.action.replace("_", " ") | title }} {{ stage_labels[Stage(t.from_stage)] if t.from_stage else "—" }} {{ stage_labels[Stage(t.to_stage)] }} {{ t.acted_by.display_name }} {{ t.note or "" }}