59 lines
2.9 KiB
PHP
59 lines
2.9 KiB
PHP
@php
|
|
$initialItems = $user_abo->getInitialItems();
|
|
$initialCompItems = $user_abo->getInitialCompItems();
|
|
$priceLabel = $user_abo->is_for === 'me' ? __('abo_history.price_net') : __('abo_history.price_gross');
|
|
@endphp
|
|
|
|
<div class="card-body">
|
|
<h5 class="font-weight-semibold">
|
|
<i class="fas fa-box-open"></i> {{ __('abo_history.initial_composition') }}
|
|
</h5>
|
|
|
|
@if($initialItems->isEmpty() && $initialCompItems->isEmpty())
|
|
<p class="text-muted mb-0">
|
|
<i class="fas fa-info-circle"></i> {{ __('abo_history.no_initial_data') }}
|
|
</p>
|
|
@else
|
|
<div class="table-responsive">
|
|
<table class="table table-sm mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('order.article') }}</th>
|
|
<th>{{ __('order.art_no') }}</th>
|
|
<th class="text-center">{{ __('tables.quantity') }}</th>
|
|
<th class="text-right">{{ __('tables.price') }} <small class="text-muted">({{ $priceLabel }})</small></th>
|
|
<th class="text-right">{{ __('order.total_sum') }} <small class="text-muted">({{ $priceLabel }})</small></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($initialItems as $item)
|
|
<tr>
|
|
<td>
|
|
<strong>{{ $item->product_name }}</strong>
|
|
@if($item->product)
|
|
{!! \App\Services\AboHelper::getAboTypeBadge(\App\Services\AboHelper::getAboShowOn($item->product)) !!}
|
|
@endif
|
|
</td>
|
|
<td class="text-muted">{{ $item->product_number }}</td>
|
|
<td class="text-center">{{ $item->qty_after }}</td>
|
|
<td class="text-right text-nowrap">{{ $item->getFormattedUnitPrice() }} €</td>
|
|
<td class="text-right text-nowrap font-weight-semibold">{{ $item->getFormattedTotalPrice() }} €</td>
|
|
</tr>
|
|
@endforeach
|
|
@foreach($initialCompItems as $item)
|
|
<tr class="bg-light">
|
|
<td>
|
|
<span class="badge badge-outline-secondary">Comp</span>
|
|
{{ $item->product_name }}
|
|
</td>
|
|
<td class="text-muted">{{ $item->product_number }}</td>
|
|
<td class="text-center">{{ $item->qty_after }}</td>
|
|
<td class="text-right text-nowrap">{{ $item->getFormattedUnitPrice() }} €</td>
|
|
<td class="text-right text-nowrap font-weight-semibold">{{ $item->getFormattedTotalPrice() }} €</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
</div>
|