@extends('admin.admin_master') @section('admin')

Stock Report All

Stock Report Print

Stock Report

@foreach($allData as $key => $item) @php $buying_total = App\Models\Purchase::where('category_id',$item->category_id)->where('product_id',$item->id)->where('status','1')->sum('buying_qty'); $selling_total = App\Models\InvoiceDetail::where('category_id',$item->category_id)->where('product_id',$item->id)->where('status','1')->sum('selling_qty'); @endphp @endforeach
Sl Supplier Name Category Product Name In Qty Out Qty Stock
{{ $key+1}} {{ $item['supplier']['name'] }} {{ $item['category']['name'] }} {{ $item->name }} {{ $buying_total }} {{ $selling_total }} {{ $item->quantity }}
@endsection