@extends('layouts.frontend') @section('content')

{{ __('messages.rent_cart_heading') }}

@if ($cartItems->isEmpty())
{{ __('messages.cart_empty_message') }} {{ __('messages.cart_browse_products') }} {{ __('messages.cart_browse_suffix') }}
@else @php $firstItem = $cartItems->first(); @endphp @foreach ($cartItems as $item)
{{ $item->product_name }}

{{ $item->product_name }} | {{$item->size}} | {{$item->color}}

{{ $item->vendor_address }}

@if ($item->coupon_code) {{--
Coupon Applied: {{ $item->coupon_code }}
-{{ number_format($item->discount, 2) }}€ discount
--}}
{{ __('messages.coupon_applied') }} {{ strtoupper(trim($item->coupon_code, '[]" ')) }}
- {{ number_format($item->discount, 2, ',', '') }} €
@endif

{{ __('messages.car_information') }}:

{{ __('messages.brand') }} :
{{ $item->car_name ?? 'N/A' }}
{{ __('messages.model') }} :
{{ $item->model ?? 'N/A' }}
{{ __('messages.year') }} :
{{ $item->car_year ?? 'N/A' }}
{{ __('messages.railing_type') }} :
{{ $item->roof_type ?? 'N/A' }}
{{ __('messages.trailer_hitch') }} :
{{ $item->trailer_hitch ? __('messages.yes') : __('messages.no') }}

{{ __('messages.renting_details') }}:

{{ __('messages.from') }}:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }}
{{ __('messages.to') }}:
{{ \Carbon\Carbon::parse($item->dropoff_date)->format('d.m.Y') }}
{{ __('messages.pickup_date_time') }}:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }} | {!! $item->pickup_time ? \Carbon\Carbon::parse($item->pickup_time)->format('H:i') : 'Not set' !!}
{{ __('messages.dropoff_date_time') }}:
{{ \Carbon\Carbon::parse($item->dropoff_date)->format('d.m.Y') }} | {!! $item->dropoff_time ? \Carbon\Carbon::parse($item->dropoff_time)->format('H:i') : 'Not set' !!}

{{ __('messages.rent_information') }}:

{{ __('messages.quantity') }}:
01
{{ __('messages.rental_days') }}:
{{ $item->days }}
{{ __('messages.for_days', ['days' => $item->days]) }}:
{{ __('messages.total') }} {{ number_format($item->calculated_rent, 2) }}€
@if ($item->is_carrier_included)
{{ __('messages.carrier_included') }}
{{ __('messages.length') }}:
{{ $item->carrier_length ?? 'N/A' }}
{{ __('messages.foot_kit') }}:
{{ $item->footkit_sku ?? 'N/A' }}
{{ __('messages.foot') }}:
{{ $item->foot_sku ?? 'N/A' }}
@endif @if ($item->is_insured)
{{ __('messages.volkasko_insurance') }} 25 €
@endif
@if (is_null($item->related_item)) @endif
@endforeach
{{ __('messages.have_voucher') }}
@endif
@if (!$cartItems->isEmpty())
{{ __('messages.cart_totals') }}
{{ __('messages.subtotal') }}:
{{ number_format($subtotal, 2, ',', '') }}€
{{ __('messages.discount') }}:
{{ number_format($discount, 2, ',', '') }}€
{{ __('messages.net_price') }}:
{{ number_format($netPrice, 2, ',', '') }}€
{{ __('messages.net_price_insurance') }}:
{{ number_format($insuranceTotal, 2, ',', '') }}€
{{ __('messages.tax_19') }}:
{{ number_format($tax, 2, ',', '') }}€
{{ __('messages.total') }}:
{{ number_format($total, 2, ',', '') }}€
@php $hasMissingTimes = false; foreach ($cartItems as $item) { if (empty($item->pickup_time) || empty($item->dropoff_time)) { $hasMissingTimes = true; $itemWithMissingTime = $item; break; } } $href = $hasMissingTimes ? route('cart.confirm', ['cartItem' => $itemWithMissingTime->id]) : route('user.checkout.index'); @endphp
{{ __('messages.add_more_rental_products') }}
@endif
@endsection