@extends('layouts.admin.app') @section('page-title') {{ __('Orders') }} @endSection @section('page-nav-title')

{{ __('Orders') }}

{{ __('All Orders') }}

@endsection @section('css-links') @endsection @section('content') @include('includes.dialog')

{{ __('Order Details') }} #{{ $order->id }}

{{ $order->getStatusText() }}

{{-- @if (in_array((int) $order->status, [-1, 0, 1])) --}} {{--
--}} {{-- @include("admin.order.parts.forms.assign_technician") --}} {{--
--}} {{-- @endif --}} {{-- @if ($order->activation == '0') --}} {{-- --}} {{-- @endif --}}
{{-- @if (in_array((int) $order->status, [-1, 1, 2, 4])) --}} {{--
--}} {{--
$order->id])}}" method="POST"> --}} {{-- @csrf --}} {{-- --}} {{--
--}} {{--
--}} {{-- @endif --}} {{-- @if (in_array((int) $order->status, [2, 4])) --}} {{--
--}} {{--
$order->id, "type" => "cancel-assign"])}}" method="POST"> --}} {{-- @csrf --}} {{-- --}} {{--
--}} {{--
--}} {{-- @endif --}}

{{ __('General Information') }}

{{ __('Full Name') }}
{{ $order->user->company_name }}
{{ __('Phone Number') }}
{{ $order->user->phone_number }}
{{ __('Created') }}
{{ date('Y-m-d h:i A', strtotime($order->created_at)) }}
{{-- --}} {{--
--}} {{--
{{__('Image')}}
--}} {{--
--}} {{--
@if ($notes->getFirstMediaFile()) @endif
--}} {{--
--}} {{-- --}} {{--
--}} {{--
{{__('Date Time')}}
--}} {{--
--}} {{--
{{ $order->order_day }} | {{date("h:i A", strtotime($order->order_time))}}
--}} {{--
--}} {{-- --}} {{--
--}} {{--
{{__('Order Location From')}}
--}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{--
{{$order->order_location_beck_up_name}}
--}} {{--
--}} {{-- --}} {{-- --}}
{{ __('Order Location To') }}
{{ $order->location_to }}
{{ __('Number of Product') }}
{{ count($order->orderDetails) }}
{{ __('Delivery Cost') }}
{{ $delivery_price . ' JD' }}
{{ __('Order Amount') }}
{{ $total_price . ' JD' }}
{{ __('Total Amount') }}
{{ $total_price + $delivery_price . ' JD' }}
{{-- --}} {{--
--}} {{--
{{__('Payment Method')}}
--}} {{--
--}} {{--
{{$order->paymentMethod->name}}
--}} {{--
--}} {{-- @if (in_array($order->status, [1, 2, 3, 4])) --}} {{-- --}} {{--
--}} {{--
{{__("Driver")}}
--}} {{--
--}} {{--
{{$order->acceptOrder()->technician->full_name}}
--}} {{--
--}} {{-- @elseif(in_array($order->status, [0])) --}} {{-- --}} {{--
--}} {{--
{{__("Driver")}}
--}} {{--
--}} {{--
{{$order->canceled->user->full_name}}
--}} {{--
--}} {{-- @endif --}} {{-- @if ($order->status == 3) --}} {{-- --}} {{-- @if ($order->rating && $order->rating->number_rating != 0) --}} {{--
--}} {{--
{{__('Driver rating')}}
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{-- @if (in_array($order->rating->number_rating, [1, 2, 3])) --}} {{--

{{$order->rating->reason}}

--}} {{-- @endif --}} {{-- @else --}} {{--
--}} {{--
{{__('Driver rating')}}
--}} {{--

{{__("There's No Rating")}}

--}} {{--
--}} {{-- @endif --}} {{--
--}} {{-- @endif --}}

{{-- @if ($order->attachment) --}} {{--
--}} {{--
--}} {{--
--}} {{--

{{__("Attachments")}}

--}} {{--
--}} {{--
{{__("Certificate of origin")}}
--}} {{-- --}} {{--
{{__("Packing list")}}
--}} {{-- --}} {{--
{{__("Customs broker authorization")}}
--}} {{-- --}} {{--
{{__("Invoice certified by the chamber of commerce")}}
--}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- @endif --}} {{-- @if ($order->type == 'n') --}}

{{ __('Products') }}

{{-- @php --}} {{-- $different = []; --}} {{-- @endphp --}} @foreach ($order->orderDetails as $product) {{-- @php --}} {{-- array_push($different , $orderService->service_id); --}} {{-- @endphp --}}

{{ $product->product->{'name_' . \Illuminate\Support\Facades\App::getLocale()} }}

{{ __('Quantity : ') }} {{ $product->quantity }}

{{ __('Price : ') }} {{ $product->product->origin_price }}

@if (!$product->previous_year)

{{ __('Total : ') . $product->product->origin_price * $product->quantity }}

@endif
@if ($product->previous_year)
{{ __('Properties') }}
    {{-- @foreach ($orderService->properties as $property) --}}
  • {{ __('previous Year') }}
    {{ $product->previousYears->year_available }}
    {{ __('discount') }} : {{ $product->previousYears->discount * 100 . '%' }}
    @php $total = $product->quantity * $product->product->origin_price; $discount = $total * $product->previousYears->discount; $priceAfterDiscount = $total - $discount; @endphp
    {{ __('Total Price ') }} : {{ $priceAfterDiscount }}
  • {{-- @endforeach --}}
@endif {{-- @if ($orderService->image) --}} {{--
{{__("Images")}}
--}} {{--
    --}} {{--
  • --}} {{--
    --}} {{-- {{__("Order Image")}} --}} {{--
    --}} {{--
    --}} {{-- --}} {{--
    --}} {{--
  • --}} {{--
--}} {{-- @endif --}}
@endforeach {{-- @if ($order->invoice) --}} {{-- @foreach ($order->invoice->services as $orderService) --}} {{-- @if (!in_array($orderService->service_id, $different)) --}} {{-- --}} {{--
--}} {{--

{{$orderService->service->full_name}}

--}} {{--
--}} {{--
--}} {{-- @endif --}} {{-- @endforeach --}} {{-- @endif --}} {{-- @if ($order->status == 0) --}} {{--
  • --}} {{--
    --}} {{--
    $order->id])}}" method="post"> --}} {{-- @csrf --}} {{-- --}} {{--
    --}} {{--
    --}} {{--
  • --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
    --}} {{--

    {{__("Control")}}

    --}} {{--
    --}} {{--
    $order->id])}}" method="post"> --}} {{-- @csrf --}} {{-- --}} {{--
    --}} {{--
    --}} {{--
    $order->id])}}" method="post"> --}} {{-- @csrf --}} {{-- --}} {{--
    --}} {{--
    --}} {{-- @endif --}}
    {{--

    {{__("Control")}}

    --}} @if ($order->status == 0)
    @csrf
    {{--
    @csrf
    --}} {{-- --}}
    @endif
    {{-- @else --}} {{-- --}} {{-- @endif --}} {{-- @if ($order->invoice) --}} {{--
    --}} {{--
    --}} {{-- @include("admin.order.parts.invoice", ["invoice" => $order->invoice]) --}} {{--
    --}} {{-- @endif --}} {{-- @if ($order->status == 0) --}} {{--
    --}} {{--
    --}} {{--
    --}} {{-- @include("admin.order.parts.cancel_info", ["canceled" => $order->canceled]) --}} {{--
    --}} {{--
    --}} {{-- @endif --}}
    @endsection @section('scripts') @endsection