@extends('layouts.master') @section('page_header') {{$drug->name}} @endsection @section('breadcrumb') @endsection @section('content')
{{--Check whether the user has permissions to access these tasks--}} @can('edit',$drug) @endcan @can('add','App\Stock') @endcan
@if(session()->has('success'))

Success!

{{session('success')}}
@endif
{{$drug->name}}
{{$drug->ingredient? : "N/A"}}
{{$drug->manufacturer}}
{{Utils::getFormattedNumber($drug->quantity)}} {{$drug->quantityType->drug_type}}
{{$drug->creator->name}}
{{Utils::getTimestamp($drug->created_at)}}
{{-- Recent Stocks --}}

Recent Stocks

@foreach($drug->getStocks(10) as $stock) @endforeach
Quantity Expiry Date Purchased Date Manufactured Date
{{Utils::getFormattedNumber($stock->quantity)}} {{Utils::getFormattedDate($stock->expiry_date)}} {{Utils::getFormattedDate($stock->received_date)}} {{Utils::getFormattedDate($stock->manufactured_date)}}
@include('drugs.modals.editDrug') @include('drugs.stocks.modals.addStock') @endsection