@extends('layouts.app') @section('title', 'Órdenes de Compra') @section('content')
Gestión y seguimiento de órdenes de compra a proveedores
| Número | Proveedor | Fecha | Estado | Total | Items | Creado por | Acciones |
|---|---|---|---|---|---|---|---|
| {{ $order->order_number }} |
{{ $order->supplier ? $order->supplier->business_name : 'N/A' }}
@if($order->supplier && $order->supplier->contact_person)
{{ $order->supplier->contact_person }} @endif |
{{ $order->order_date ? $order->order_date->format('d/m/Y') : 'N/A' }}
@if($order->expected_delivery_date)
Entrega: {{ $order->expected_delivery_date->format('d/m/Y') }} @endif |
@php $statusClasses = [ 'draft' => 'bg-secondary text-white', 'sent' => 'bg-primary text-white', 'confirmed' => 'bg-success text-white', 'received' => 'bg-info text-white', 'cancelled' => 'bg-danger text-white' ]; $statusTexts = [ 'draft' => 'Borrador', 'sent' => 'Enviada', 'confirmed' => 'Confirmada', 'received' => 'Recibida', 'cancelled' => 'Cancelada' ]; @endphp {{ $statusTexts[$order->status] ?? ucfirst($order->status) }} | {{ $order->formatted_total }} | {{ $order->items_count }} items |
{{ $order->createdBy->name }}
{{ $order->created_at ? $order->created_at->format('d/m/Y H:i') : 'N/A' }} |
|
|
No hay órdenes de compra registradas |
|||||||