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

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

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

@endif
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))}}
{!! Form::model($order, ['method' => 'PATCH','route' => ['orders.update', $order->id],'files'=> true, 'id' => 'order_edit_form']) !!} @php $x = 1; @endphp @if($order->products) @if($order->order_placed == Auth::user()->id)
@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' => 'Count','class' => 'form-control form-control-sm product-label', 'id' => 'label_count', 'min'=>"1")) !!}
@endif @foreach($order->products as $dkey => $details)
{{$details->products->product_code}}
|
{{$details->products->product_name}}
|
{{$details->products->brand_name}}
|
{{$details->products->model_number}}
@if($details->products->category)
|
{{$details->products->category->category}}
@endif
{{$details->products->description}}
{{--
--}} @php $x++; @endphp @endforeach
@else @if($order) @foreach($order->products as $dkey => $details) @php $x++; @endphp @endforeach
# Product Details Label Count
{{$x}}
{{$details->products->product_code}}
|
{{$details->products->product_name}}
|
{{$details->products->brand_name}}
|
{{$details->products->model_number}}
@if($details->products->category)
|
{{$details->products->category->category}}
@endif
{{$details->products->description}}
{{$details->label_count}}
@endif @endif @endif
@if($company->id == $order->company_id)
@php $temp_verifier = []; @endphp
@php $temp_approver = []; @endphp
{!! 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
@php $temp_approver = []; @endphp
{!! 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