@extends('layouts.finance') @section('title', 'Voucher Inventory') @section('subtitle', 'Inventory movement history and stock intake') @section('content')

Inventory Movements

+ Add Stock Movement
Reset
Default view shows complete voucher add history. Date filters are optional.
Total Invoices
{{ number_format((int) ($summary['total_invoices'] ?? 0)) }}
Total Vouchers
{{ number_format((int) ($summary['total_vouchers'] ?? 0)) }}
@if($inventoryError)
{{ $inventoryError }}
@endif @if($movements->isEmpty())
No inventory movements found for the selected filters.
@else
@foreach($movements as $m) @php $detailTarget = 'movement-details-'.md5(($m->upload_batch_uuid ?: $m->batch_ref).'-'.$loop->index); @endphp @endforeach
Date Product Direction Qty Unit Price Invoice Supplier Received On Received At Payment Account Reference By
{{ $m->movement_date?->format('Y-m-d') ?? '—' }} {{ $m->product_name ?: '—' }}
{{ $m->batch_ref }}
{{ strtoupper($m->direction) }} {{ number_format((int) $m->quantity) }} {{ $m->unit_price !== null ? 'PKR '.number_format((float) $m->unit_price, 2) : '—' }} {{ $m->invoice_number ?: '—' }} @if(!empty($m->invoice_status))
{{ str_replace('_', ' ', ucfirst($m->invoice_status)) }}
@endif
{{ $m->supplier_name ?: '—' }} {{ $m->received_on?->format('Y-m-d') ?? '—' }} {{ $m->received_at ? \Illuminate\Support\Carbon::parse($m->received_at)->format('H:i') : '—' }} {{ $m->payment_account ?: '—' }}
{{ $m->reference ?: '—' }}
{{ $m->currency ?: 'PKR' }} @if($m->paid_amount !== null) · Paid {{ number_format((float) $m->paid_amount, 2) }} @endif @if($m->total_fees !== null) · Fees {{ number_format((float) $m->total_fees, 2) }} @endif @if($m->applied_rate !== null) · Rate {{ number_format((float) $m->applied_rate, 4) }} @endif @if($m->total_pkr !== null) · Total PKR {{ number_format((float) $m->total_pkr, 2) }} @endif
{{ $m->uploaded_by ?: '—' }}
{{ $movements->links() }}
@endif @push('scripts') @endpush @endsection