@extends('layouts.app') @section('title', 'Stock Movements Report') @section('breadcrumb') @endsection @section('content') {{-- Summary Stats --}}
{{ number_format($summary['total_movements']) }}
Total Movements
{{ number_format($summary['stock_in'], 2) }}
Stock In
{{ number_format($summary['stock_out'], 2) }}
Stock Out
Rs. {{ number_format($summary['total_value'], 0) }}
Total Value
{{-- Filters --}}
{{-- Movements Table --}}
@forelse($movements as $movement) @empty @endforelse
Image Product Type Qty Before Change Qty After Unit Cost Total By Date Notes
@if($movement->product && $movement->product->image) {{ $movement->product->name }} @else @endif
{{ $movement->product?->name ?? 'Deleted Product' }}
{{ $movement->product?->sku ?? '-' }}
@php $typeColors = [ 'sale' => 'danger', 'purchase' => 'success', 'opening' => 'primary', 'adjustment' => 'warning', 'damage' => 'danger', 'expired' => 'danger', 'return' => 'info', ]; $color = $typeColors[$movement->type] ?? 'secondary'; @endphp {{ ucfirst($movement->type) }} {{ number_format($movement->quantity_before, 2) }} {{ $movement->quantity >= 0 ? '+' : '' }}{{ number_format($movement->quantity, 2) }} {{ number_format($movement->quantity_after, 2) }} Rs. {{ number_format($movement->unit_cost ?? 0, 2) }} Rs. {{ number_format($movement->total_cost ?? 0, 2) }} {{ $movement->user?->name ?? '-' }}
{{ $movement->created_at->format('M d, Y') }}
{{ $movement->created_at->format('h:i A') }}
@if($movement->notes) {{ Str::limit($movement->notes, 20) }} @else - @endif
No stock movements found for this period
@if($movements->hasPages()) @endif
@push('styles') @endpush @endsection