@extends('print.layout') @section('title', 'Production_Order_' . ($order['job_no'] ?? 'N/A') . '_' . ($order['order_date'] ?? date('d-m-Y'))) @section('content')
Production Order
{{-- Production Order Header Information --}}
Job No: {{ $order['job_no'] ?? 'N/A' }}
@if(isset($order['description']) && !empty($order['description']))
Description: {{ substr($order['description'], 0, 100) }}{{ strlen($order['description']) > 100 ? '...' : '' }}
@endif
Order Date: {{ $order['order_date'] ?? 'N/A' }}
@if(isset($order['due_date']) && !empty($order['due_date']))
Delivery Date: {{ $order['due_date'] }}
@endif
{{-- Production Items Table --}} @if(isset($orderItem) && $orderItem->count() > 0)

Production Items

@if($orderItem->count()) @php $product_id = 0; @endphp @foreach($orderItem as $item) @php $key = $item->product_type_id . '_' . $item->product_stage_id; $finishedStock = $stockData[$key]['finished_stock'] ?? 0; $unfinishedStock = $stockData[$key]['unfinished_stock'] ?? 0; @endphp @if($item->product_id == $product_id) @else @php $product_id = $item->product_id; @endphp @endif @endforeach @endif
@endif {{-- Additional Notes Section --}} @if(isset($order['description']) && !empty($order['description']))

Production Notes

{!! nl2br(e(strip_tags($order['description']))) !!}
@endif @endsection