@extends('layouts.admin') @php $currencySymbol = App\Models\AppSetting::getValue('currency_symbol', '?'); $currencyDecimals = App\Models\AppSetting::currencyDecimals(); $currencyStep = number_format(1 / pow(10, $currencyDecimals), $currencyDecimals, '.', ''); @endphp @section('title', 'Driver Details') @section('header', 'Driver Details') @section('content')
| Order ID | Store | Customer | Amount | Delivery Fee | Status | Date |
|---|---|---|---|---|---|---|
| #{{ $order->order_number }} |
{{ $order->restaurant->name ?? 'N/A' }}
|
{{ $order->customer_name ?? 'N/A' }}
{{ $order->customer_phone ?? 'N/A' }}
|
{{ $currencySymbol }}{{ number_format($order->total ?? 0, App\Models\AppSetting::currencyDecimals()) }} | {{ $currencySymbol }}{{ number_format($order->delivery_fee ?? 0, App\Models\AppSetting::currencyDecimals()) }} | @php $statusClass = [ 'pending' => 'warning', 'confirmed' => 'info', 'preparing' => 'info', 'ready' => 'primary', 'on_the_way' => 'info', 'delivered' => 'success', 'cancelled' => 'danger', 'returned' => 'danger', ][$order->status] ?? 'secondary'; @endphp {{ ucfirst(str_replace('_', ' ', $order->status)) }} | {{ $order->created_at->format('d M Y H:i') }} |
| No orders found | ||||||
|
@php
$typeIcon = [
'credit' => 'fa-arrow-down text-success',
'debit' => 'fa-arrow-up text-danger',
'refund' => 'fa-undo text-warning',
'topup' => 'fa-plus-circle text-info',
][$transaction->type] ?? 'fa-exchange text-secondary';
@endphp
{{ ucfirst($transaction->type) }}
{{ $transaction->created_at->format('d M Y H:i') }}
|
@php
$amountClass = in_array($transaction->type, ['credit', 'refund', 'topup']) ? 'text-success' : 'text-danger';
$amountSign = in_array($transaction->type, ['credit', 'refund', 'topup']) ? '+' : '-';
@endphp
{{ $amountSign }}{{ $currencySymbol }}{{ number_format(abs($transaction->amount), App\Models\AppSetting::currencyDecimals()) }}
|
| No transactions | |