@extends('layout.app')
@section('content')
Stock Report
| ID |
Product |
In Qty |
Out Qty |
Available |
@foreach($products as $p)
@php
$in = $p->purchaseItems->sum('qty');
$out = $p->saleItems->sum('qty');
$avail = $in - $out;
@endphp
| {{ $p->id }} |
{{ $p->name }} |
{{ $in }} |
{{ $out }} |
{{ $avail }} |
@endforeach
@endsection