@extends('layouts.app') @section('title', __('Ripoti ya Ukaguzi') . ' #' . $count->id) @section('content') @php $acc = (float) $count->accuracy; @endphp
← {{ __('Ukaguzi wote') }}

{{ $count->title }} {!! status_badge($count->status) !!}

{{ $count->branch->name }} · {{ $count->category->name ?? __('Bidhaa zote') }} · {{ __('Mkaguzi') }}: {{ $count->counter->name }} · {{ optional($count->started_at)->format('d/m/Y H:i') }} – {{ optional($count->submitted_at)->format('H:i') }}@if ($r['duration']) ({{ $r['duration'] }} {{ __('saa') }})@endif

{!! icon('file') !!} {{ __('Excel') }} @if ($count->status === 'submitted' && auth()->user()->allows('stock.count_approve'))
@csrf
@endif
@if ($count->status === 'approved')
{!! icon('check') !!}
{{ __('Stoo ilisawazishwa na') }} {{ $count->approver->name ?? '' }} · {{ optional($count->approved_at)->format('d/m/Y H:i') }}
@elseif (! auth()->user()->allows('stock.count_approve'))
{!! icon('shield') !!}
{{ __('Ripoti imetumwa kwa mmiliki. Kusawazisha stoo kunafanywa na meneja/mmiliki baada ya kupitia ripoti hii.') }}
@endif
{{ __('Usahihi wa stoo') }}
{{ rtrim(rtrim(number_format($acc, 1), '0'), '.') }}%
{{ $count->matched_items }} / {{ $count->counted_items }} {{ __('bidhaa ziko sawa') }}
{!! icon('alert') !!}
{{ __('Upungufu') }}
{{ money(abs($count->shortage_value)) }}
{{ $r['short_items'] }} {{ __('bidhaa') }}
{!! icon('plus') !!}
{{ __('Ziada') }}
{{ money($count->overage_value) }}
{{ $r['over_items'] }} {{ __('bidhaa') }}
{!! icon('wallet') !!}
{{ __('Tofauti halisi') }}
{{ money($count->variance_value) }}
{{ __('Usahihi wa thamani') }}: {{ $r['value_accuracy'] }}%

{!! icon('layers') !!} {{ __('Kwa makundi') }}

@foreach ($r['by_category'] as $c) @endforeach
{{ __('Kundi') }}{{ __('Bidhaa') }}{{ __('Usahihi') }}{{ __('Upungufu') }}{{ __('Ziada') }}{{ __('Tofauti') }}
{{ $c->name }}{{ $c->items }} {{ $c->accuracy }}% {{ money(abs($c->short_value), false) }}{{ money($c->over_value, false) }} {{ money($c->net, false) }}

{!! icon('eye') !!} {{ __('Muhtasari') }}

{{ __('Bidhaa kwenye wigo') }}
{{ $count->scope_items }}
{{ __('Zimehesabiwa') }}
{{ $count->counted_items }}
{{ __('Hazijahesabiwa') }}
{{ count($r['uncounted']) }}
{{ __('Thamani (mfumo)') }}
{{ money($r['system_value']) }}
{{ __('Thamani (halisi)') }}
{{ money($r['counted_value']) }}
@if ($count->note)
{{ __('Maelezo') }}
{{ $count->note }}
@endif

{{ __('Bidhaa zenye tofauti') }}

@foreach ($r['items'] as $i) @endforeach
{{ __('Bidhaa') }}{{ __('Kundi') }}{{ __('Mfumo') }}{{ __('Imehesabiwa') }}{{ __('Tofauti') }}{{ __('Thamani') }}{{ __('Muda') }}
{{ $i->product->name }} {{ $i->product->sku }}{{ $i->product->category->name ?? '—' }} {{ $i->system_qty }}{{ $i->counted_qty }} {{ $i->variance > 0 ? '+' : '' }}{{ $i->variance }} {{ money($i->variance_value, false) }} {{ optional($i->counted_at)->format('H:i') }}
@if (count($r['uncounted']))

{!! icon('alert') !!} {{ __('Bidhaa ambazo hazijahesabiwa') }} ({{ count($r['uncounted']) }})

@foreach ($r['uncounted'] as $p){{ $p->name }}@endforeach
@endif @endsection @push('scripts') @endpush