@extends('layouts.admin') @section('title', 'Pipelines') @section('content') @if($allPipelines->count() > 1)
@endif Deal list Quote
@if($pipeline)
@foreach($pipeline->stages as $stage) @php $stageTotal = $stage->opportunities->sum('amount_cents'); $weighted = (int) round($stageTotal * ($stage->probability / 100)); @endphp

{{ $stage->name }}

{{ $stage->opportunities->count() }}
{{ $stage->probability }}% · AUD {{ number_format($stageTotal/100, 0) }} w/ AUD {{ number_format($weighted/100, 0) }}
@forelse($stage->opportunities as $opportunity)
{{ $opportunity->title }}
{{ $opportunity->number }} @if($opportunity->lead) · {{ $opportunity->lead->name ?: $opportunity->lead->email }}@endif
AUD {{ number_format($opportunity->amount_cents/100, 2) }} {{ $opportunity->status }}
@if($opportunity->expected_close_at)
Close {{ $opportunity->expected_close_at->format('d M Y') }}
@endif
@if($opportunity->status === 'open' && $pipeline->stages->count() > 1)
@csrf
@endif
@empty
Drop deals here
@endforelse
@endforeach
@else
@endif
@endsection