114 lines
No EOL
6.6 KiB
PHP
114 lines
No EOL
6.6 KiB
PHP
@php($cartInstance = \App\Services\AboOrderCart::INSTANCE)
|
|
@if(isset($error_message) && $error_message)
|
|
<div class="alert alert-danger mt-2" id="insert_show_error_message">{{ $error_message }}</div>
|
|
@endif
|
|
<div class="table-responsive">
|
|
<table class="table table-product m-0" style="min-width:550px;">
|
|
<thead> <tr>
|
|
<th>#</th>
|
|
<th>{{__('order.article')}}</th>
|
|
<th>{{__('tables.quantity')}}</th>
|
|
<th class="text-right"> {{ __('tables.price') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if($user_abo->user_abo_items)
|
|
@foreach($user_abo->user_abo_items as $abo_item)
|
|
@if(!$abo_item->comp)
|
|
<tr>
|
|
<td>
|
|
@if(count($abo_item->product->images))
|
|
<img class="img-fluid img-extra" alt="" src="{{ route('product_image', [$abo_item->product->images->first()->slug]) }}">
|
|
@endif
|
|
</td>
|
|
|
|
<td class="min-width-80">
|
|
<strong>{{ $abo_item->product->getLang('name') }}</strong>
|
|
{!! get_abo_type_badge_by_product($abo_item->product) !!}
|
|
<div class="text-body">
|
|
<div>{{ __('order.content') }}: {{ $abo_item->product->contents }}</div>
|
|
<div>{{ __('order.art_no') }}: {{ $abo_item->product->number }}</div>
|
|
</div>
|
|
@if((!isset($only_show_products) || !$only_show_products) && (!isset($add_only_mode) || !$add_only_mode))
|
|
<div class="options">
|
|
<a href="#" class="auto-delete-product remove_item_form_cart product-tooltip" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}"><i class="fa fa-times"></i> {{ __('order.article_remove') }}</a>
|
|
</div>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if(!isset($only_show_products) || !$only_show_products)
|
|
<div class="no-line-break input-group-min-w">
|
|
<div class="input-group d-inline-flex w-auto">
|
|
@if(!isset($add_only_mode) || !$add_only_mode)
|
|
<span class="input-group-prepend">
|
|
<button type="button" class="btn btn-secondary icon-btn md-btn-extra remove-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}">-</button>
|
|
</span>
|
|
@endif
|
|
<input type="text" class="form-control text-center input-extra table-input-event-onchange" name="product_qty_{{$abo_item->id}}" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}" value="{{$abo_item->qty}}" {{ (isset($add_only_mode) && $add_only_mode) ? 'readonly' : '' }}>
|
|
<span class="input-group-append">
|
|
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-from-basket" data-order-item-id="{{$abo_item->id}}" data-product-id="{{ $abo_item->product->id }}" data-product-name="{{ $abo_item->product->getLang('name') }}" data-product-price="{{ $abo_item->getFormattedPrice() }} €">+</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="no-line-break"> {{ $abo_item->qty }}</div>
|
|
@endif
|
|
</td>
|
|
<td class="text-right font-weight-semibold align-top px-3 py-2" style="width: 100px;">
|
|
<div class="no-line-break"> {{ $abo_item->getFormattedTotalPrice() }} €</div>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4"><hr></td>
|
|
</tr>
|
|
@if(isset($split_mode) && $split_mode)
|
|
<tr>
|
|
<td colspan="3" class="text-right small"><strong>{{ __('abo.abo_subtotal') }}:</strong></td>
|
|
<td class="text-right small">{{ formatNumber($summary['abo']['gross'] ?? 0) }} €</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('abo.abo_next_delivery_total') }}:</strong></td>
|
|
<td class="text-right small no-border-top">{{ formatNumber($summary['total_with_shipping'] ?? 0) }} €</td>
|
|
</tr>
|
|
@else
|
|
@php($taxFree = Yard::instance($cartInstance)->getUserTaxFree())
|
|
<tr>
|
|
<td colspan="3" class="text-right small"><strong>{{ __('order.subtotal') }}:</strong></td>
|
|
<td class="text-right small">{{ Yard::instance($cartInstance)->subtotal() }} €</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('Delivery country') }}:</strong></td>
|
|
<td class="text-right small no-border-top">{{ Yard::instance($cartInstance)->getShippingCountryName() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.shipping_costs') }}:</strong></td>
|
|
<td class="text-right small no-border-top">{{ $taxFree ? Yard::instance($cartInstance)->shippingNet() : Yard::instance($cartInstance)->shipping() }} € </td>
|
|
</tr>
|
|
@if($taxFree)
|
|
<tr>
|
|
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.sum_net') }}:</strong></td>
|
|
<td class="text-right small no-border-top">{{ Yard::instance($cartInstance)->subtotalWithShipping() }} €</td>
|
|
</tr>
|
|
@else
|
|
<tr>
|
|
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.total_without_VAT') }}:</strong></td>
|
|
<td class="text-right small no-border-top">{{ Yard::instance($cartInstance)->subtotalWithShipping() }} €</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" class="text-right small no-border-top"><strong>{{ __('order.plus_VAT') }}:</strong></td>
|
|
<td class="text-right small no-border-top">{{ Yard::instance($cartInstance)->taxWithShipping() }} €</td>
|
|
</tr>
|
|
@endif
|
|
<tr>
|
|
<td colspan="3" class="text-right"><strong>{{ __('order.total_sum') }}:</strong></td>
|
|
<td class="text-right">{{ Yard::instance($cartInstance)->totalWithShipping() }} €</td>
|
|
</tr>
|
|
@endif
|
|
</tfoot>
|
|
</table>
|
|
</div> |