@extends('layouts.main') @push('styles') @endpush @section('content')
| # | {{ __('patient_accounts.patient_names') }} | {{ __('patient_accounts.deposit_amount') }} | {{ __('patient_accounts.deposit_date') }} | {{ __('patient_accounts.received_by') }} |
|---|---|---|---|---|
| {{ $counter }} | {{ get_full_name($deposit->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($deposit->patient_id, 'id', 'number', 'patients') }}) | {{ ugandan_shillings($deposit->deposit_amount) }} @php $total_deposits += $deposit->deposit_amount; @endphp | {{ streamline_date($deposit->deposit_date) }} | {{ get_full_name($deposit->created_by, 'id', 'first_name', 'last_name', 'users') }} |
| {{ __('family_accounts.total') }} | {{ ugandan_shillings($total_deposits) }} |
| # | {{ __('patient_accounts.patient_names') }} | {{ __('patient_accounts.refund_amount') }} | {{ __('patient_accounts.refund_date') }} | {{ __('patient_accounts.received_by') }} |
|---|---|---|---|---|
| {{ $counter }} | {{ get_full_name($refund->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($refund->patient_id, 'id', 'number', 'patients') }}) | {{ ugandan_shillings($refund->refund_amount) }} @php $total_refunds += $refund->refund_amount; @endphp | {{ streamline_date($refund->refund_date) }} | {{ get_full_name($refund->created_by, 'id', 'first_name', 'last_name', 'users') }} |
| {{ __('family_accounts.total') }} | {{ ugandan_shillings($total_refunds) }} |
| # | {{ __('patient_accounts.patient_names') }} | {{ __('patient_accounts.amount_consumed') }} | {{ __('patient_accounts.date_consumed') }} | {{ __('patient_accounts.reason') }} |
|---|---|---|---|---|
| {{ $counter }} | {{ get_full_name($record->patient_id, 'id', 'first_name', 'last_name', 'patients') }} ({{ get_name($record->patient_id, 'id', 'number', 'patients') }}) | {{ ugandan_shillings($record->amount_consumed) }} @php $total_consumption += $record->amount_consumed; @endphp | {{ streamline_date_time($record->created_at) }} | @php $tag_id = $record->tag_id; $items_received_array = []; if($tag_id == 6 || $tag_id == 8){ $service_deposit_record = \Streamline\Models\ServiceDeposit::where('receipt_number', $record->receipt_number)->first(); if ($service_deposit_record){ $items_received = explode(",", $service_deposit_record->items_ids); for($i = 0; $i < count($items_received); $i++){ $items_received_array[] = get_name($items_received[$i], "id", "name", "services"); } } } elseif($tag_id == 3){ $treatment_deposit_record = \Streamline\Models\TreatmentDeposits::where('receipt_number', $record->receipt_number)->first(); if ($treatment_deposit_record){ $items_received = explode(",", $treatment_deposit_record->treatment_items); for($i = 0; $i < count($items_received); $i++){ $items_received_array[] = get_name($items_received[$i], "id", "name", "drugs"); } } } elseif($tag_id == 5){ $sundries_deposit_record = \Streamline\Models\SundryDeposit::where('receipt_number', $record->receipt_number)->first(); if ($sundries_deposit_record){ $items_received = explode(",", $sundries_deposit_record->sundry_items); for($i = 0; $i < count($items_received); $i++){ $items_received_array[] = get_name($items_received[$i], "id", "name", "sundries"); } } } elseif($tag_id == 2){ $investigation_deposit_record = \Streamline\Models\InvestigationDeposit::where('receipt_number', $record->receipt_number)->first(); if ($investigation_deposit_record){ $items_received = explode(",", $investigation_deposit_record->investigation_items); for($i = 0; $i < count($items_received); $i++){ $items_received_array[] = get_name($items_received[$i], "id", "name", "investigations"); } } } elseif($tag_id == 4){ $procedure_deposit_record = \Streamline\Models\ProcedureDeposit::where('receipt_number', $record->receipt_number)->first(); if ($procedure_deposit_record){ $items_received = explode(",", $procedure_deposit_record->procedure_items); for($i = 0; $i < count($items_received); $i++){ $items_received_array[] = get_name($items_received[$i], "id", "name", "procedures"); } } } @endphp
{{ get_name($record->tag_id, 'id', 'name', 'finance_point_tags') }}
|
| {{ __('family_accounts.total') }} | {{ ugandan_shillings($total_consumption) }} |