@if (session()->has('success'))
{{ session()->get('success') }}
@endif
@if ($errors->any())
@foreach ($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
@foreach ($suscripciones as $su)
{{ $su->nombre }}
{{-- COMPRUEBA SI TIENE OFERTA Y ESTA ACTIVADA --}}
@if ($su->oferta_activada)
@php
$precio_sin_oferta = $su->pvp_anual;
$precio_con_oferta = $su->pvp_anual - ($su->pvp_anual * $su->oferta_porciento) / 100;
@endphp
ANTES DESDE
${{ explode('.', $precio_sin_oferta)[0] }}.{{ explode('.', $precio_sin_oferta)[1] }}
AHORA DESDE
${{ explode('.', $precio_con_oferta)[0] }}.{{ explode('.', $precio_con_oferta)[1] }}
mes/año
{{-- SI NO TIENE OFERTA MUESTRA PRECIO NORMAL --}}
@else
{{-- COMPRUEBA SI ES EL PLAN BASICO --}}
@if ($su->id == 1)
{{--SI ES EL PLAN BASICO --}}
GRATIS
@else
{{--SI ES OTRO PLAN --}}
DESDE
${{ explode('.', $su->pvp_anual)[0] }}.{{ explode('.', $su->pvp_anual)[1] }}
mes/año
@endif
@endif
@foreach ($su->caracteristicas as $ca)
- {!! $ca !!}
@endforeach
{{-- SI LA SUSCRIPCION ES IGUAL A SUSCRIPCION DEL USUARIO ACTUAL --}}
@if ($su->id == $actual->suscripcion->id)
{{--SI LO ES, NO MUESTRA NINGUN BOTON--}}
Actual
@else
{{--SI NO LO ES, VERIFICA QUE NO SEA EL PLAN BASICO--}}
@if ($su->id != 1)
Actualizar
@endif
@endif
@endforeach
@foreach ($suscripciones as $a)
@endforeach
Suscripcion
Suscripcion actual
{{ $actual->suscripcion->nombre }}
Desde: {{ $actual->fecha_desde }}
Hasta: {{ $actual->fecha_hasta }}