@extends('layouts.app') @section('title', 'Stock Take') @section('content') @php $num = fn ($v) => \App\Support\Fmt::plain($v, 2); $money = fn ($v) => \App\Support\Fmt::money($v); $day = fn ($v) => \App\Support\Fmt::day($v instanceof \DateTimeInterface ? $v->format('Y-m-d') : $v); $sel = 'h-9 w-full rounded-lg border border-input bg-transparent px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50'; @endphp

Physical counts against book balances; differences post as adjustments on approval

Stock Take

CSV
@include('partials.flashes')
@foreach ([ ['label' => 'Counts recorded', 'value' => (string) $counts->count()], ['label' => 'Adjustments posted', 'value' => (string) $postedAdjustments], ['label' => 'Open draft', 'value' => (string) $counts->where('status', 'Draft')->count()], ['label' => 'Approved', 'value' => (string) $counts->where('status', 'Approved')->count()], ] as $card)
{{ $card['value'] }} {{ $card['label'] }}
@endforeach
Start a new count
@csrf

Every item in the store is pulled in with its current book balance.

@if ($active)

{{ $active->stock_take_no }}

{{ $active->store?->name ?? '—' }} · {{ $day($active->counted_on) }} · {{ $active->counted_by }}

@include('kitchen.partials.badge', ['status' => $active->status]) Print
Reset
@if ($active->status === 'Draft')
@csrf @method('PUT')
@forelse ($activeLines as $line) @empty @endforelse
Item Book qty Counted Variance Unit cost Value
{{ $line->item?->name ?? '—' }} {{ $line->item?->unit }} {{ $num($line->book_qty) }} {{ $line->variance() === null ? '—' : \App\Support\Fmt::signed($line->variance()) }} {{ $money($line->item?->weighted_avg_cost ?? 0) }} {{ $money(abs($line->variance() ?? 0) * (float) ($line->item?->weighted_avg_cost ?? 0)) }}
No items match this filter.
{{ $active->uncountedLines() }} line(s) still uncounted
@else
@forelse ($activeLines as $line) @empty @endforelse
Item Book qty Counted Variance Value
{{ $line->item?->name ?? '—' }} {{ $num($line->book_qty) }} {{ $line->counted_qty === null ? '—' : $num($line->counted_qty) }} {{ $line->variance() === null ? '—' : \App\Support\Fmt::signed($line->variance()) }} {{ $money(abs($line->variance() ?? 0) * (float) ($line->item?->weighted_avg_cost ?? 0)) }}
No items match this filter.

This count is approved. Its differences have already been posted as adjustment movements.

@endif @if ($active->status === 'Draft')
@csrf Only lines with a counted quantity that differs from the book balance are posted.
@endif
@else
Select a count on the left to enter counted quantities, or start a new one.
@endif
@endsection