@section('title', 'Reports')
@section('top-menu-items')
| Transaction Date | Order # | Wp Order Id | Company | Product | Quantity | Origin City | Origin Province | Origin Country | Stay Night Before | Stay Night After | Referral Source |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $order->bookings->min('booking_date') ? \Carbon\Carbon::parse($order->bookings->min('booking_date'))->format('Y-m-d') : '--' }} | {{ $order->id }} | {{ $order->wp_order_id }} | @if(!empty($order->partner_organization_name )) {{ $order->partner_organization_name }} @else Cash Customer @endif | @if($detail['tour_id']) {{ $detail['tour_name'] }} @else {{ $detail['tour_name'] ?? 'N/A' }} @endif | {{ $detail['passenger_count'] }} | {{ !empty($order->orderable->city) ? $order->orderable->city : '--' }} | {{ !empty($order->orderable->province) ? $order->orderable->province : '--' }} | {{ !empty($order->orderable->country) ? $order->orderable->country : '--' }} | {{ !empty($order->before_stay_address) ? $order->before_stay_address : '--' }} | {{ !empty($order->after_stay_address) ? $order->after_stay_address : '--' }} | {{ ($order->orderable->referral_source && $order->orderable->referral_source !== '0') ? $order->orderable->referral_source : '' }} |