Import Price List
← Back to products
{{-- Step: Upload --}} @if ($step === 'upload')

Refresh purchase cost from a price list

Upload a master price-list sheet (S.NO / Product Name / Unit / Box Qty / MRP / Without GST / With GST). Nothing is updated until you review and confirm the preview. Past purchases, sales and their recorded profit are never changed — only the product master's current purchase cost.

Uploading…
@endif {{-- Step: Preview --}} @if ($step === 'preview')
{{ $this->summary['matched'] }} will update {{ $this->summary['skipped'] }} skipped @if ($this->summary['invalid'] > 0) {{ $this->summary['invalid'] }} invalid rows @endif
@foreach ($rows as $index => $row) @php $delta = $row['current_purchase_price'] !== null ? $row['purchase_cost'] - $row['current_purchase_price'] : null; $deltaPct = $delta !== null && $row['current_purchase_price'] > 0 ? ($delta / $row['current_purchase_price']) * 100 : null; @endphp @endforeach
Row Sheet product name Matched product Current cost New cost Change Current MRP New MRP
{{ $row['row_number'] }} {{ $row['product_name'] }} @if ($row['is_invalid'])
{{ $row['invalid_reason'] }}
@endif
@if ($row['is_invalid']) — @else @php $matchOptions = collect([['id' => 'skip', 'name' => '— Skip this row —']]); if ($row['match_status'] === 'fuzzy') { foreach ($candidatesByRowId[$index] ?? [] as $candidate) { $matchOptions->push([ 'id' => (string) $candidate['product_id'], 'name' => "★ Suggested: {$candidate['name']} ({$candidate['score']}%)", ]); } } $matchOptions = $matchOptions->concat( $products->map(fn ($p) => ['id' => (string) $p->id, 'name' => "{$p->name} ({$p->sku})"]) ); @endphp @endif {{ $row['current_purchase_price'] !== null ? number_format($row['current_purchase_price'], 2) : '—' }} {{ number_format($row['purchase_cost'], 2) }} @if ($delta === null) — @elseif (abs($delta) < 0.01) no change @else {{ $delta > 0 ? '+' : '' }}{{ number_format($delta, 2) }} ({{ $deltaPct !== null ? number_format($deltaPct, 1) : '?' }}%) @endif {{ $row['current_mrp'] !== null ? number_format($row['current_mrp'], 2) : '—' }} {{ $row['mrp'] !== null ? number_format($row['mrp'], 2) : '—' }}
@endif {{-- Step: Done --}} @if ($step === 'done')
Price list applied

{{ $confirmedUpdatedCount }} {{ Str::plural('product', $confirmedUpdatedCount) }} updated, {{ $confirmedSkippedCount }} skipped. Every changed price is logged on that product's history, and anyone with product-update notifications was alerted for changes over 10%.

@endif