@extends('layouts.app', ['title' => 'Medication history', 'showNav' => true])
@section('content')
- 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
| Tag no |
Category |
Allocated cost |
@forelse($medication->histories as $history)
| {{ $history->animal->tag_no }} |
{{ \App\Support\AnimalCategory::label($history->animal->category) }} |
{{ number_format($history->cost, 2) }} |
@empty
| No animal entries. |
@endforelse
@if($medication->histories->isNotEmpty())
| Total |
{{ number_format($medication->histories->sum('cost'), 2) }} |
@endif
@endsection