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

Order List

@if(Session::has('company')) @if(Session::get('company')==1)
{!! Form::select('companies', $all_companies,Session::get('temp_company'), array('class' => 'form-control form-control-sm','id' => 'company_id')) !!} {!! Form::close() !!}
@else @endif @endif
@if($message = Session::get('success')) @endif @if($message = Session::get('fail')) @endif
{{-- @foreach ($orders as $key => $order) @php ++$i @endphp @if($company->id == 1 && $order->print_status == 1) @else @endif @if($company->id == 1) @endif @endforeach --}}
Sl No Order ID Date Total Labels Verifier Approver Status Action
{{ $i }} #{{ $order->id }} {{date("d-M-Y", strtotime($order->date))}} {{$order->products->sum('label_count')}}{{ ($order->companyVerifier?$order->companyVerifier->name: '--') }} {{ ($order->companyApprover?$order->companyApprover->name: '--') }}{{ ($order->userVerifier?$order->userVerifier->name: '--') }} {{ ($order->approver?$order->approver->name: '--') }}{{$order->company->company_name}} @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 @else New Order @endif @elseif($order->company_print_status == 2 && $order->print_status == 1) @if($company->id != 1) Company Verified @else Verified @endif @elseif($order->company_print_status == 3 && $order->print_status == 1) @if($company->id != 1) Company @else Approved @endif @elseif($order->company_print_status == 4 && $order->print_status == 1) Printed @endif
@if($order->status == 1 && Auth::user()->hasRole(3) && ($order->order_placed == Auth::user()->id))   @elseif($order->status == 3 && $company->id == 1 && Auth::user()->hasRole(3) && $order->company_print_status == 1 && $order->print_status == 1) @endif   @if(Auth::user()->hasRole(5) && ($order->status == 2 ||$order->status == -1 ) && ($order->signatory == Auth::user()->id))   @elseif(Auth::user()->hasRole(5) && $company->id == 1 && $order->print_status == 1 && ($order->company_print_status == 2 ||$order->company_print_status == -1 ) && ($order->company_approver == Auth::user()->id))   @endif @if((Auth::user()->id == $order->receiver && $order->status == 3 && $order->print_status == 0)) @elseif($company->id == 1 && $order->status == 3 && $order->company_print_status == 3 && $order->print_status == 1 && Auth::user()->hasRole(6)) @endif
@endsection