@extends('operations.layout.mainlayout') @section('content')

Test Price List for {{ $insurance->NAME }}

@if($hospitals->count() == 0)
No hospitals assigned to this insurance. Please assign hospitals first.
@else
@if($selectedHospital)
@foreach($tests as $test) @php $testPrice = isset($prices[$test->ID]) ? $prices[$test->ID] : null; @endphp @endforeach
ID Test Name Test Code Price (SAR) Requires Approval Actions
{{ $test->ID }} {{ $test->NAME_EN }} {{ $test->CODE }} {{ $testPrice ? $testPrice->PRICE : 'Not Set' }} {{ $testPrice ? ($testPrice->REQUIRES_APPROVAL == 1 ? 'Yes' : 'No') : 'Yes' }} @if($testPrice) @endif
@foreach($packages as $package) @php $packagePrice = isset($prices[$package->ID]) ? $prices[$package->ID] : null; @endphp @endforeach
ID Package Name Package Code Price (SAR) Requires Approval Actions
{{ $package->ID }} {{ $package->NAME_EN }} {{ $package->CODE }} {{ $packagePrice ? $packagePrice->PRICE : 'Not Set' }} {{ $packagePrice ? ($packagePrice->REQUIRES_APPROVAL == 1 ? 'Yes' : 'No') : 'Yes' }} @if($packagePrice) @endif
@endif @endif
@endsection @section('footer-scripts') @endsection