@php $productOptions = $products->map(fn ($product) => (object) ['id' => $product->id, 'name' => "{$product->name} ({$product->sku})"]); $previewLines = $this->previewLines(); $totals = $this->totals(); @endphp
{{ $editing ? "Edit Stock Transfer {$editing->batch_number}" : 'Smart Stock Movement' }}
← Back to transfers
@if (session('error'))
{{ session('error') }}
@endif @if ($editing)
Saving reverses this transfer's original stock movements and books the edited version: the old quantities go back to the source warehouse and out of the destination, then the new quantities move across. If the destination no longer holds enough stock to reverse, the edit is refused.
@endif

Paste items from a box list

Paste it the way it's written — one product and quantity per line (e.g. "Beard Softner Cream 100Gm 12"). Parse Items matches every line to a product; you review and fix anything before it's added below.

@if (! empty($draftLines) && ! $showReviewModal) @endif

Details

Move several products between two warehouses in one go, with an optional bill for the goods.

Items

Total items: {{ count($items) }} · Total quantity: {{ collect($items)->sum(fn ($item) => (int) ($item['quantity'] ?: 0)) }}

@if ($generateInvoice) @endif @foreach ($items as $index => $item) @if ($generateInvoice) @endif @endforeach
Sr No. Product QuantityRate Tax % Amount
{{ $index + 1 }} @if ($item['product_id'] && $fromWarehouseId)

In stock at source: {{ $this->availableStock($index) }}

@endif
{{ isset($previewLines[$index]) ? number_format($previewLines[$index]['unit_price'], 2) : '—' }} {{ isset($previewLines[$index]) ? rtrim(rtrim(number_format($previewLines[$index]['tax_rate'], 2), '0'), '.').'%' : '—' }} {{ isset($previewLines[$index]) ? number_format($previewLines[$index]['taxable'], 2) : '—' }} @if (count($items) > 1) @endif

Bill for this transfer

Priced at your chosen tier and GST-correct, but recorded as a stock transfer document — it does not create a sale and never appears in Sales/Profit reports.

@if ($generateInvoice)
Taxable amount {{ number_format($totals['taxable'], 2) }}
CGST {{ number_format($totals['cgst'], 2) }}
SGST {{ number_format($totals['sgst'], 2) }}
Round off {{ number_format($totals['round_off'], 2) }}
Total {{ number_format($totals['total'], 2) }}
@endif
Cancel
@if ($showReviewModal)

Review items — {{ count($draftLines) }} line{{ count($draftLines) === 1 ? '' : 's' }}

@if ($this->unresolvedDraftCount() > 0)
{{ $this->unresolvedDraftCount() }} line(s) below still need a product and/or a quantity greater than zero before you can add these to the transfer.
@endif
@if ($reviewSearch !== '') {{ count($this->visibleDraftLineIndices()) }} of {{ count($draftLines) }} shown @endif
{{-- Not overflow-x-auto: the per-row product picker is an absolutely-positioned dropdown that overflow-x would clip — same note as sale-form.blade.php's item table. --}}
@if ($generateInvoice) @endif @php $pricedDrafts = $this->pricedDraftLines(); $visibleDrafts = $this->visibleDraftLineIndices(); @endphp @foreach ($draftLines as $i => $line) @continue(! in_array($i, $visibleDrafts, true)) @php $p = $pricedDrafts[$i] ?? null; $needsAttention = empty($line['product_id']) || (int) ($line['quantity'] ?? 0) <= 0; @endphp $needsAttention])> @if ($generateInvoice) @endif @endforeach @if (empty($visibleDrafts)) @endif
Typed as Matched product QtyRate Amount
{{ $line['raw_text'] }} @if ($line['section_label'])
{{ $line['section_label'] }}
@endif
@if ($line['status'] === 'exact') Matched @elseif ($line['status'] === 'fuzzy') Check match{{ isset($line['candidates'][0]['score']) ? ' ('.$line['candidates'][0]['score'].'%)' : '' }} @elseif ($line['status'] === 'manual') Manual @else Select a product @endif @if (count($line['candidates']) > 1)
@foreach (array_slice($line['candidates'], 1) as $c) @endforeach
@endif
{{ $p ? number_format($p['unit_price'], 2) : '—' }} {{ $p ? number_format($p['taxable'], 2) : '—' }}
No lines match "{{ $reviewSearch }}".
@if ($generateInvoice) @php $draftTotals = $this->draftTotals(); @endphp
Taxable value
{{ number_format($draftTotals['taxable'], 2) }}
CGST
{{ number_format($draftTotals['cgst'], 2) }}
SGST
{{ number_format($draftTotals['sgst'], 2) }}
Round off
{{ number_format($draftTotals['round_off'], 2) }}
Total
₹{{ number_format($draftTotals['total'], 2) }}
@endif
@endif