@extends('page') @section('content')

Edit Order # {{$order->id}}

@if (count($errors) > 0)
Whoops! There were some problems with your input.

@endif
{!! Form::model($order, ['method' => 'PATCH','route' => ['orders.update', $order->id],'files'=> true]) !!} @php $x = 1; @endphp @if($order->products) @if($order->order_placed == Auth::user()->id)
@foreach($order->products as $dkey => $details)
@php $x++; @endphp @endforeach @else @foreach($order->products as $dkey => $details) @php $x++; @endphp @endforeach
# Product Name Label Count
{{$x}}

{{$details->products->product_code}}

|

{{$details->products->product_name}}

{{$details->products->description}}

{{$details->label_count}}
@endif @endif @if($order->order_placed == Auth::user()->id)
{!! Form::text('product_name[]', null, array('placeholder' => 'Product Name','class' => 'form-control form-control-sm product-name', 'id' => 'tags_create')) !!}
{!! Form::number('label_count[]', null, array('placeholder' => 'Label Count','class' => 'form-control form-control-sm product-label', 'id' => 'label_count', 'min'=>"1")) !!}
@endif
@if($company->id == $order->company_id)
@php $temp_verifier = []; @endphp @foreach($verifiers as $id => $verifier) @php $temp_verifier[$verifier->id] = $verifier->name @endphp @endforeach {!! Form::select('verifier', $temp_verifier, $order->userVerifier->id ,array('class' => 'form-control form-control-sm')) !!}
@php $temp_approver = []; @endphp @foreach($approvers as $id => $approver) @php $temp_approver[$approver->id] = $approver->name @endphp @endforeach {!! Form::select('approver', $temp_approver, $order->approver->id ,array('class' => 'form-control form-control-sm')) !!}
{!! Form::textarea('order_note', $order->note, array('placeholder' => 'Order Note','class' => 'form-control form-control-sm', 'id' => 'tags_create', 'rows' => '2')) !!}
@else
@php $temp_verifier = []; @endphp @foreach($verifiers as $id => $verifier) @php $temp_verifier[$verifier->id] = $verifier->name @endphp @endforeach {!! Form::select('verifier', $temp_verifier, ($order->companyVerifier?$order->companyVerifier->id:'') ,array('class' => 'form-control form-control-sm')) !!}
@php $temp_approver = []; @endphp @foreach($approvers as $id => $approver) @php $temp_approver[$approver->id] = $approver->name @endphp @endforeach {!! Form::select('approver', $temp_approver, ($order->companyApprover? $order->companyApprover->id : '') ,array('class' => 'form-control form-control-sm')) !!}
{!! Form::textarea('order_note', ($order->company_order_note?$order->company_order_note:''), array('placeholder' => 'Order Note','class' => 'form-control form-control-sm', 'id' => 'tags_create', 'rows' => '2')) !!}
@endif
@if($company->id == $order->company_id) @else @endif
{!! Form::close() !!}
@include('components.dashboard.vertical')
@endsection