{{-- A megrendelés ügyvezetői jóváhagyásra vár START --}} @if(!$order->approved && isset($order->id)) @endif {{-- A megrendelés ügyvezetői jóváhagyásra vár END --}} {{-- A megrendelés túlfizetés START --}} @if($order->remaining_amount < 0) @endif {{-- A megrendelés túlfizetés END --}} {{-- A megrendelés lemondása ügyvezetői jóváhagyásra vár START --}} @if($order && $order->cancellation_status == 'awaiting_approval') @endif {{-- A megrendelés lemondása ügyvezetői jóváhagyásra vár END --}} {{-- A megrendelés lemondása elkészült START --}} @if($order && $order->cancellation_status == 'approved') @endif {{-- A megrendelés lemondása elkészült END --}} {{-- A megrendelés ellenőrzésre vár START --}} @php if(isset($order->id)) (App\Models\Order::where('id', $order->id) ->whereNotNull('offer_sent_at')->where('post_order_survey_check_required', true) ->whereHas('surveys', function ($q) { $q->whereIn('status', ['completed']) ->where(function ($k) { $k->whereNotNull('offers.offer_sent_at') ->where('surveys.created_at', '>=', $k->raw('offers.offer_sent_at')); }); }) ->whereDoesntHave('surveys', function ($l) { $l->whereIn('status', ['organize', 'organized']); }) ->first()) ? $has_completed_post_order_survey = true : $has_completed_post_order_survey = false; @endphp @if($order->post_order_survey_check_required && isset($order->id) && $has_completed_post_order_survey) @endif {{-- A megrendelés ellenőrzésre vár END --}} {{-- A megrendelés felmérésre vár START --}} @php if(isset($order->id)) (App\Models\Order::where('id', $order->id) ->whereNotNull('offer_sent_at')->where('post_order_survey_check_required', true) ->whereHas('surveys', function ($q) { $q->whereIn('status', ['organize', 'organized']) ->where(function ($k) { $k->whereNotNull('offers.offer_sent_at') ->where('surveys.created_at', '>=', $k->raw('offers.offer_sent_at')); }); }) ->first()) ? $waiting_for_survey = true : $waiting_for_survey = false; @endphp @if($order->post_order_survey_check_required && isset($order->id) && $waiting_for_survey) @endif {{-- A megrendelés felmérésre vár END --}} {{-- Webről érkezett ajánlat ellenőrzése --}} @if( $offer->status == 'arrived_from_web' && isset($offer->id) && $offer->process->client->first_name == null && $offer->process->address->city == null ) @endif