@extends('layouts.app') @push('css') @endpush @section('content')
{{ $title }} @if(userCanView('stock.create')) New Stock @endif
@if(session('success')) {!! alert_success(session('success')) !!} @elseif(session('error')) {!! alert_error(session('error')) !!} @endif
@foreach($stocks as $stock) @endforeach
# Name Product Type Category Manufacturer Selling Price Cost Price Yard Selling Price Yard Cost Price Last Updated Action
{{ $loop->iteration }} {{ $stock->name }} {{ $stock->type }} {{ $stock->product_category ? $stock->product_category->name : "No Category" }} {{ $stock->manufacturer ? $stock->manufacturer->name : "No Manufacturer" }} {{ number_format($stock->selling_price,2) }} {{ number_format($stock->cost_price,2) }} {{ number_format($stock->yard_selling_price,2) }} {{ number_format($stock->yard_cost_price,2) }} {{ $stock->last_updated ? $stock->last_updated->name : ""}}
@if(config('app.store') == "inventory") {!! $stocks->links() !!} @endif
@endsection @push('js') @endpush