@extends('common.index') @section('content')

Patient History

@if(session('user')->user_type_id==2)
You can edit existing entries, but deletion is restricted if they are linked to any records.
@endif
@if(session('error'))
@endif @if(session('success'))
@endif

Patient Order List

{{-- Dropdown --}} {{-- Search --}} {{-- Add New --}} Patient List
@foreach ($testorders as $ind=>$order) @php $paidamount = 0; @endphp @foreach ($payments[$ind] as $payment) @php $paidamount+= $payment->payment_amount @endphp @endforeach @php $due =$order->total_amount-$paidamount; @endphp @endforeach
# Test Item Application Date Application Status Bill Amount Paid Amount Due Amount Action
{{$loop->iteration}} @foreach ($order->testCarts as $index=>$cartitem) {{$index+1}}: {{$cartitem->test_name}}
@endforeach
{{date('d-m-Y',strtotime($order->order_date))}} @if($order->order_status==0) Pending @elseif($order->order_status==1) Sample Collected @elseif($order->order_status==2) Approved @endif ₹ {{number_format($order->total_amount,2)}} ₹ {{number_format($paidamount,2)}} ₹ {{number_format($due,2)}} @if($due>0)

@endif
@endsection