@extends('layouts.app') @section('title', __('inventory_count.title')) @section('content')

@lang('inventory_count.title')

@component('components.widget', ['class' => 'box-primary', 'title' => __('inventory_count.menu')]) @slot('tool') @can('inventory_count.create')
@lang('inventory_count.new_count')
@endcan @endslot
@forelse($counts as $count) @php $progress = $count->items_count > 0 ? round(($count->counted_items_count / $count->items_count) * 100) : 0; $badge = [ 'in_progress' => 'label-warning', 'submitted' => 'label-info', 'approved' => 'label-primary', 'posted' => 'label-success', 'cancelled' => 'label-default', ][$count->status] ?? 'label-default'; @endphp @empty @endforelse
@lang('inventory_count.reference') @lang('inventory_count.name') @lang('inventory_count.location') @lang('inventory_count.scope') @lang('inventory_count.progress') @lang('inventory_count.variance_items') @lang('inventory_count.status') @lang('inventory_count.started_at') @lang('inventory_count.actions')
{{ $count->reference_no }} {{ $count->name }} {{ optional($count->location)->name }} {{ $count->scope_type === 'cycle' ? __('inventory_count.scope_cycle') : __('inventory_count.scope_full') }}
{{ $progress }}%
{{ $count->counted_items_count }} / {{ $count->items_count }}
@if($count->blind_count && $count->status === \App\InventoryCount::STATUS_IN_PROGRESS && !auth()->user()->can('inventory_count.approve')) — @else {{ $count->variance_items_count }} @endif {{ $count->status_label }} {{ @format_datetime($count->started_at) }} @lang('inventory_count.view') @if($count->status === \App\InventoryCount::STATUS_IN_PROGRESS && auth()->user()->can('inventory_count.count')) @lang('inventory_count.continue_count') @elseif($count->status === \App\InventoryCount::STATUS_SUBMITTED && auth()->user()->can('inventory_count.approve')) @lang('inventory_count.review_recounts') @endif
@lang('inventory_count.no_counts')
{{ $counts->links() }}
@endcomponent
@endsection @section('javascript') @endsection