Reports

Search
Check Your Order Below Filter Tab
@forelse($orders as $key => $order) @empty @endforelse
# Items #ID's Date Amount (PKR) Profit (PKR) Printed Status Shopify ID Tracking ID Tracking Info Action
{{($key+1)}}
@php $sellerName = auth()->user()->name ?? 'Seller'; $productDetails = $order->items->map(function($item) { $variant = $item->productVariant; $product = $variant?->product; if (!$product) return ''; $brand = $product->brand?->title ?? 'AR'; $attrs = $variant->getAttributeSummary(); return $product->title . ' (' . $brand . ($attrs ? ' | ' . $attrs : '') . ' | Qty: ' . $item->quantity . ')'; })->filter()->implode("\n"); $courierName = $order->shipper?->title ?? 'N/A'; $trackingNumber = $order->shipping_ref ?? 'N/A'; $amount = $order->base_amount ?? 0; $sellerPhone = $order->sellerProfile?->phone ?? auth()->user()->seller_profile?->phone ?? '0332-3399562'; $whatsappMessage = "This message is from Dear " . $sellerName . "\n\n"; $whatsappMessage .= "This is to inform you that your order has been dispatched and is en route.\n"; $whatsappMessage .= "It will be arriving soon in your city for delivery.\n\n"; $whatsappMessage .= "Order details are as follows:\n"; $whatsappMessage .= "Product Name: " . $productDetails . "\n"; $whatsappMessage .= "Courier: " . $courierName . "\n"; $whatsappMessage .= "Tracking Number: " . $trackingNumber . "\n"; $whatsappMessage .= "Amount to be Paid: Rs. " . number_format($amount) . "\n\n"; $whatsappMessage .= "In case of any query or complaint, you can contact us at " . $sellerPhone . ".\n"; $whatsappMessage .= "Thank you!"; $encodedMessage = urlencode($whatsappMessage); // Format phone number for WhatsApp (Pakistan format: 92XXXXXXXXXX) $phoneNumber = preg_replace('/[^0-9]/', '', $order->customer_phone); // Remove leading zeros $phoneNumber = ltrim($phoneNumber, '0'); // If doesn't start with 92, add it (Pakistan country code) if (substr($phoneNumber, 0, 2) !== '92') { $phoneNumber = '92' . $phoneNumber; } @endphp @php $showSellerStatus = !in_array($order->status, [ \App\Models\Order::STATUS_CANCELLED, \App\Models\Order::STATUS_ON_HOLD, \App\Models\Order::STATUS_PENDING, \App\Models\Order::STATUS_READY_TO_PROCESS ]); @endphp @if($showSellerStatus)
@if($order->seller_status == \App\Models\Order::SELLER_STATUS_PAID) Paid @else Unpaid @endif
@endif

{{\App\Helpers\Helper::to_local_date($order->created_at, 'Y-m-d')}}

{{\App\Helpers\Helper::to_local_date($order->created_at, 'H:i:s')}}

{{ $order->base_amount }} {{$order->seller_profit_amount}} {{\App\Models\Order::STATUS[$order->status]}} - {{ $order->shipping_ref }}
{{-- Tracking Button: Show for all except Pending --}} @if(!in_array($order->status,[\App\Models\Order::STATUS_PENDING])) @endif {{-- Cancel Button: Only for Pending orders --}} @if($order->status === \App\Models\Order::STATUS_PENDING) @endif {{-- Request Button: ONLY show for Shipped status --}} @if($order->status === \App\Models\Order::STATUS_SHIPPED) @endif
{{-- --}}
Name Mobile Address
{{$order->customer_name}} {{$order->customer_phone}} {{$order->customer_address}}--}} {{-- --}} {{--
@foreach($order->items as $item) @php $productVariant = $item->productVariant; $product = $productVariant?->product; @endphp @if($productVariant && $product)
  • {{ $product->title }}
    {{ $product->title }}
    • {{@$product->brand->title}} | {{$productVariant->getAttributeSummary()}} | Qty: {{ $item->quantity }}

    • {{ $item->unit_amount }} PKR
    • @if(!empty($item->print_details))
    • Print Details
      @if(!empty($item->print_details['text']))
      Text: {{ Str::limit($item->print_details['text'], 80) }}
      @endif @if(!empty($item->print_details['instructions']))
      Notes: {{ Str::limit($item->print_details['instructions'], 120) }}
      @endif @if(!empty($item->print_details['file'])) @endif
    • @endif
@else
Product information not available for this item.
@endif @endforeach
No orders found.
@push('styles') @endpush @push('scripts') @endpush