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

Order # {{$order->id}}

PLACED BY : @if($company->id == 1 && $order->print_status == 1 && $order->companyCreator) {{$order->companyCreator->name}} @else {{$order->creator->name}} @endif
VERIFIER : @if($company->id == 1 && $order->print_status == 1 && $order->companyVerifier) {{$order->companyVerifier->name}} @else {{$order->userVerifier->name }} @endif
APPROVER : @if($company->id == 1 && $order->print_status == 1 && $order->companyApprover) {{$order->companyApprover->name}} @else {{$order->approver->name }} @endif
@if($order->status == -1 && $order->print_status == 0 ) Approver Rejection @elseif($order->status == 0 && $order->print_status == 0 ) Rejected @elseif($order->status == 1 && $order->print_status == 0) Veification Pending @elseif($order->status == 2 && $order->print_status == 0) Verified @elseif($order->status == 3 && $order->print_status == 0) Approved @elseif($order->status == 4 && $order->print_status == 0) Printed' @elseif($order->company_print_status == -1 && $order->print_status == 1 ) Company Approver Rejection @elseif($order->company_print_status == 0 && $order->print_status == 1 ) Company Rejected @elseif($order->company_print_status == 1 && $order->print_status == 1) @if($company->id != 1) Transfered to getOroigin @elseif($order->company_verifier && $order->company_approver ) Veification Pending @else New Order @endif @elseif($order->company_print_status == 2 && $order->print_status == 1) Verified @elseif($order->company_print_status == 3 && $order->print_status == 1) Approved @elseif($order->company_print_status == 4 && $order->print_status == 1) Printed @endif
ORDER DATE : {{date('d-m-Y', strtotime($order->date))}}
@php $x = 1; @endphp @if($order) @foreach($order->products as $dkey => $details) @php $x++; @endphp @endforeach
# Product Details Label Count
{{$x}}
@if($details->products->product_code !='')
{{$details->products->product_code}}
@endif @if($details->products->product_name !='')
|
{{$details->products->product_name}}
@endif @if($details->products->brand_name !='')
|
{{$details->products->brand_name}}
|
@endif @if($details->products->model_number !='')
{{$details->products->model_number}}
@endif @if($details->products->category)
|
{{$details->products->category->category}}
@endif
{{$details->products->description}}
{{$details->label_count}}
@endif
@if($order->order_note != '')

{{$order->order_note}}

@endif @if($order->verifier_note != '' && !Auth::user()->hasRole(4))

{{$order->verifier_note}}

@endif @if($order->approver_note != "")

{{$order->approver_note}}

@endif @if($order->company_order_note != '')

{{$order->company_order_note}}

@endif @if($order->verifier_note != '')

{{$order->company_verifier_note}}

@endif @if($order->company_approver_note != "")

{{$order->company_approver_note}}

@endif @if(Auth::user()->id == $order->verifier && Auth::user()->id == $order->signatory) {!! Form::open(array('route' => 'orders_approve','method'=>'POST','id' => 'order_form' , "class" => "col-xs-12 col-sm-12 col-md-12")) !!}
@if($errors->has('receiver')) {{ $errors->first('receiver') }} @endif
{!! Form::textarea('approver_note', $order->approver_note, array('placeholder' => 'Approver Note','class' => 'form-control form-control-sm', 'id' => 'tags_create', 'rows' => '2')) !!}
@if(($order->status == 0 || $order->status == 1 || $order->status == 3) && $order->print_status == 0) @if(!$order->company_verifier && !$order->company_verifier)
@if($errors->has('declaration')) {{ $errors->first('declaration') }} @endif

@endif @else @endif {!! Form::close() !!} @elseif(Auth::user()->hasRole(4) && (Auth::user()->id == $order->verifier) && ($order->status == 0 ||$order->status == 1 || $order->status == 2)) {!! Form::open(array('route' => 'orders_verify','method'=>'POST','id' => 'order_form' , "class" => "col-xs-12 col-sm-12 col-md-12")) !!}
{!! Form::textarea('verifier_note', $order->verifier_note, array('placeholder' => 'Verifier Note','class' => 'form-control form-control-sm', 'id' => 'tags_create', 'rows' => '2')) !!}
{!! Form::close() !!} @elseif(Auth::user()->hasRole(4) && (Auth::user()->id == $order->company_verifier) && ($order->print_status == 1) && ($order->status == 3 || $order->company_print_status == 1 || $order->company_print_status == 2) && ($order->company_verifier != $order->company_approver)) {!! Form::open(array('route' => 'orders_verify','method'=>'POST','id' => 'order_form' , "class" => "col-xs-12 col-sm-12 col-md-12")) !!}
{!! Form::textarea('verifier_note', ($order->company_verifier_note?$order->company_verifier_note:'') , array('placeholder' => 'Verifier Note','class' => 'form-control form-control-sm', 'rows' => '2')) !!}
{!! Form::close() !!} @elseif(Auth::user()->id == $order->company_verifier && Auth::user()->id == $order->company_approver) {!! Form::open(array('route' => 'orders_approve','method'=>'POST','id' => 'order_form' , "class" => "col-xs-12 col-sm-12 col-md-12")) !!}
{!! Form::textarea('approver_note', $order->company_approver_note, array('placeholder' => 'Approver Note','class' => 'form-control form-control-sm', 'rows' => '2')) !!}
@if($errors->has('receiver')) {{ $errors->first('receiver') }} @endif
@if($order->company_print_status == 1)

@if($errors->has('declaration')) {{ $errors->first('declaration') }} @endif

@else
@endif {!! Form::close() !!} @else @endif
@include('components.dashboard.vertical')
@endsection