@extends('backend.layouts.app') @section('content')

Orders List

@csrf
@csrf
@csrf
@csrf
 

{{ $total_orders }}

Total Order

{{ $pending_orders }}

Total Pending

{{ $confirm_orders }}

Total Confirm

{{ $hold_orders }}

Total Hold

{{ $cancel_orders }}

Total Cancel

@php $total_revineu = 0; foreach ($total_completed as $completed) { $total_revineu += $completed->total; } @endphp

{{ number_format($total_revineu) }} Tk

Revenue

@foreach ($orders as $sl=>$order) @endforeach
sl Image Invoice No. Customer Info Product Subtotal Charge Total Status Date Action
{{ $sl+1 }} @foreach ($order->rel_to_orderpro->take(1) as $OrderProduct) @if ($OrderProduct != null) @if ($OrderProduct->rel_to_attribute != null) {{-- {{ $OrderProduct->rel_to_attribute->image }} --}} Image @elseif ($OrderProduct->rel_to_pro) {{-- Image --}} @endif @endif @endforeach {{ $order->order_id }} {{ $order->rel_to_billing ? $order->rel_to_billing->name : 'No Billing Details' }}
{{ $order->rel_to_billing ? $order->rel_to_billing->mobile : 'No Billing Details' }}
{{ $order->rel_to_billing ? $order->rel_to_billing->address : 'No Billing Details' }}
{{ $order->rel_to_billing ? $order->rel_to_billing->district : 'No Business Name' }}
@if ($order->status == 4) @endif
@foreach ($order->rel_to_orderpro as $OrderProduct) @if ($OrderProduct != null) @if ($order->landing == 1) {{ $OrderProduct->rel_to_pro->name??'' }}
{{ $OrderProduct->quantity }} x {{ $OrderProduct->price }}, @if ($order->color != null) Color: {{ $order->color }} @endif @if ($order->size) Size: {{ $order->size }} @endif

@else @if ($OrderProduct->rel_to_attribute != null) {{ $OrderProduct->rel_to_pro->name??'' }}
{{ $OrderProduct->quantity }} x {{ $OrderProduct->price }}, @if ($OrderProduct->rel_to_attribute->weight != null) Package: {{ $OrderProduct->rel_to_attribute->weight }} @else Color: {{ $OrderProduct->rel_to_attribute->rel_to_color->name }} Size: {{ $OrderProduct->rel_to_attribute->rel_to_size->name }} @endif

@elseif ($OrderProduct->rel_to_pro != null) {{ $OrderProduct->rel_to_pro->name }}
{{ $OrderProduct->quantity }} x {{ $OrderProduct->rel_to_pro ? $OrderProduct->rel_to_pro->sell_price : $OrderProduct->rel_to_pro->price }}, @if ($OrderProduct->rel_to_pro->weight != null) Package: {{ $OrderProduct->rel_to_pro->weight }} @else Color: {{ $OrderProduct->rel_to_pro->color_id }} Size: {{ $OrderProduct->rel_to_pro->size_id }} @endif

@endif @endif @endif @endforeach
{{ $order->sub_total }}Tk {{ $order->delivery_charge }}Tk {{ $order->total }}Tk @if ($order->status == 0)
Pending
@elseif ($order->status == 1)
On Hold
@elseif ($order->status == 2)
Processing Order
@elseif ($order->status == 3)
On Delivery
@elseif ($order->status == 4)
Confirmed
@else
Cancel
@endif
{{ $order->created_at->format('d-m-Y h:i:s') }}
@endsection @section('footer_scripts') {{-- --}} @endsection