@extends('layouts.app') @section('title', 'Promociones') @section('header', 'Promociones y Descuentos') @section('content') @php $moneda = $empresaGlobal->moneda ?? 'S/'; @endphp

Promociones Activas y Programadas

@forelse($promociones as $p)
@if($p->vigente) VIGENTE @else Programada/Vencida @endif

{{ $p->nombre }}

{{ $p->descripcion ?: 'Sin descripción' }}

Tipo: {{ ucwords(str_replace('_', ' ', $p->tipo)) }}

Valor: @if($p->tipo == 'descuento_porcentaje') {{ $p->valor }}% @else {{ $moneda }}{{ number_format($p->valor, 2) }} @endif

@if($p->producto)

Producto: {{ $p->producto->nombre }}

@endif @if($p->categoria)

Categoría: {{ $p->categoria->nombre }}

@endif

{{ $p->fecha_inicio->format('d/m/Y') }} - {{ $p->fecha_fin->format('d/m/Y') }}

@csrf @method('DELETE')
@empty

No hay promociones registradas

@endforelse
{{ $promociones->links() }}
@endsection