{{--
Opening Stock No - {{ $stock->opening_stock_no ?? 'N/A' }}
@php $stepDetails = [ ['title' => 'Stock Created', 'icon' => 'mdi-cart'], ['title' => 'Stock Verified', 'icon' => 'mdi-repeat'], ['title' => 'Stock Approved', 'icon' => 'mdi-gift'], ['title' => 'Stock Active', 'icon' => 'mdi-truck-delivery'], ]; $currentStep = 4; // All steps completed for opening stock @endphp
@foreach ($stepDetails as $index => $step)

{{ $step['title'] }}

@endforeach
--}}
{{-- Left Side: Opening Stock Details --}}

Opening Stock Details

@if (Auth::user()->hasPermission('opening.stock.edit')) @endif

Stock Code:

{{ $stock->opening_stock_no ?? '-' }}

Total Products:

{{ $stock->details->count() ?? 0 }}

Stock Date:

{{ $stock->date ? \Carbon\Carbon::parse($stock->date)->format('d-m-Y') : 'N/A' }}

Total Quantity:

{{ number_format($stock->total_quantity ?? 0, 2) }}

Created Date:

{{ $stock->created_at ? $stock->created_at->format('d-m-Y H:i A') : '-' }}

Total Price:

${{ number_format($stock->total_price ?? 0, 2) }}

Remark:

{{ $stock->remark ?? '-' }}

{{-- Right Side: Actions --}} {{--

Actions

--}}

Product Detail

@if (($stock->details ?? collect())->isNotEmpty())
@php $rowIndex = 1; @endphp @foreach ($stockDetails as $detail) @endforeach
# Name Qty Price Amount
{{ $rowIndex++ }}
{{ $detail->product->name ?? '-' }}
Category: {{ $detail->product->categories->first()->name ?? '-' }} | SKU: {{ $detail->product->sku ?? '-' }} | Price: ${{ number_format($detail->price, 2) }}
{{ number_format($detail->qty ?? 0, 0) }} ${{ number_format($detail->price, 2) }} ${{ number_format($detail->amount, 2) }}
@else

No related products found.

@endif