@extends('admin.layouts.master') @section('title', 'Add Product Inventory') @section('content')
@csrf
@if ($errors->has('quantity'))

{{ $errors->first('quantity') }}

@endif
@if ($errors->has('entry_date'))

{{ $errors->first('entry_date') }}

@endif

@foreach ($productInventoryDetails as $id => $inventory) @php $latestInventory = \App\Models\ProductInventory::where( 'product_id', $inventory->product->id, ) ->orderBy('created_at', 'desc') ->first(); @endphp @endforeach
{{ __('#') }} {{ __('Product Name') }} {{ __('Quantity') }} {{ __('Date') }} {{ __('Current Stock') }}
{{ ++$id }} {{ $inventory->product->category->category_name }}-{{ $inventory->product->subCategory->sub_category_name }}-{{ $inventory->product->product_name }} {{ $inventory->quantity }} {{ \Carbon\Carbon::parse($inventory->created_at)->format('d-m-Y') }} {{ $latestInventory->current_stock }}
@endsection