@php $hasSecondPage = $isOrganization && ($returnRatioChartImage || $chartImage || ($chartData && $returnRatioTimelineData)) && $returnRatioTimelineData && count($returnRatioTimelineData) > 1; @endphp @if($hasSecondPage) @endif
@php $logoRelativePath = theme_logo('email_logo', 'app-images/app_mail_logo.png'); $logoPath = storage_path('app/public/' . $logoRelativePath); $logoBase64 = ''; if (file_exists($logoPath)) { $logoBase64 = 'data:image/png;base64,' . base64_encode(file_get_contents($logoPath)); } @endphp @if($logoBase64) {{ config('app.name') }} Logo
{{ config('messages.platform_slogan') }}
@else
{{ config('app.name') }}
@endif

{{ $title['header'] ?? __('Financial overview') }}

{{ $title['sub'] ?? '' }}

@if($accountsData && $accountsData->count() > 0)
{{ __('Account Balances') }}
@foreach($accountsData as $account) @endforeach @php $totalDifference = $accountsData->sum('difference'); $decimalFormat = $decimalFormat ?? false; $fmtAmount = function($minutes) use ($decimalFormat) { if ($decimalFormat) { $isNeg = $minutes < 0; return ($isNeg ? '-' : '') . number_format(abs($minutes) / 60, 2, ',', '.') . ' ' . __('h.'); } return tbFormat($minutes); }; @endphp
{{ __('Account Name') }} {{ __('Start Balance') }} {{ __('End Balance') }} {{ __('Difference') }}
{{ $account['name'] }} {{ $account['start_balance_formatted'] }} {{ $account['end_balance_formatted'] }} {{ $account['difference_formatted'] }}{{ $account['difference'] > 0 ? ' +' : '' }}
{{ __('TOTALS') }} {{ $fmtAmount($accountsData->sum('start_balance')) }} {{ $fmtAmount($accountsData->sum('end_balance')) }} {{ $fmtAmount($totalDifference) }}{{ $totalDifference > 0 ? ' +' : '' }}
@endif @if($accountBalancesChartImage && isset($returnRatioTimelineData) && count($returnRatioTimelineData) > 4)
{{ __('Account Balances Over Time') }}
{{ __('Track your account balances across different time periods') }}
{{ __('Account Balances Over Time Chart') }}
@endif @if($hasSecondPage)
@endif @if($hasSecondPage)
{{ __('Reciprocity Rate Timeline') }}
{{ __('Reciprocity rate: the share of your Hours that were also returned by the same people you helped during this period.') }}
{{ __('A high rate means you are part of a more closed exchange network with frequent returning exchange partners, while a low rate suggests you are part of a more open network with many different exchange partners.') }}
@if($returnRatioChartImage || $chartImage)
{{ __('Reciprocity Rate Timeline Chart') }}
@else
{{ __('Reciprocity Rate Timeline') }} ({{ min($chartData['values']) }}% - {{ max($chartData['values']) }}%)
{{ number_format($chartData['maxValue'], 0) }}%
{{ number_format(($chartData['maxValue'] + $chartData['minValue']) / 2, 0) }}%
{{ number_format($chartData['minValue'], 0) }}%
@for ($i = 1; $i <= 4; $i++)
@endfor @if(count($chartData['points']) > 1) @for ($i = 0; $i < count($chartData['points']) - 1; $i++) @php list($x1, $y1) = explode(',', $chartData['points'][$i]); list($x2, $y2) = explode(',', $chartData['points'][$i + 1]); // Convert to chart coordinates (scale to 80% and offset by 10%) $x1_pos = $x1 * 0.8 + 10; $y1_pos = $y1 * 0.8 + 10; $x2_pos = $x2 * 0.8 + 10; $y2_pos = $y2 * 0.8 + 10; // Calculate line properties for straight line $width = abs($x2_pos - $x1_pos); $height = abs($y2_pos - $y1_pos); $left = min($x1_pos, $x2_pos); $top = min($y1_pos, $y2_pos); // Determine if line is more horizontal or vertical $isHorizontal = $width > $height; @endphp @if($isHorizontal)
@else
@endif @endfor @endif @if(count($chartData['trendPoints']) > 1) @for ($i = 0; $i < count($chartData['trendPoints']) - 1; $i++) @php list($x1, $y1) = explode(',', $chartData['trendPoints'][$i]); list($x2, $y2) = explode(',', $chartData['trendPoints'][$i + 1]); $x1_pos = $x1 * 0.8 + 10; $y1_pos = $y1 * 0.8 + 10; $x2_pos = $x2 * 0.8 + 10; $y2_pos = $y2 * 0.8 + 10; $width = abs($x2_pos - $x1_pos); $height = abs($y2_pos - $y1_pos); $left = min($x1_pos, $x2_pos); $top = min($y1_pos, $y2_pos); $isHorizontal = $width > $height; @endphp @if($isHorizontal)
@else
@endif @endfor @endif @if(count($chartData['points']) > 0) @foreach ($chartData['points'] as $index => $point) @php list($x, $y) = explode(',', $point); @endphp
@endforeach @endif
Reciprocity Rate Over Time
{{ __('Reciprocity Rate %') }} @if($returnRatioTrendData && count($returnRatioTrendData) > 1)     {{ __('Trend Line') }} @endif
@foreach ($returnRatioTimelineData as $index => $point) @if ($index == 0 || $index == count($returnRatioTimelineData) - 1 || $index % max(1, floor(count($returnRatioTimelineData) / 6)) == 0) {{ $point['label'] }} @endif @endforeach
{{ __('Return Ratio %') }} @if($returnRatioTrendData && count($returnRatioTrendData) > 1)     --- {{ __('Trend Line') }} @endif
@endif
@endif @if($transactionTypesData && $transactionTypesData->count() > 0)
{{ __('Transaction Types') }}
@foreach($transactionTypesData as $transactionType) @endforeach
{{ __('Transaction Type') }} {{ __('Credit') }} {{ __('Debit') }} {{ __('Total') }}
{{ $transactionType['type_name'] }} {{ $transactionType['incoming_formatted'] }} {{ $transactionType['outgoing_formatted'] }} {{ $transactionType['net_formatted'] }}
@endif @if($statisticsData && ($statisticsData['transaction_count'] > 0 || $statisticsData['unique_profiles'] > 0))
{{ __('Period Statistics') }}
@if($statisticsData['profiles_by_type'] && $statisticsData['profiles_by_type']->count() > 0) @foreach($statisticsData['profiles_by_type'] as $modelType => $count) @endforeach @endif @if($isOrganization) @endif
{{ __('Statistic') }} {{ __('Value') }}
{{ __('Number of Transactions') }} {{ number_format($statisticsData['transaction_count']) }}
{{ __('Unique ' . class_basename($modelType) . 's') }} {{ number_format($count) }}
{{ __('Total unique profiles') }} {{ number_format($statisticsData['unique_profiles']) }}
{{ __('Average reciprocity rate') }} {{ number_format($statisticsData['average_return_ratio'], 1) }}%
@endif
{{ __('Generated on') }} {{ now()->translatedFormat('l d F Y') }}