@unless (\Webkul\Barcode\Support\NativeApp::usesNativeNavigation()) @include('barcode::components.header.web', [ 'title' => __('barcode::app.adjustments.title'), 'breadcrumbs' => [ ['label' => __('barcode::app.title'), 'href' => route('barcode.dashboard')], ['label' => __('barcode::app.adjustments.title')], ], 'showBarcode' => $editingQuantity ? null : true, 'showCancel' => $editingQuantity ? true : null, 'cancelAction' => 'discardQuantityEdit', ]) @endunless @if ($editingQuantity) @php $productImages = $editingQuantity->product?->images ?? []; $productImage = is_array($productImages) ? ($productImages[0] ?? null) : null; $productImageUrl = is_string($productImage) && $productImage !== '' ? (str_starts_with($productImage, 'http') || str_starts_with($productImage, '/') ? $productImage : asset('storage/'.$productImage)) : null; $currentCountedQuantity = $editingQuantity->inventory_quantity_set ? (float) $editingQuantity->counted_quantity : 0.0; $remainingToFullCount = max((float) $editingQuantity->quantity - $currentCountedQuantity, 0); @endphp
{{ $editingQuantity->location?->full_name ?? $editingQuantity->location?->name }} {{ $editingQuantity->product?->name }} @if ($editingQuantity->lot?->name) {{ __('barcode::app.adjustments.lot-serial') }}: {{ $editingQuantity->lot->name }} @endif
@if ($productImageUrl) {{ __('barcode::app.adjustments.edit-tooltip') }} @else {{ mb_substr((string) $editingQuantity->product?->name, 0, 1) }} @endif
{{ __('barcode::app.adjustments.editor-title') }} {{ __('barcode::app.adjustments.editor-subtitle') }}
{{ $editingQuantity->product?->uom?->name }}
0 -1 +1 +{{ number_format($remainingToFullCount, 0) }}
{{ __('barcode::app.adjustments.location') }} {{ $editingQuantity->location?->full_name ?? '—' }}
{{ __('barcode::app.adjustments.lot-serial') }} {{ $editingQuantity->lot?->name ?? '—' }}
{{ __('barcode::app.adjustments.on-hand') }} {{ number_format((float) $editingQuantity->quantity, 2) }} {{ $editingQuantity->product?->uom?->name }}
{{ __('barcode::app.adjustments.counted') }} {{ number_format($currentCountedQuantity, 2) }} {{ $editingQuantity->product?->uom?->name }}
@else
{{ __('barcode::app.operation.camera-unavailable') }}
@if ($selectedLocation || $selectedProduct || $selectedLot) {{ __('barcode::app.adjustments.title') }}
@if ($selectedLocation) {{ __('barcode::app.adjustments.location') }}: {{ $selectedLocation->full_name ?? $selectedLocation->name }} @endif @if ($selectedProduct) {{ __('barcode::app.adjustments.product') }}: {{ $selectedProduct->name }} @endif @if ($selectedLot) {{ __('barcode::app.adjustments.lot-serial') }}: {{ $selectedLot->name }} @endif
@elseif ($notice) {{ __('barcode::app.adjustments.title') }} {{ $notice }} @endif
{{ __('barcode::app.adjustments.title') }}
@forelse ($quantities as $quantity) @php $productImages = $quantity->product?->images ?? []; $productImage = is_array($productImages) ? ($productImages[0] ?? null) : null; $productImageUrl = is_string($productImage) && $productImage !== '' ? (str_starts_with($productImage, 'http') || str_starts_with($productImage, '/') ? $productImage : asset('storage/'.$productImage)) : null; $countedQuantity = $quantity->inventory_quantity_set ? (float) $quantity->counted_quantity : 0.0; $onHandQuantity = (float) $quantity->quantity; $countState = ! $quantity->inventory_quantity_set ? '' : ($countedQuantity === $onHandQuantity ? 'is-complete' : 'is-partial'); @endphp
$countState === '', 'border-[var(--success-500)] bg-[var(--success-50)]' => $countState === 'is-complete', 'border-[var(--warning-500)] bg-[var(--warning-50)]' => $countState === 'is-partial', ]) wire:key="quantity-{{ $quantity->id }}" >
{{ $quantity->location?->full_name ?? $quantity->location?->name }} {{ $quantity->product?->name }} @if ($quantity->lot?->name) {{ __('barcode::app.adjustments.lot-serial') }}: {{ $quantity->lot->name }} @endif
$countState === '', 'text-[var(--warning-600)]' => $countState === 'is-partial', 'text-[var(--success-600)]' => $countState === 'is-complete', ])>{{ number_format($countedQuantity, 0) }} / {{ number_format($onHandQuantity, 0) }} {{ $quantity->product?->uom?->name }}
@if ($productImageUrl) {{ __('barcode::app.adjustments.edit-tooltip') }} @else {{ mb_substr((string) $quantity->product?->name, 0, 1) }} @endif
@if (! $quantity->inventory_quantity_set || $countedQuantity <= 0) +{{ number_format($onHandQuantity, 0) }} @else @endif
@empty
{{ __('barcode::app.adjustments.empty') }}
@endforelse
@endif