mivita/resources/views/admin/abo/_executions.blade.php
2025-04-01 10:36:47 +02:00

109 lines
No EOL
5.8 KiB
PHP

<div class="card-body">
<h5 class="font-weight-semibold">
{{ __('navigation.abo') }} {{ __('tables.executions') }}
</h5>
<style>
table.table-product,
table.table-product tr td,
table.table-product tr th {
border: none;
}
table.table-product tr.border-top td {
border-top: 1px solid #b8b8b9;
}
table.table-product tr.border-bottom td,
table.table-product tr.border-bottom th {
border-bottom: 1px solid #b8b8b9;
}
</style>
<div class="table-responsive">
<table class="table table-product m-0" style="min-width:550px;">
<tbody>
<tr>
<th>#</th>
<th>{{__('tables.date')}}</th>
<th>{{__('tables.amount')}}</th>
<th>{{__('tables.payment')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('tables.shipping')}}</th>
<th>{{__('tables.art')}}</th>
<th>{{__('tables.invoice')}}</th>
<th>{{__('tables.firstname')}}</th>
<th>{{__('tables.lastname')}}</th>
<th>{{__('tables.email')}}</th>
<th>{{__('tables.status')}}</th>
<th>{{__('tables.rf_no')}}</th>
</tr>
@if($user_abo->user_abo_orders)
@foreach($user_abo->user_abo_orders()->orderBy('id', 'desc')->get() as $user_abo_order)
@if($user_abo_order->shopping_order)
<tr class="border-top">
<td>
@if($isAdmin)
@if($user_abo->is_for === 'me')
{!! '<a href="' . route('admin_sales_users_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-primary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@if($user_abo->is_for === 'ot')
{!! '<a href="' . route('admin_sales_customers_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-secondary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@else
@if($user_abo->is_for === 'me')
{!! '<a href="' . route('user_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-primary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@if($user_abo->is_for === 'ot')
{!! '<a href="' . route('user_shop_order_detail', [$user_abo_order->shopping_order_id]) . '" class="btn btn-xs btn-secondary">'.$user_abo_order->shopping_order_id.'</a>' !!}
@endif
@endif
</td>
<td>
{!! $user_abo_order->shopping_order->created_at->format("d.m.Y H:i") !!}
</td>
<td>
<span class="no-line-break">{!! $user_abo_order->shopping_order->getFormattedTotalShipping() !!} </span>
</td>
<td>
{!! $user_abo_order->shopping_order->getLastShoppingPayment('getPaymentType'); !!}
</td>
<td>
{!! \App\Services\Payment::getShoppingOrderBadge($user_abo_order->shopping_order) !!}
</td>
<td>
{!! '<span class="badge badge-pill badge-'.$user_abo_order->shopping_order->getShippedColor().'">'.$user_abo_order->shopping_order->getShippedType().'</span>' !!}
</td>
<td>
{!! '<span class="badge badge-pill badge-'.$user_abo_order->shopping_order->getPaymentForColor().'">'.$user_abo_order->shopping_order->getPaymentForType().'</span>' !!}
</td>
<td>
@if($user_abo_order->shopping_order->isInvoice())
{!! '<span class="no-line-break"><a href="'.route('storage_file', [$user_abo_order->shopping_order->id, 'invoice', 'download']).'" class="btn btn-primary btn-xs"><i class="fa fa-download"></i></a>
<a href="'.route('storage_file', [$user_abo_order->shopping_order->id, 'invoice', 'stream']).'" target="_blank" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a></span>' !!}
@endif
</td>
<td>
{{ $user_abo_order->shopping_order->shopping_user->shipping_firstname }}
</td>
<td>
{{ $user_abo_order->shopping_order->shopping_user->shipping_lastname }}
</td>
<td>
{{ $user_abo_order->shopping_order->shopping_user->shipping_email }}
</td>
<td>
{!! $user_abo_order->getStatusFormated()!!}
</td>
<td>
{{ $user_abo_order->shopping_order->getLastShoppingPayment('reference') }}
</td>
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
</div>
</div>