@extends('layouts.layoutMaster') @section('title', 'Delivery Order Detail') @php $breadcrumbs = [ ['url' => route('dashboard'), 'label' => 'Dashboard'], ['url' => route('delivery-order.index'), 'label' => 'Delivery Order'], ['url' => route('delivery-order.show', ['delivery_order' => $model->id]), 'label' => $model->code], ]; @endphp @section('content')
| Delivery Order Code | {{ $model->code }} |
| Sales Order | @if ($model->transaction) @can('sales-order.show') {{ $model->transaction->code }} @else {{ $model->transaction->code }} @endcan @else - @endif |
| Created Date | {{ $model->created_at?->format('d/m/Y H:i') ?? '-' }} |
| Customer | @if ($model->transaction && $model->transaction->customer) @can('customer.show') {{ $model->transaction->customer->full_name }} @else {{ $model->transaction->customer->full_name }} @endcan @else - @endif |
| Customer Phone | {{ $model->transaction->customer->phone ?? '-' }} |
| Sales Person | {{ $model->transaction->sales->name ?? '-' }} |
| No | Driver | Truck | Quantity | Delivery Date | Status | |
|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | @if($detail->driver) @can('driver.show') {{ $detail->driver->full_name }} @else {{ $detail->driver->full_name }} @endcan @else - @endif | @if($detail->truck) @can('truck.show') {{ $detail->truck->license_plate }} @if($detail->truck->type) - {{ $detail->truck->type->name }} @endif @else {{ $detail->truck->license_plate }} @if($detail->truck->type) - {{ $detail->truck->type->name }} @endif @endcan @else - @endif | {{ \App\Helpers\Helpers::formatNumber($detail->qty ?? 0) }} | {{ $detail->delivery_date?->format('d/m/Y') ?? '-' }} | @php $statusColors = [ 'pending' => 'secondary', 'loading' => 'info', 'ondelivery' => 'primary', 'unloading' => 'warning', 'onhold' => 'danger', 'finish' => 'success' ]; $statusColor = $statusColors[$detail->status] ?? 'secondary'; @endphp {{ strtoupper($detail->status) }} |