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 %}

Corrective & Preventive Action (API Q1)

Root Cause Category {{ ncr.root_cause_category.name if ncr.root_cause_category else "—" }} Recurring Issue {% if ncr.is_recurring %}Yes{% if related_ncr_numbers %} — {{ related_ncr_numbers | join(", ") }}{% endif %} {% else %}No{% endif %}
Corrective Action Required {% if ncr.corrective_action_required is none %}Not answered {% elif ncr.corrective_action_required %}Yes{% else %}No{% endif %} Justification {{ ncr.corrective_action_justification or "—" }}
Action Owner {{ ncr.corrective_action_owner.display_name if ncr.corrective_action_owner else "—" }} Due Date {{ ncr.corrective_action_due_date.strftime("%Y-%m-%d") if ncr.corrective_action_due_date else "—" }}
Effectiveness {% if ncr.effectiveness_result == "effective" %}Verified Effective {% elif ncr.effectiveness_result == "not_effective" %}Not Effective {% else %}Pending verification{% endif %} Verified By / At {% if ncr.effectiveness_verified_by %} {{ ncr.effectiveness_verified_by.display_name }} — {{ ncr.effectiveness_verified_at.strftime("%Y-%m-%d %H:%M") }} UTC {% else %}—{% endif %}
{% if ncr.root_cause %}
Root Cause: {{ ncr.root_cause }}
{% else %}
No root cause recorded.
{% endif %} {% if ncr.corrective_action_plan %}
Corrective Action Plan: {{ ncr.corrective_action_plan }}
{% endif %} {% if ncr.effectiveness_notes %}
Verification Notes: {{ ncr.effectiveness_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 "" }}