@extends('layouts.app') @section('title', 'Pharmacy Health') @php $grade = \App\Models\StockCount::grade($summary['score']); [$gradeLabel, $gradeTone] = $grade ? \App\Models\StockCount::GRADES[$grade] : ['No counts yet', 'secondary']; $statusInfo = \App\Services\PharmacyHealth::STAFF_STATUS; $trend = $counts->where('status', 'finished')->sortBy('finished_at')->take(-20)->values(); @endphp @section('content')
Shelf counts against the system: is stock where the system says it is? Missing stock is the pharmacy's overall result.
From Loss Prevention in the same period: deleted or edited sales, voids, cash shortages and similar. Stock counts are not put against anyone.
| Person | Shifts | Sales | Warnings | Status |
|---|---|---|---|---|
| {{ $s->user->name }} | {{ $s->shifts }} | {{ formatCurrency($s->sales_total) }} {{ $s->sales_count }} sales |
{{ $s->warnings }}
@if($s->serious) {{ $s->serious }} serious @endif
|
{{ $sLabel }} |
| No staff activity in this period. | ||||
| Date | Products | Counted by | Matched | Short | Missing (cost) | Health | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ ($c->finished_at ?? $c->created_at)->format('d M Y H:i') }} | {{ $c->scope_label }}@if($c->note) {{ $c->note }} @endif |
{{ $c->user->name ?? '-' }} | @if($c->isOpen())In progress | @else{{ $c->lines_matched }} / {{ $c->lines_counted }} | {{ $c->lines_short }} | {{ formatCurrency((float) $c->shortage_value) }} | {{ rtrim(rtrim(number_format((float) $c->health_score, 1), '0'), '.') }}% | @endif{{ $c->isOpen() ? 'Continue' : 'View' }} | |||
| No counts in this period{{ $search ? ' matching "' . $search . '"' : '' }}. Start one when you next visit. | |||||||||||