Combine per-stage material Pass/Fail into the final GRN QC status.
Expression
Material = any(FAIL at any stage) ? FAIL : PASSStatus = all PASS → QC_PASSEDStatus = all FAIL → QC_FAILEDStatus = mixed → PARTIAL_PASSInputs
Stage_result
PASS / FAIL for each (stage × material) pair.
Output
GRN_status
QC_PASSED · QC_FAILED · PARTIAL_PASS
Worked Example
Stages
Yarning ✓ · Weaving ✓ · Dyeing ✕ · Finishing ✓
Material
Cotton 60%
Result:Material: FAIL → GRN: PARTIAL_PASS