@extends('layouts.master') @section('title') Dashboard @endsection @section('content')

@lang('Welcome back'), {{user()->name}}!

@lang('Track your sales activity, leads and deals here.')

Akwizycja

@foreach($agreementsPerYear as $perYear) @endforeach @foreach($agreementsPerYear as $perYear) @endforeach @for($i = 0; $i<12;$i++) @endfor @foreach($agreementsPerYear as $perYear) @endforeach @for($i = 0; $i<12;$i++) @endfor @foreach($sumVolumePerYear as $year => $volume) @foreach($volumePerYear as $yearVolume) @endforeach @for($i = 0; $i<12;$i++) @endfor @endforeach
Jednostka {{implode('+', $agreementsPerYear->pluck('year')->toArray())}}{{$perYear->year}}{{date('Y')}}.01 {{date('Y')}}.02 {{date('Y')}}.03 {{date('Y')}}.04 {{date('Y')}}.05 {{date('Y')}}.06 {{date('Y')}}.07 {{date('Y')}}.08 {{date('Y')}}.09 {{date('Y')}}.10 {{date('Y')}}.11 {{date('Y')}}.12
Liczba podpisanych umów [szt] {{$agreementsPerYear->sum('count')}}{{$perYear->count}}{{$agreementsPerMonth[$i]->count ?? 0}}
Wolumen pozyskany [MWh] {{format_number($agreementsPerYear->sum('volume'))}}{{format_number($perYear->volume)}}{{format_number($agreementsPerMonth[$i]->volume ?? 0)}}
na {{$year}} [MWh] {{format_number($volume)}}{{format_number($yearVolume[$year] ?? 0)}}{{ format_number($volumePerMonths[$i][$year] ?? 0)}}

Umowy podpisane w: {{date('Y.m')}} ({{$agreementsInCurrentMonthSigned->count()}})

@php $totals = []; @endphp @forelse($agreementsInCurrentMonthSigned as $agreementInCurrentMonthSigned) @php $calculateVolumePerYears = $agreementInCurrentMonthSigned->calculateVolumePerYear(); foreach ($calculateVolumePerYears as $year => $data) { if (empty($totals[$year])) { $totals[$year] = round($data, 2); } else { $totals[$year] += round($data, 2); } } @endphp @empty @endforelse
Klient Numer umowy Data podpisania Agent Typ Start umowy Koniec umowy Wolumen całkowity 2025 2026 2027 2028 2029 2030
{{$agreementInCurrentMonthSigned->client_name}} {{$agreementInCurrentMonthSigned->short_agreement_no}} {{$agreementInCurrentMonthSigned->sign_date}} {{$agreementInCurrentMonthSigned->agent}} {{$agreementInCurrentMonthSigned->product}} {{$agreementInCurrentMonthSigned->start_date}} {{$agreementInCurrentMonthSigned->end_date}} {{format_number($agreementInCurrentMonthSigned->volume)}} {{format_number($calculateVolumePerYears[2025] ?? 0)}} {{format_number($calculateVolumePerYears[2026] ?? 0)}} {{format_number($calculateVolumePerYears[2027] ?? 0)}} {{format_number($calculateVolumePerYears[2028] ?? 0)}} {{format_number($calculateVolumePerYears[2029] ?? 0)}} {{format_number($calculateVolumePerYears[2030] ?? 0)}}
Suma: {{format_number($agreementsInCurrentMonthSigned->sum('volume'))}} {{format_number($totals[2025] ?? 0)}} {{format_number($totals[2026] ?? 0)}} {{format_number($totals[2027] ?? 0)}} {{format_number($totals[2028] ?? 0)}} {{format_number($totals[2029] ?? 0)}} {{format_number($totals[2030] ?? 0)}}

Umowy w podpisie ({{$agreementsInTheSignatureStatus->count()}})

@php $totals = []; @endphp @forelse($agreementsInTheSignatureStatus as $agreementInTheSignatureStatus) @php $calculateVolumePerYears = $agreementInTheSignatureStatus->calculateVolumePerYear(); foreach ($calculateVolumePerYears as $year => $data) { if (empty($totals[$year])) { $totals[$year] = round($data, 2); } else { $totals[$year] += round($data, 2); } } @endphp @empty @endforelse
Klient Numer umowy Agent Typ Start umowy Koniec umowy Wolumen całkowity 2025 2026 2027 2028 2029 2030
{{$agreementInTheSignatureStatus->client_name}} {{$agreementInTheSignatureStatus->short_agreement_no}} {{$agreementInTheSignatureStatus->agent}} {{$agreementInTheSignatureStatus->product}} {{$agreementInTheSignatureStatus->start_date}} {{$agreementInTheSignatureStatus->end_date}} {{format_number($agreementInTheSignatureStatus->volume)}} {{format_number($calculateVolumePerYears[2025] ?? 0)}} {{format_number($calculateVolumePerYears[2026] ?? 0)}} {{format_number($calculateVolumePerYears[2027] ?? 0)}} {{format_number($calculateVolumePerYears[2028] ?? 0)}} {{format_number($calculateVolumePerYears[2029] ?? 0)}} {{format_number($calculateVolumePerYears[2030] ?? 0)}}
Suma: {{format_number($agreementsInTheSignatureStatus->sum('volume'))}} {{format_number($totals[2025] ?? 0)}} {{format_number($totals[2026] ?? 0)}} {{format_number($totals[2027] ?? 0)}} {{format_number($totals[2028] ?? 0)}} {{format_number($totals[2029] ?? 0)}} {{format_number($totals[2030] ?? 0)}}

Kontraktacje 2023

@foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach @foreach($contracts2023['years'] ?? [] as $year) @endforeach
Status kontraktacji 2023 (Umowy zaakceptowane w 2023) {{$year}}Razem
Umowy w przygotowaniu (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2023['W przygotowaniu'][$year]['count'] ?? 0}}{{$contracts2023['W przygotowaniu']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2023['W przygotowaniu'][$year]['volume'] ?? 0)}}{{format_number($contracts2023['W przygotowaniu']['totals']['volume'] ?? 0)}}
Umowy w podpisie (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2023['W podpisie'][$year]['count'] ?? 0}}{{$contracts2023['W podpisie']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2023['W podpisie'][$year]['volume'] ?? 0)}}{{format_number($contracts2023['W podpisie']['totals']['volume'] ?? 0)}}
Umowy podpisane (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2023['Podpisana'][$year]['count'] ?? 0}}{{$contracts2023['Podpisana']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2023['Podpisana'][$year]['volume'] ?? 0)}}{{format_number($contracts2023['Podpisana']['totals']['volume'] ?? 0)}}
Razem Liczba {{ ($contracts2023['W przygotowaniu'][$year]['count'] ?? 0) + ($contracts2023['W podpisie'][$year]['count'] ?? 0) + ($contracts2023['Podpisana'][$year]['count'] ?? 0)}} {{ ($contracts2023['W przygotowaniu']['totals']['qty'] ?? 0) + ($contracts2023['W podpisie']['totals']['qty'] ?? 0) + ($contracts2023['Podpisana']['totals']['qty'] ?? 0)}}
Wolumen [MWh] {{ format_number( ($contracts2023['W przygotowaniu'][$year]['volume'] ?? 0) + ($contracts2023['W podpisie'][$year]['volume'] ?? 0) + ($contracts2023['Podpisana'][$year]['volume'] ?? 0) )}} {{ format_number( ($contracts2023['W przygotowaniu']['totals']['volume'] ?? 0) + ($contracts2023['W podpisie']['totals']['volume'] ?? 0) + ($contracts2023['Podpisana']['totals']['volume'] ?? 0) )}}

Kontraktacje 2024

@foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach @foreach($contracts2024['years'] ?? [] as $year) @endforeach
Status kontraktacji 2024 (Umowy zaakceptowane w 2024) {{$year}}Razem
Umowy w przygotowaniu (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2024['W przygotowaniu'][$year]['count'] ?? 0}}{{$contracts2024['W przygotowaniu']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2024['W przygotowaniu'][$year]['volume'] ?? 0)}}{{format_number($contracts2024['W przygotowaniu']['totals']['volume'] ?? 0)}}
Umowy w podpisie (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2024['W podpisie'][$year]['count'] ?? 0}}{{$contracts2024['W podpisie']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2024['W podpisie'][$year]['volume'] ?? 0)}}{{format_number($contracts2024['W podpisie']['totals']['volume'] ?? 0)}}
Umowy podpisane (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2024['Podpisana'][$year]['count'] ?? 0}}{{$contracts2024['Podpisana']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2024['Podpisana'][$year]['volume'] ?? 0)}}{{format_number($contracts2024['Podpisana']['totals']['volume'] ?? 0)}}
Razem Liczba {{ ($contracts2024['W przygotowaniu'][$year]['count'] ?? 0) + ($contracts2024['W podpisie'][$year]['count'] ?? 0) + ($contracts2024['Podpisana'][$year]['count'] ?? 0)}} {{ ($contracts2024['W przygotowaniu']['totals']['qty'] ?? 0) + ($contracts2024['W podpisie']['totals']['qty'] ?? 0) + ($contracts2024['Podpisana']['totals']['qty'] ?? 0)}}
Wolumen [MWh] {{ format_number( ($contracts2024['W przygotowaniu'][$year]['volume'] ?? 0) + ($contracts2024['W podpisie'][$year]['volume'] ?? 0) + ($contracts2024['Podpisana'][$year]['volume'] ?? 0) )}} {{ format_number( ($contracts2024['W przygotowaniu']['totals']['volume'] ?? 0) + ($contracts2024['W podpisie']['totals']['volume'] ?? 0) + ($contracts2024['Podpisana']['totals']['volume'] ?? 0) )}}

Kontraktacje 2025

@foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach @foreach($contracts2025['years'] ?? [] as $year) @endforeach
Status kontraktacji 2025 (Umowy zaakceptowane w 2025) {{$year}}Razem
Umowy w przygotowaniu (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2025['W przygotowaniu'][$year]['count'] ?? 0}}{{$contracts2025['W przygotowaniu']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2025['W przygotowaniu'][$year]['volume'] ?? 0)}}{{format_number($contracts2025['W przygotowaniu']['totals']['volume'] ?? 0)}}
Umowy w podpisie (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2025['W podpisie'][$year]['count'] ?? 0}}{{$contracts2025['W podpisie']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2025['W podpisie'][$year]['volume'] ?? 0)}}{{format_number($contracts2025['W podpisie']['totals']['volume'] ?? 0)}}
Umowy podpisane (na podstawie roku rozpoczęcia umowy) Liczba{{$contracts2025['Podpisana'][$year]['count'] ?? 0}}{{$contracts2025['Podpisana']['totals']['qty'] ?? 0}}
Wolumen [MWh]{{format_number($contracts2025['Podpisana'][$year]['volume'] ?? 0)}}{{format_number($contracts2025['Podpisana']['totals']['volume'] ?? 0)}}
Razem Liczba {{ ($contracts2025['W przygotowaniu'][$year]['count'] ?? 0) + ($contracts2025['W podpisie'][$year]['count'] ?? 0) + ($contracts2025['Podpisana'][$year]['count'] ?? 0)}} {{ ($contracts2025['W przygotowaniu']['totals']['qty'] ?? 0) + ($contracts2025['W podpisie']['totals']['qty'] ?? 0) + ($contracts2025['Podpisana']['totals']['qty'] ?? 0)}}
Wolumen [MWh] {{ format_number( ($contracts2025['W przygotowaniu'][$year]['volume'] ?? 0) + ($contracts2025['W podpisie'][$year]['volume'] ?? 0) + ($contracts2025['Podpisana'][$year]['volume'] ?? 0) )}} {{ format_number( ($contracts2025['W przygotowaniu']['totals']['volume'] ?? 0) + ($contracts2025['W podpisie']['totals']['volume'] ?? 0) + ($contracts2025['Podpisana']['totals']['volume'] ?? 0) )}}

Operacje

@foreach($pzsByYear as $year => $data) @endforeach @foreach($pzsByYear as $year => $data) @endforeach @foreach($pzsByYear as $year => $data) @endforeach @foreach($pzsByYear as $year => $data) @endforeach @foreach($pzsByYear as $year => $data) @endforeach @foreach($pzsByYear as $year => $data) @endforeach @foreach($pzsByYear as $year => $data) @endforeach
OperacjeLiczba PPE {{$year}} Liczba Klientów {{$year}}
Przyjęte{{$pzsByYear[$year]->where('status', 'Przyjęty')->count()}} {{$pzsByYear[$year]->where('status', 'Przyjęty')->groupBy('client_name')->count()}}
Jeszcze nie mozna złożyć (ponad 90 dni){{$pzsByYear[$year]->where('agreement_date', '>=', \Carbon\Carbon::now()->subDays(90)->toDateString())->where('status', 'Do złożenia')->count()}} {{$pzsByYear[$year]->where('agreement_date', '>=', \Carbon\Carbon::now()->subDays(90)->toDateString())->where('status', 'Do złożenia')->groupBy('client_name')->count()}}
Można złożyć{{$pzsByYear[$year]->where('agreement_date', '<=', \Carbon\Carbon::now()->subDays(90)->toDateString())->where('status', 'Do złożenia')->count()}} {{$pzsByYear[$year]->where('agreement_date', '<=', \Carbon\Carbon::now()->subDays(90)->toDateString())->where('status', 'Do złożenia')->groupBy('client_name')->count()}}
Złożone{{$pzsByYear[$year]->where('status', 'Złożony')->count()}} {{$pzsByYear[$year]->where('status', 'Złożony')->groupBy('client_name')->count()}}
Oczekujące na złożenie wypowiedzenia{{$pzsByYear[$year]->whereNull('date_termination')->count()}} {{$pzsByYear[$year]->whereNull('date_termination')->groupBy('client_name')->count()}}
Wypowiedzenie złożone{{$pzsByYear[$year]->whereNotNull('date_termination')->count()}} {{$pzsByYear[$year]->whereNotNull('date_termination')->groupBy('client_name')->count()}}
@endsection @section('styles') @endsection