@extends('admin.layout.master') @section('css') @endsection @section('css') @endsection @section('content')
{{-- start order details --}}
{{ __('admin.show') }} - {{ __('admin.service_order') }}

{{ __('admin.order_num') }}
{{ $order->order_num??'' }}
{{ __('admin.category') }}
{{ $order->category?->name??'' }}
@if($order->subCategory)
{{ __('admin.service_type') }}
{{ $order->subCategory->name??'' }}
@endif @if($order->provider)
{{ __('admin.provider_name') }}
{{ $order->provider->name??'' }}
@endif
{{ __('admin.order_status') }}
{{ $order->StatusText??'' }}
@if($order->from_date)
{{ __('admin.from_date') }}
{{ \Carbon\Carbon::parse($order->from_date)->format('d/m/Y') }}
@endif @if($order->time)
{{ __('admin.time') }}
{{ $order->time }}
@endif @if($order->people_num)
{{ __('admin.people_num') }}
{{ $order->people_num }}
@endif
{{ __('admin.order_date') }}
{{ \Carbon\Carbon::parse($order->created_at)->format('d/m/Y H:i') }}
{{-- Display pricing only if status is not waiting_offer or receiving_offers --}} @if(!in_array($order->status, [\App\Enums\OrderStatusEnum::SERVICE_WAITING_OFFER, \App\Enums\OrderStatusEnum::SERVICE_RECEIVING_OFFERS]))
{{ __('admin.pay_type') }}
{{ $order->PayTypeText??'' }}
{{ __('admin.order_pay_status') }}
{{ $order->PayStatusText }}
{{ __('admin.vat_value') }}
{{ $order->vat_amount . ' ' . __('admin.SAR') }}
{{ __('admin.service_price') }}
{{ $order->total_products . ' ' . __('admin.SAR') }}
{{ __('admin.final_total_price') }}
{{ $order->final_total . ' ' . __('admin.SAR') }}
@if($order->admin_commission > 0)
{{ __('admin.admin_commission') }}
{{ $order->admin_commission . ' ' . __('admin.SAR') }}
@endif {{-- Deposit Information --}} @if($order->deposit_amount > 0)
{{ __('admin.deposit_amount') }}
{{ number_format($order->deposit_amount, 2) . ' ' . __('admin.SAR') }}
@if($order->deposit_percentage > 0)
{{ __('admin.deposit_percentage') }}
{{ number_format($order->deposit_percentage, 2) . ' %' }}
@endif
{{ __('admin.deposit_paid') }}
@if($order->deposit_paid) {{ __('admin.yes') }} @else {{ __('admin.no') }} @endif
@if($order->remaining_amount > 0)
{{ __('admin.remaining_amount') }}
{{ number_format($order->remaining_amount, 2) . ' ' . __('admin.SAR') }}
@endif @endif @endif @if($order->notes)
{{ __('admin.notes') }}
@endif {{-- //canceled --}} @if ($order->status == \App\Enums\OrderStatusEnum::SERVICE_CANCELED && $order->cancel_reason_id !== null)
{{ __('admin.cancel_reason') }}
@endif {{-- Provider Offers Section (only for receiving_offers status) --}} @if($order->status == \App\Enums\OrderStatusEnum::SERVICE_RECEIVING_OFFERS && $order->providerOffers && $order->providerOffers->count() > 0)
{{ __('admin.provider_offers') }}
@foreach($order->providerOffers as $offer) @endforeach
{{ __('admin.provider_name') }} {{ __('admin.price') }} {{ __('admin.date') }}
{{ $offer->provider->name ?? '-' }} {{ number_format($offer->price, 2) }} {{ __('admin.SAR') }} {{ \Carbon\Carbon::parse($offer->created_at)->format('d/m/Y H:i') }}
@endif
{{-- end order details --}} {{-- user details --}}
{{ __('admin.user_details') }}

{{ __('admin.name') }}
{{ $order?->user?->name }}
{{ __('admin.phone') }}
{{ $order?->user?->full_phone }}
{{ __('admin.email') }}
{{ $order->user->email ?? '' }}
{{ __('admin.ban_status') }}
@if ($order?->user?->is_blocked)
{{ __('admin.Prohibited') }}
@else
{{ __('admin.Unspoken') }}
@endif
{{ __('admin.activation') }}
@if ($order?->user?->active)
{{ __('admin.active') }}
@else
{{ __('admin.disactive') }}
@endif
{{-- end user details --}} {{-- provider details --}} @if($order->provider)
{{ __('admin.provider_details') }}

{{ __('admin.name') }}
{{ $order->provider->name }}
{{ __('admin.phone') }}
{{ $order->provider->full_phone }}
{{ __('admin.ban_status') }}
@if ($order->provider->is_blocked)
{{ __('admin.Prohibited') }}
@else
{{ __('admin.Unspoken') }}
@endif
{{ __('admin.activation') }}
@if ($order->provider->active)
{{ __('admin.active') }}
@else
{{ __('admin.disactive') }}
@endif
@endif {{-- end provider details --}} {{-- rate --}} @if ($order->rates && $order->rates->count() > 0)
{{ __('admin.order_rate') }}

@foreach($order->rates as $rate) @endforeach
{{ __('admin.rate') }} {{ __('admin.comment') }}
{{ $rate->rate ?? '' }} {{ $rate->comment ?? '' }}
@endif {{-- rate --}} {{-- start map --}} @if($order->lat && $order->lng)
{{ __('admin.location') }}


@endif {{-- end map --}}
@endsection @section('js') {{-- //////map --}} @endsection