@extends('../padre.padre') @section('contenido')
| SKU | PRODUCTO | TOTAL CAJAS | COSTO UNIT. | TOTAL COSTO | PRECIO VENTA |
|---|---|---|---|---|---|
{{ $item->sku }} |
{{ $item->nombre_producto }} | {{ number_format($item->total_cajas, 2) }} | ${{ number_format($item->costo_unitario, 2) }} | ${{ number_format($item->total_cajas * $item->costo_unitario, 2) }} | ${{ number_format($item->precio_venta, 2) }} |
| GUÍA | SKU | PRODUCTO | TIPO | DETALLE | COMP. | CAJAS | PRECIO UNIT. | COSTO UNIT. | PLATAFORMA | TRANSPORTADORA | ESTADO | F. DESPACHADA |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $item->GUIA }} | {{ $item->sku }} |
{{ $item->nombre_producto }} | {{ $item->tipo }} | {{ $item->detalle }} | {{ number_format($item->cantidad, 2) }} | {{ number_format($item->cajas, 2) }} | ${{ number_format($item->precio_venta, 2) }} | ${{ number_format($item->costo_producto, 2) }} | {{ $item->PLATAFORMA }} | {{ $item->TRANSPORTADORA }} | @php $estadoCode = strtoupper(trim($item->estado)); $bg = '#858796'; // Gris por defecto $fg = '#ffffff'; $label = $item->estado; // Por defecto mostrar la letra original si no coincide switch ($estadoCode) { case 'A': $label = 'Alistamiento'; $bg = '#4e73df'; // Azul primario break; case 'V': $label = 'Verificado'; $bg = '#1cc88a'; // Verde éxito break; case 'C': $label = 'Confirmado'; $bg = '#36b9cc'; // Azul info break; case 'D': $label = 'Despachado'; $bg = '#f6c23e'; // Amarillo advertencia $fg = '#2c3e50'; // Texto oscuro para contraste break; case 'DV': $label = 'Devolución'; $bg = '#6f42c1'; // Púrpura para devolución break; case 'AN': $label = 'Anulado'; $bg = '#e74a3b'; // Rojo peligro break; default: $estadoLower = strtolower($item->estado); if (str_contains($estadoLower, 'entregado')) { $label = 'Entregado'; $bg = '#1cc88a'; } elseif (str_contains($estadoLower, 'cancelado') || str_contains($estadoLower, 'anulado')) { $label = 'Anulado'; $bg = '#e74a3b'; } elseif (str_contains($estadoLower, 'despachado') || str_contains($estadoLower, 'enviado')) { $label = 'Despachado'; $bg = '#f6c23e'; $fg = '#2c3e50'; } break; } @endphp {{ $label }} | {{ $item->FECHADESPACHADA }} |