# TODO - ProductionController workflow fix

## Completed
- Updated `PaymentController::recordPayment()` so queue creation is triggered only if PO order meets DP>=30% or Lunas.
- Began refactor `ProductionController` to add `start()` and `qc()` workflow actions.

## Pending / Fix Required
- `app/Controllers/Admin/ProductionController.php` currently has structural corruption (duplicate/misplaced `create`/`delete` methods, and missing `updateProgress` method for `Routes`).
- Remove duplicate/incorrect blocks so class compiles.
- Re-add a single `updateProgress($id)` method (used by route `production/update-progress/(:num)`).
- Ensure only one `delete($id)` method exists.
- Ensure `create($orderId)` is present and not broken.
- After compile, align status mapping between:
  - `productions.status` (waiting/process/completed)
  - `production_queue.status` (antrian/produksi/selesai)
  - `orders.production_status` (waiting/process/completed)
- Confirm history writes into `production_queue_history` for status transitions.

## Verification
- Run PHP lint on modified files.
- Run unit tests: `phpunit` (if available in project).

