|
@if(isset($order->type) && $order->type === 'note')
{{ $order->display_number ?? $order->invoice_number ?? 'N/A' }}
Nota
@elseif(isset($order->type) && $order->type === 'invoice')
{{ $order->display_number ?? $order->invoice_number ?? 'N/A' }}
Factura
@else
{{ $order->display_number ?? $order->order_number ?? 'N/A' }}
@if(isset($order->from_mobile_app) && $order->from_mobile_app)
@endif
Orden
@if(isset($order->from_mobile_app) && $order->from_mobile_app)
App Móvil
@endif
@endif
|
@if($order->client)
{{ Str::limit($order->client->business_name, 30) }}
@if($order->client->contact_person)
{{ Str::limit($order->client->contact_person, 25) }}
@endif
@else
N/A
@endif
|
@if($order->salesman)
{{ $order->salesman->first_name }} {{ $order->salesman->last_name }}
@else
N/A
@endif
|
{{ $order->display_date ? $order->display_date->format('d/m/Y') : ($order->order_date ? $order->order_date->format('d/m/Y') : ($order->invoice_date ? $order->invoice_date->format('d/m/Y') : 'N/A')) }}
|
@if($order->display_delivery_date)
{{ $order->display_delivery_date->format('d/m/Y') }}
@elseif($order->expected_delivery_date)
{{ $order->expected_delivery_date->format('d/m/Y') }}
@elseif($order->due_date)
{{ $order->due_date->format('d/m/Y') }}
@else
N/A
@endif
|
${{ number_format($order->display_total ?? $order->total_amount ?? ($order->total_amount_usd ?? 0), 2) }}
|
@php
$statusConfig = [
'draft' => ['class' => 'secondary', 'icon' => 'edit', 'label' => 'Borrador'],
'confirmed' => ['class' => 'primary', 'icon' => 'check-circle', 'label' => 'Confirmada'],
'in_production' => ['class' => 'warning', 'icon' => 'cogs', 'label' => 'En Producción'],
'ready' => ['class' => 'info', 'icon' => 'check-double', 'label' => 'Lista'],
'shipped' => ['class' => 'success', 'icon' => 'truck', 'label' => 'Enviada'],
'delivered' => ['class' => 'success', 'icon' => 'check-double', 'label' => 'Entregada'],
'cancelled' => ['class' => 'danger', 'icon' => 'times-circle', 'label' => 'Cancelada']
];
$status = $statusConfig[$order->status] ?? ['class' => 'secondary', 'icon' => 'circle', 'label' => ucfirst($order->status)];
@endphp
{{ $status['label'] }}
|
@if(isset($order->type) && ($order->type === 'note' || $order->type === 'invoice'))
@if(isset($order->type) && ($order->type === 'note' || $order->type === 'invoice'))
@else
@if($order->status === 'draft')
@endif
@if($order->status === 'confirmed')
@endif
@endif
@if($order->status === 'draft' || (isset($order->type) && ($order->type === 'note' || $order->type === 'invoice') && $order->status === 'draft'))
@if(isset($order->type) && ($order->type === 'note' || $order->type === 'invoice'))
@endif
|
@empty