@php $editingMoveLine = $editingMoveLineId ? $operation->moveLines->firstWhere('id', $editingMoveLineId) : null; $allMoveLinesCounted = $moveLines->isNotEmpty() && $moveLines->every(fn ($moveLine) => (float) ($countedMoveLineQuantities[$moveLine->id] ?? 0) >= (float) $moveLine->qty); $hasAnyCountedMoveLine = $moveLines->contains(fn ($moveLine) => (float) ($countedMoveLineQuantities[$moveLine->id] ?? 0) > 0); @endphp
@unless (\Webkul\Barcode\Support\NativeApp::usesNativeNavigation()) @include('barcode::components.header.web', [ 'title' => $operation->name, 'subtitle' => $operation->partner?->name ?? $operation->origin, 'breadcrumbs' => [ ['label' => __('barcode::app.title'), 'href' => route('barcode.dashboard')], ['label' => $operationType->name, 'href' => route('barcode.transfers', $operationType)], ], 'showCancel' => $editingMoveLine ? true : null, 'showBarcode' => $editingMoveLine ? null : true, ]) @endunless @if ($editingMoveLine) @php $productImages = $editingMoveLine->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; $tracking = $editingMoveLine->product?->tracking; @endphp
⌁ {{ $operation->name }} {{ $editingMoveLine->product?->name }} @if ($editingMoveLine->product?->reference) [{{ $editingMoveLine->product->reference }}] @endif {{ __('barcode::app.operation.source') }}: {{ $editingMoveLine->sourceLocation?->full_name ?? $editingMoveLine->sourceLocation?->name }}
@if ($productImageUrl) {{ __('barcode::app.operation.image-alt') }} @else {{ mb_substr((string) $editingMoveLine->product?->name, 0, 1) }} @endif
{{ __('barcode::app.operation.details-title') }}
{{ $editingMoveLine->uom?->name }}
0 -1 +1 +{{ number_format(max((float) $editingMoveLine->qty - (float) ($countedMoveLineQuantities[$editingMoveLine->id] ?? 0), 0), 0) }}
{{ __('barcode::app.operation.settings-title') }}
@if ($editingMoveLine->sourceLocation?->type === \Webkul\Inventory\Enums\LocationType::INTERNAL) @endif @if ($tracking && $tracking !== \Webkul\Inventory\Enums\ProductTracking::QTY) @endif @if ($editingMoveLineResultPackageOptions !== []) @endif
@if ($editingMoveLine->sourceLocation?->type === \Webkul\Inventory\Enums\LocationType::INTERNAL) {{ __('barcode::app.operation.stock-title') }} {{ __('barcode::app.operation.stock-subtitle') }}
@forelse ($moveLineSourceLocationOptions as $option) @empty
{{ __('barcode::app.operation.no-stock-locations') }}
@endforelse
@endif
@else
{{ __('barcode::app.operation.camera-unavailable') }}
@if ($notice) {{ __('barcode::app.title') }} {{ $notice }} @endif
{{ __('barcode::app.operation.moves') }}
@forelse ($moveLines as $moveLine) @php $productImages = $moveLine->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 = (float) ($countedMoveLineQuantities[$moveLine->id] ?? 0); $demandQuantity = (float) $moveLine->qty; $countState = $countedQuantity >= $demandQuantity && $demandQuantity > 0 ? 'is-complete' : ($countedQuantity > 0 ? 'is-partial' : ''); @endphp
$countState === 'is-complete', 'border-[var(--warning-500)] bg-[var(--warning-50)]' => $countState === 'is-partial', 'border-gray-200 bg-white' => $countState === '', ]) wire:key="line-{{ $moveLine->id }}" >
{{ $moveLine->product?->reference ?? $moveLine->reference }} {{ $moveLine->product?->name }} {{ __('barcode::app.operation.source') }}: {{ $moveLine->sourceLocation?->full_name ?? $moveLine->sourceLocation?->name }} @if ($moveLine->product?->barcode) [{{ $moveLine->product->barcode }}] @endif
$countState === '', 'text-[var(--warning-600)]' => $countState === 'is-partial', 'text-[var(--success-600)]' => $countState === 'is-complete', ])>{{ number_format($countedQuantity, 0) }} / {{ number_format($demandQuantity, 0) }} {{ $moveLine->uom?->name }}
@if ($productImageUrl) {{ __('barcode::app.operation.image-alt') }} @else {{ mb_substr((string) $moveLine->product?->name, 0, 1) }} @endif
@if ($countedQuantity <= 0) +{{ number_format($demandQuantity, 0) }} @elseif ($countedQuantity >= $demandQuantity) -1 @else +1 -1 @endif
@empty
{{ __('barcode::app.operation.empty-moves') }}
@endforelse
{{-- Backorder warning --}} {{-- Simple confirmation --}}
@endif