@php $settings = app(\App\Support\AppSettings::class)->all(); $currency = $settings['currency'] ?? 'USD'; @endphp
Live Pharmacy Command {{ $currency }}

Sales, stock, expiry, and staff decisions in one control room.

Inventory value {{ $currency }} {{ number_format($summary['inventory_value'], 2) }}

Medicines

{{ $summary['active_medicines'] }}

Sellable batches

{{ $summary['sellable_batches'] }}

@foreach ([ ['Today Sales', $currency.' '.number_format($summary['today_sales'], 2), 'receipt-text', 'bg-white', 'text-emerald-700', 'Invoices '.$summary['today_invoices']], ['Gross Profit', $currency.' '.number_format($summary['gross_profit'], 2), 'trending-up', 'bg-white', 'text-cyan-700', 'Today margin'], ['Low Stock', $summary['low_stock_count'], 'triangle-alert', 'bg-amber-50', 'text-amber-700', 'Needs reorder'], ['Expired Stock', $summary['expired_count'], 'ban', 'bg-rose-50', 'text-rose-700', 'Remove from sale'], ] as [$label, $value, $icon, $bg, $color, $caption])

{{ $label }}

{{ $value }}

{{ $caption }}

@endforeach

Top Selling Medicines

Best movement in the last 30 days

30 days
@forelse ($topSelling as $item) @empty @endforelse
Brand Generic Units Revenue
{{ $item->brand_name }} {{ $item->generic_name }} {{ $item->units }} {{ $currency }} {{ number_format($item->revenue, 2) }}
No sales yet. Start from POS to build analytics.

Operational Pulse

Customers

{{ $summary['customers'] }}

Staff

{{ $summary['employees'] }}

Suppliers

{{ $summary['suppliers'] }}

Open POs

{{ $summary['open_purchase_orders'] }}

Expiry Watch

@forelse ($nearExpiry as $batch)

{{ $batch->brand->brand_name }}

{{ $batch->batch_no }} - {{ $batch->branch->code }}

{{ $batch->exp_date->format('d M Y') }}
@empty

No near-expiry batches.

@endforelse

Low Stock Queue

@forelse ($lowStock as $batch)

{{ $batch->brand->brand_name }}

{{ $batch->brand->medicine->generic_name }} - {{ $batch->branch->code }}

{{ $batch->quantity }} left
@empty

Stock levels are healthy.

@endforelse

Recent Sales

@forelse ($recentSales as $sale)

{{ $sale->invoice_no }}

{{ $sale->customer?->name ?? 'Walk-in customer' }} - {{ $sale->cashier?->name }}

{{ $currency }} {{ number_format($sale->total, 2) }}
@empty

No invoices created yet.

@endforelse

Recent Store Messages

View Inbox
@forelse ($recentMessages as $msg)
{{ $msg->name }} {{ $msg->created_at->diffForHumans() }}

{{ $msg->subject ?? 'No Subject' }}

{{ $msg->message }}

@empty

No messages received.

@endforelse