@extends('layouts.app', ['title' => 'Medication history', 'showNav' => true]) @section('content')

Medication history

Back
Type
{{ \App\Support\MedicationType::labels()[$medication->type] }}
Category
{{ \App\Support\AnimalCategory::label($medication->category) }}
Date
{{ $medication->medication_date->format('d M Y') }}
Total cost
{{ number_format($medication->total_cost, 2) }}
Description
{{ $medication->description }}
Apply to
{{ $medication->apply_to_all ? 'All eligible animals' : 'Single animal' }}
@if($medication->expense)
Expense
{{ $medication->expense->description }}
@endif
Animal entries
@forelse($medication->histories as $history) @empty @endforelse @if($medication->histories->isNotEmpty()) @endif
Tag no Category Allocated cost
{{ $history->animal->tag_no }} {{ \App\Support\AnimalCategory::label($history->animal->category) }} {{ number_format($history->cost, 2) }}
No animal entries.
Total {{ number_format($medication->histories->sum('cost'), 2) }}
@endsection