@extends('layouts.app') @section('title', 'Órdenes de Venta') @section('content')
Gestión y seguimiento de órdenes de venta
| N° Orden | Cliente | Vendedor | Fecha | Entrega | Total | Estado | Acciones |
|---|---|---|---|---|---|---|---|
| {{ $order->order_number }} |
@if($order->client)
{{ Str::limit($order->client->business_name, 30) }}
@if($order->client->contact_person)
{{ Str::limit($order->client->contact_person, 25) }}
@endif
|
@if($order->salesman) {{ $order->salesman->first_name }} {{ $order->salesman->last_name }} @else N/A @endif | {{ $order->order_date ? $order->order_date->format('d/m/Y') : 'N/A' }} | @if($order->delivery_date) {{ $order->delivery_date->format('d/m/Y') }} @else N/A @endif | ${{ number_format($order->total_amount, 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'] }} | |