@php $one_time_items = $user_abo->one_time_items()->with('product')->get(); $hasOneTimeChanges = \App\Services\AboOneTimeService::hasUnconfirmedChanges($user_abo); $hasConfirmedOneTimeItems = \App\Services\AboOneTimeService::hasConfirmedItems($user_abo); $hasBindingConfirmed = \App\Services\AboOneTimeService::confirmedItems($user_abo)->isNotEmpty(); $confirmedGross = $summary['one_time']['gross'] ?? 0; $pendingGross = \App\Services\AboOneTimeService::pendingGross($user_abo); $nextDeliveryTotal = $summary['total_with_shipping'] ?? 0; $oneTimeConfirmationState = $hasOneTimeChanges ? 'changed' : ($hasConfirmedOneTimeItems ? 'confirmed' : 'empty'); @endphp @if (isset($error_message) && $error_message)
{{ $error_message }}
@endif
@forelse($one_time_items as $one_time_item) @empty @endforelse @if ($hasBindingConfirmed) @endif @if ($pendingGross > 0) @if ($hasBindingConfirmed) @endif @endif
# {{ __('order.article') }} {{ __('tables.quantity') }} {{ __('tables.price') }}
@if ($one_time_item->product && count($one_time_item->product->images)) @endif {{ $one_time_item->product?->getLang('name') }} {{ __('abo.onetime_badge') }} @if ($one_time_item->isConfirmed()) {{ __('abo.onetime_status_confirmed') }} @else {{ __('abo.onetime_status_pending') }} @endif
{{ __('order.content') }}: {{ $one_time_item->product?->contents }}
{{ __('order.art_no') }}: {{ $one_time_item->product?->number }}
{{ $one_time_item->getFormattedTotalPrice() }} €
{{ __('abo.onetime_empty') }}

{{ __('abo.onetime_confirmed_subtotal') }}: {{ formatNumber($confirmedGross) }} €
{{ __('abo.onetime_next_delivery_total') }}: {{ formatNumber($nextDeliveryTotal) }} €

{{ __('abo.onetime_pending_subtotal') }}: + {{ formatNumber($pendingGross) }} €
{{ __('abo.onetime_new_total') }}: {{ formatNumber(($hasBindingConfirmed ? $confirmedGross : 0) + $pendingGross) }} €
@if ($one_time_items->count() > 0)

{!! __('abo.onetime_legal_notice', [ 'nextBillingDate' => $user_abo->next_date ?: __('abo.confirm_next_delivery_unknown'), 'agb' => '' . __('abo.confirm_terms_link') . '', 'withdrawal' => '' . __('abo.confirm_withdrawal_link') . '', ]) !!}

@if ($hasOneTimeChanges)
@elseif($hasConfirmedOneTimeItems)
{{ __('abo.onetime_confirm_success') }}
@endif @if ($hasOneTimeChanges && $hasConfirmedOneTimeItems)
{{ __('abo.onetime_pending_hint') }}
@endif
@endif