@php $order = null; if (isset($orders) && $orders instanceof \Illuminate\Support\Collection) { $order = $orders->where('is_finished', true)->first(); if (!$order) { $order = $orders->first(); } } @endphp @if ($order && $order->isPaymentProofEnabled()) @php $isCustomer = auth('customer')->check(); $guestProofEnabled = EcommerceHelper::isGuestPaymentProofEnabled(); $uploadRoute = $isCustomer ? route('customer.orders.upload-proof', $order) : ($guestProofEnabled ? route('public.orders.upload-proof-guest', $order->token) : null); $downloadRoute = $isCustomer ? route('customer.orders.download-proof', $order) : ($guestProofEnabled ? route('public.orders.download-proof-guest', $order->token) : null); @endphp @if ($order->canBeCanceled() && ($isCustomer || $guestProofEnabled))
{{ __('Or you can upload a new one, the old one will be replaced.') }}
@endif