@extends('layouts.app') @section('title', 'Órdenes de Venta') @section('content')

Órdenes de Venta

Gestión y seguimiento de órdenes de venta

Nueva Orden
Total Órdenes
{{ $stats['total_orders'] }}
Borradores
{{ $stats['draft_orders'] }}
Confirmadas
{{ $stats['confirmed_orders'] }}
En Producción
{{ $stats['in_production_orders'] }}
Listado de Órdenes de Venta
@forelse($orders as $order) @empty @endforelse
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
@else N/A @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'] }}
@if($order->status === 'confirmed') @endif @if($order->status === 'draft')
@csrf @method('DELETE')
@endif
No hay órdenes de venta registradas

Comienza creando tu primera orden de venta.

Crear Primera Orden
@if($orders->hasPages()) @endif
@push('styles') @endpush @endsection