57 lines
2.8 KiB
PHP
57 lines
2.8 KiB
PHP
@php
|
|
$holding = $data['holding_comparison'] ?? [];
|
|
@endphp
|
|
@if(!empty($holding['available']) && !empty($holding['entities']))
|
|
<div class="mt-card mt-holding-comparison">
|
|
<div class="mt-card-header">
|
|
<h3 class="mt-card-title">@lang('managementtools::lang.holding_entity_comparison')</h3>
|
|
@if(!empty($holding['totals']['comparison']))
|
|
@include('managementtools::executive_cockpit.partials.period_badge', ['comparison' => $holding['totals']['comparison']])
|
|
@endif
|
|
</div>
|
|
<div class="mt-card-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('managementtools::lang.entity')</th>
|
|
<th>@lang('managementtools::lang.entity_type')</th>
|
|
<th>@lang('managementtools::lang.sales_this_month')</th>
|
|
<th>@lang('managementtools::lang.share_of_total')</th>
|
|
<th>@lang('managementtools::lang.vs_previous_period')</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($holding['entities'] as $entity)
|
|
<tr>
|
|
<td>
|
|
<strong>{{ $entity['name'] }}</strong>
|
|
@if(!empty($entity['code']))
|
|
<span class="text-muted">({{ $entity['code'] }})</span>
|
|
@endif
|
|
</td>
|
|
<td>{{ $entity['entity_type'] }}</td>
|
|
<td class="display_currency" data-currency_symbol="true">{{ $entity['sales'] }}</td>
|
|
<td>{{ number_format((float) ($entity['share_pct'] ?? 0), 1) }}%</td>
|
|
<td>
|
|
@include('managementtools::executive_cockpit.partials.period_badge', ['comparison' => $entity['comparison'] ?? null])
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr class="active">
|
|
<th colspan="2">@lang('managementtools::lang.consolidated_total')</th>
|
|
<th class="display_currency" data-currency_symbol="true">{{ $holding['totals']['sales'] ?? 0 }}</th>
|
|
<th>100%</th>
|
|
<th>
|
|
@include('managementtools::executive_cockpit.partials.period_badge', ['comparison' => $holding['totals']['comparison'] ?? null])
|
|
</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|