@extends('admin.layouts.app') @section('page-title', 'Dashboard') @php use App\Models\Order; use App\Models\OrderItem; use App\Models\Shipment; use App\Models\Invoice; use App\Models\User; use App\Models\Admin; $totalOrders = Order::count(); $pendingOrders = Order::where('status', 'pending')->count(); $totalShipments = Shipment::count(); $totalItems = OrderItem::count(); $totalRevenue = Invoice::sum('final_amount_with_gst'); // USERS (CUSTOMERS) $activeCustomers = User::where('status', 'active')->count(); $inactiveCustomers = User::where('status', 'inactive')->count(); // STAFF (FROM ADMINS TABLE) $totalStaff = Admin::where('type', 'staff')->count(); $orders = Order::latest()->get(); @endphp @section('content')
| # | Order ID | Mark No | Origin | Destination | Total CTN | Total QTY | Total TTL/QTY | Total Amount (₹) | Total CBM | Total TTL CBM | Total KG | Total TTL KG | Status | Date | Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $order->id }} | {{ $order->order_id }} | {{ $order->mark_no }} | {{ $order->origin }} | {{ $order->destination }} | {{ $order->ctn }} | {{ $order->qty }} | {{ $order->ttl_qty }} | ₹{{ number_format($order->ttl_amount, 2) }} | {{ $order->cbm }} | {{ $order->ttl_cbm }} | {{ $order->kg }} | {{ $order->ttl_kg }} | @if($order->status == 'pending') @elseif($order->status == 'in_transit') @elseif($order->status == 'dispatched') @elseif($order->status == 'delivered') @endif {{ ucfirst(str_replace('_', ' ', $order->status)) }} | {{ $order->created_at->format('d-m-Y') }} | View |
| No orders found | |||||||||||||||
| # | Description | CTN | QTY | TTL/QTY | Unit | Price | TTL Amount | CBM | TTL CBM | KG | TTL KG | Shop No | Remove |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $item['description'] }} | {{ $item['ctn'] }} | {{ $item['qty'] }} | {{ $item['ttl_qty'] }} | {{ $item['unit'] }} | {{ $item['price'] }} | {{ $item['ttl_amount'] }} | {{ $item['cbm'] }} | {{ $item['ttl_cbm'] }} | {{ $item['kg'] }} | {{ $item['ttl_kg'] }} | {{ $item['shop_no'] }} |