@extends('../layout/' . $layout)
@section('subhead')
Atarud MIS - Inventory Items
@endsection
@section('subcontent')
Inventory Items List
# |
Name |
Type |
Starting Quantity |
Quantity |
Actions |
@foreach($items as $row)
@php
$type = App\Models\InventoryItemType::where('id', $row->type_id)->first();
$in = App\Models\InventoryItemsTransactions::where('item_id', $row->id)
->where('transaction_type', 'In')
->where('status', 'completed')
->sum('quantity');
$out = App\Models\InventoryItemsTransactions::where('item_id', $row->id)
->where('transaction_type', 'Out')
->where('status', 'completed')
->sum('quantity');
$total = $row->quantity + $in - $out;
@endphp
{{ ++$loop->index }} |
{{ $row->name }} |
{{ $type->name }} |
{{ $row->quantity }} |
{{ $total }} |
|
@endforeach
@include('../pages/inventory_items/create')
@endsection