Estimado/a {{ $venta->cliente->name ?? $venta->nombre ?: 'Cliente' }}
{{ $titulo }}
{!! $mensaje !!}
Información del pedido:
- N° Pedido: #{{ $venta->id }}
- Fecha: {{ $venta->fecha?->format('d/m/Y') ?? now()->format('d/m/Y') }}
- Cliente: {{ $venta->cliente->name ?? $venta->nombre }}
- Estado actual: {{ $venta->estado }}
@php
$pasos = [
1 => 'Cotización',
2 => 'Preproducción',
3 => 'Producción',
4 => 'Control calidad',
5 => 'Despacho',
6 => 'Finalizada',
];
@endphp
Progreso de tu pedido:
@foreach($pasos as $num => $label)
@php
$isCompleted = $num < $stepActual;
$isCurrent = $num == $stepActual;
$circleBg = ($isCurrent || $isCompleted) ? '#dc2626' : '#e5e7eb';
$circleColor = ($isCurrent || $isCompleted) ? '#ffffff' : '#9ca3af';
$labelColor = $isCurrent ? '#dc2626' : ($isCompleted ? '#555555' : '#aaaaaa');
$labelWeight = $isCurrent ? 'bold' : 'normal';
$lineColor = $isCompleted ? '#dc2626' : '#e5e7eb';
@endphp
|
|
@if($num < 6)
|
@endif
@endforeach
@if($venta->ventaProductos && $venta->ventaProductos->count() > 0)
Resumen de productos:
|
Imagen
|
Producto
|
Cant.
|
@foreach($venta->ventaProductos as $i => $vp)
@continue(!$vp->incluir_calculo)
@php
// Resolver URL de imagen: maqueta primero, luego producto
$imagenUrl = null;
if ($vp->maqueta_imagen) {
$storageUrl = \Illuminate\Support\Facades\Storage::url($vp->maqueta_imagen);
$imagenUrl = str_starts_with($storageUrl, 'http') ? $storageUrl : url($storageUrl);
} elseif ($vp->producto && is_array($vp->producto->images) && count($vp->producto->images) > 0) {
$firstImg = $vp->producto->images[0];
$imagenUrl = filter_var($firstImg, FILTER_VALIDATE_URL) ? $firstImg : url($firstImg);
}
$rowBg = $i % 2 === 0 ? '#ffffff' : '#fafafa';
@endphp
@if($imagenUrl)
@else
@endif
|
{{ $vp->producto->name ?? 'Producto' }}
@if($vp->isAgotado())
AGOTADO
@endif
@if($vp->producto?->code)
Cód: {{ $vp->producto->code }}
@endif
@if($vp->descripcion)
{{ \Illuminate\Support\Str::limit($vp->descripcion, 90) }}
@endif
|
{{ $vp->cantidad }}
|
@endforeach
@endif
Saludos cordiales
Equipo de MAR-K
|