@extends('layouts.admin') @section('content')
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if (session()->has('success'))
  • {{ session('success') }}
@endif

{{ $rifa->name }}

Participantes: {{ $rifa->participantes()->groupBy('customer_id')->count() }}

Total de Cotas: {{ $rifa->participantes()->sum('pagos') }}

Total: R$ {{ number_format($rifa->participantes()->where('pagos', '>', 0)->sum('valor'), 2, ",", ".") }}

{{ $rifa->qtdNumerosDisponiveis() }} L
{{ $rifa->qtdNumerosReservados() }} R
{{ $rifa->qtdNumerosPagos() }} P
@if ($participantes->count() === 0)
Nenhuma compra encontrada!
@endif @foreach ($participantes as $participante) @if ($situacao != '') @if ($situacao == $participante->situacao())
{{ count($participante->numbers()) }} Cotas
R$ {{ number_format($participante->valor, 2, ',', '.') }}
@endif @else
{{ count($participante->numbers()) }} Cotas
R$ {{ number_format($participante->valor, 2, ',', '.') }}
@endif @endforeach
{{-- Modal's --}} @include('compras.modal.editarRifa') @include('compras.modal.criarCompra') @include('compras.modal.detalhes') {{-- form auxiliar para adicionar imagens na rifa --}}
@csrf
@endsection