@extends('layouts.master') @section('css') @section('title') {{ __('home.manufacturing_order') }} - {{ $order->order_number }} @stop @endsection @section('content')

{{ __('home.manufacturing_order') }}: {{ $order->order_number }}

@if($order->status == 'draft') {{ __('home.status_draft') }} @elseif($order->status == 'planned') {{ __('home.status_planned') }} @elseif($order->status == 'in_progress') {{ __('home.status_in_progress') }} @elseif($order->status == 'completed') {{ __('home.status_completed') }} @elseif($order->status == 'cancelled') {{ __('home.status_cancelled') }} @endif

{{ __('home.order_number') }}: {{ $order->order_number }}

{{ __('home.order_date') }}: {{ $order->order_date }}

{{ __('home.boms') }}: {{ $order->bom->code ?? '---' }} - {{ $order->bom->name ?? '' }}

{{ __('home.finished_product') }}: {{ $order->finishedProduct->product_name ?? $order->finishedProduct->name ?? '---' }}

{{ __('home.planned_qty') }}: {{ (float) $order->planned_quantity }}

{{ __('home.produced_qty') }}: {{ (float) ($order->produced_quantity ?? 0) }}

{{ __('home.item_notes') }}: {{ $order->notes ?? '---' }}


{{ __('home.warehouses') }}
{{ __('home.raw_warehouse') }}: {{ $order->rawMaterialWarehouse->name ?? '---' }}
{{ __('home.wip_warehouse') }}: {{ $order->wipWarehouse->name ?? '---' }}
{{ __('home.fg_warehouse') }}: {{ $order->finishedGoodsWarehouse->name ?? '---' }}
{{ __('home.planned_materials') }}
@foreach($order->materialIssues as $key => $item) @endforeach
# {{ __('home.raw_material') }} {{ __('home.total_planned_qty') }} {{ __('الكمية المصروفة فعلياً') }}
{{ $key + 1 }} {{ $item->rawMaterial->product_name ?? $item->rawMaterial->name ?? '---' }} {{ (float) $item->planned_quantity }} {{ (float) ($item->issued_quantity ?? 0) }}
@endsection