@extends('admin.layout') @section('content')

Patient Test Entries


@if (session('success'))
{{ session('success') }}
@endif @if ($entries->count() > 0) {{-- ✅ Added Discount Column --}} @foreach ($entries as $visitId => $tests) {{-- ✅ Discount Total --}} @endforeach
Patient Name Age Phone Visit ID Tests Total DiscountTotal Amount Action
{{ $tests->first()->patient->patient_name }} {{ $tests->first()->patient->age }} {{ $tests->first()->patient->phone }} {{ $visitId }} @foreach ($tests as $test) {{ $test->healthTest->test_name }} (₹{{ $test->price }})
@endforeach
₹{{ $tests->sum('discount') }}₹{{ $tests->sum('price') - $tests->sum('discount') }}
@csrf @method('DELETE')
@else
No Patient Entries Found.
@endif
@endsection