The Job Card (also called Production Order or Work Order in other ERPs) is the master shop-floor document for a single batch. It travels with the kit from the storeroom door, sits on the machine clipboard for the duration of the run, and is signed off when the run completes. It carries the BOM consumption record, the routing (Setup → Run → QC → Pack), the labour assignment for the shift, an inline QC inspection checklist (Visual / Dimensional / Weight / Packaging / Label), an hourly tally grid, and a 3-signature block.
The Job Card mirrors the Sage X3 "Manufacturing Order Tracking", Syspro "Job Slip", SAP S/4HANA "Production Order Confirmation" and NetSuite "Manufacturing Work Order Traveler". It is the single most data-rich document in the production lifecycle — everything from cycle time and yield to scrap and downtime ties back to it.
Once a batch transitions to IN_PROGRESS via POST /api/production-batches/:id/start, the system snapshots all dimensions, builds a default 4-stage routing, and the floor has a printable Job Card available within 5 seconds.
PLANNED → IN_PROGRESS when the supervisor releases the run to the floor.status meta field.The JobCard spec (frontend/js/erp-templates/job-card.js) is built from the live batch row + its line snapshot + labour assignments + machine register. Each row is wired into a real column.
| Field on document | API endpoint | DB table.column | Example value |
|---|---|---|---|
| Job Card / PO Ref | POST /api/production-batches | production_batches.batch_ref | PO-BATCH-2026-0481 |
| FG product code & name | GET /api/products | products.code & products.name | A4_72PG_FM · A4 72-page FM |
| Planned qty | POST /api/production-batches | production_batches.planned_qty | 5 000 |
| Actual qty | POST /api/production-batches/:id/complete | production_batches.actual_qty | 4 940 |
| BOM version | GET /api/bom/:id | bom_headers.version | v3 |
| Machine code & name | GET /api/machines | machines.code & machines.name | RUL_4 · Ruling 4 |
| Department | via FK | departments.code via machines.department_id | RULING |
| Shift | POST /api/production-batches | production_batches.shift | DAY / NIGHT |
| Planned / actual start & end | auto-stamped | production_batches.started_at, completed_at | 2026-05-08 06:30 / 14:10 |
| Status | state machine | production_batches.status | IN_PROGRESS |
| Customer / SO ref | GET /api/sales-orders | sales_orders.order_no | SO-2026-1142 |
| BOM consumption row · required | snapshot | production_batch_lines.required_qty | 217.350 |
| BOM consumption row · issued | posted on start | production_batch_lines.consumed_qty | 217.450 |
| BOM consumption row · variance | derived | computed in JobCard._bomRows() | +0.100 |
| Issued from WH | GET /api/warehouses | warehouses.code | RM-MAIN / PSTAT |
| Issued by clock | captured on MR | employees.clock_no | 1042 |
| Routing (Setup / Run / QC / Pack) | default routing | generated client-side via _defaultRouting(batch) | 30 / 60+ / 20 / 25 min |
| Labour assignments · Operator / Assistant / Setter / Packer | GET /api/labour | labour_assignments.employee_clock_no × role_on_floor | OPERATOR · clock 1042 |
| Operator name | via FK | employees.first_name + last_name | P. Mokoena |
| QC checklist (5 points) | printed blank | captured on paper, then digitised at FGRN | VIS / DIM / WGT / PKG / LBL |
| Hourly output grid (8 slots) | printed blank | captured on paper · digitised on Tally Sheet | H+1 … H+8 |
| Created by | req.user | users.email via created_by | planner@palmstat.co.za |
POST /api/production-batches/:id/start. The endpoint loops over production_batch_lines and posts txn_type=ISSUE rows; status flips to IN_PROGRESS and started_at stamps.Print Job Card. The frontend calls JobCard.build(batch, bomLines, labourAssignments).print(). Output: a single A4 page with header, BOM consumption table, routing, labour grid, QC checklist, hourly tally grid, signatures.products. Packer signs the PACK row of the routing.POST /api/production-batches/:id/complete with actual_qty.PROD_IN inventory transaction for the FG product against the target FG warehouse and computes yield_pct, wastage_pct, shortfall_qty. Status → COMPLETED.production_batches via req.user.document_links ties the PDF to entity_type='production_batch', entity_id=batch.id. Retention 7 years.| Action | Admin | Planner | Supervisor | Operator | QC / Maintenance |
|---|---|---|---|---|---|
| Generate this doc | ✓ | ✓ | ✓ | – | ✓ (read) |
| Start the batch (POST ·/start) | ✓ | – | ✓ | – | – |
| Sign QC checklist | ✓ | – | – | – | ✓ (QC) |
| Complete the batch (POST ·/complete) | ✓ | – | ✓ | – | – |
| Reprint after archive | ✓ | ✓ | ✓ | ✓ | ✓ |
| Cancel batch | ✓ | – | – | – | – |
Permission gate enforced by requireRole('admin','planner','supervisor') on the start / complete endpoints. Cancellation is admin-only.
Happy path: Planned 5 000 units, achieved 4 940 with 60 units of scrap. Yield 98.8%. QC passes all 5 checklist items, supervisor signs, FGRN posts cleanly. Cycle time within +5% of plan.
Happy path: Ruling shaft fails at H+3. Maintenance logs a machine_breakdowns row with the bd_ref. Supervisor pauses the line, downtime is captured. Once repaired, run resumes; Job Card carries a hand-written note "Breakdown BD-ref · 45 min". WIP variance flag fires (+20% over plan).
Sad path: Breakdown is not logged. Cycle-time variance shows +30% but no explanation; OEE for the machine is unfairly hit. Recovery: back-fill machine_breakdowns after the fact.
Happy path: QC inspector ticks FAIL on Dimensional check. Line halts immediately. NCR raised, root cause identified (folder offset), batch routed to rework. A REWORK Job Card is reprinted; original is filed with the NCR.
Sad path: FAIL is overlooked, batch makes it to FGRN and dispatch. Customer returns goods. Recovery: customer return triggers a reverse PROD_OUT + scrap, NCR opens with a CAPA and the original QC inspector is retrained.
Happy path: Batch crosses Day → Night boundary. Day operator signs the H+1 to H+6 grid, Night operator picks up at H+7 with a fresh row of initials. Supervisor at handover countersigns the labour grid to confirm the swap.
machine_breakdowns for any pause events
| Stage | Target | Owner | Escalation |
|---|---|---|---|
| Setup → First-off OK | 30 min | Setter | Maintenance + Supervisor |
| QC inline sample | 1-of-100 units | QC Inspector | Quality Manager · raise NCR |
| Cycle time vs plan | +/- 10% | Supervisor | WIP Report variance flag at +20% |
| Sign-off (3 roles) | Within 60 min of complete | Planner / Sup / QC | Production Manager |
| Scan & archive | End of shift | Supervisor | Operations Director |