@extends('layouts.stores_dashboard_layout') @section('title') {{trans('stores_dashboard.order_details')}} @endsection @section('content')
{{trans('stores_dashboard.order_details')}}

{{trans('stores_dashboard.orders') . ' / ' }} {{ in_array(request()['status'], $statusArr) ? trans('stores_dashboard.' . request()['status']) : trans('stores_dashboard.new_orders') }} {{ ' / ' . trans('stores_dashboard.order_details')}}

@if($order->store_status!='rejected') @if($order->needs_delivery =='true') @if($order->store_status=='accepted' )
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_delegate')}}
@elseif($order->store_status=='prepared')
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_delegate')}}
@elseif($order->delivery_status=='reached_store')
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_delegate')}}
@else
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_delegate')}}
@endif @else @if($order->store_status=='accepted' )
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_user')}}
@elseif($order->store_status=='prepared')
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_user')}}
@elseif($order->status=='finished')
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_user')}}
@else
1 {{trans('stores_dashboard.pending')}}
2 {{trans('stores_dashboard.prepared')}}
3 {{trans('stores_dashboard.with_user')}}
@endif @endif @endif
{{trans('stores_dashboard.order_details')}}
{{trans('stores_dashboard.number')}}
{{$order->citc_referenceCode}}
{{trans('stores_dashboard.order_number')}}
{{$order->id}}
{{trans('stores_dashboard.created_at')}}
{{date('d-m-Y', strtotime($order->created_at))}}
{{trans('stores_dashboard.deliver_time')}}
{{ $order->needs_delivery == 'true' ? $order->deliver_time . trans('stores_dashboard.hour') : '--'}}
{{trans('stores_dashboard.payment_type')}}
{{trans('stores_dashboard.'.$order->payment_type)}}
@if($order->needs_delivery=='true')
{{trans('stores_dashboard.needs_delivery')}}
{{trans('stores_dashboard.yes_needs_delivery')}}
@else
{{trans('stores_dashboard.needs_delivery')}}
{{trans('stores_dashboard.receive_from_store')}}
@endif @if($order->needs_delivery=='true')
{{trans('stores_dashboard.deliver_address')}}
{{$order->receive_address}}
@endif
{{trans('stores_dashboard.order_price')}}
{{$order->price}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.delivery_price')}}
{{$order->delivery_price}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.app_percentage')}}
{{$order->app_percentage}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.added_value')}}
{{$order->added_value}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.discount')}}
{{$order->discount}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.total_price')}}
{{$order->total_price}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.notes')}}

{{ $order->description != "" ? $order->description : trans('stores_dashboard.empty_desc') }}

{{trans('stores_dashboard.products')}}
@foreach($products as $product)
{{$product->name}}
{{$product->price}} {{trans('stores_dashboard.sar')}}
{{trans('stores_dashboard.quantity')}} : {{$product->qty}}


@endforeach
{{trans('stores_dashboard.user_info')}}
{{$order->user?->name}}

{{$order->user?->phone}}

@if($order->delegate)
{{trans('stores_dashboard.delegate_info')}}
{{$order->delegate?->name}}

{{$order->user?->phone}}

@endif @if($order->store_status=='pending' && $order->status=='open')
@csrf
@csrf
@elseif($order->store_status=='accepted')
@csrf
@elseif($order->store_status=='prepared') @if($order->needs_delivery=='false'&&$order->delivery_status !='delivered')
@csrf
@endif @endif @endsection @section('scripts') @endsection