@extends('layouts.main') @push('styles') @endpush @section('content')
| # | {{ __('family_accounts.family_head') }} | {{ __('family_accounts.family_members') }} | {{ __('family_accounts.last_deposit') }} | {{ __('family_accounts.current_balance') }} | {{ __('family_accounts.opening_amount') }} | {{ __('family_accounts.credit_limit') }} | {{ __('family_accounts.action') }} | |||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $counter }} | {{ get_full_name($family_account->family_head_id, "id", "first_name", "last_name", "patients") }} ({{ get_name($family_account->family_head_id, "id", "number", "patients") }}) |
@php
$members_array = explode(",", $family_account->family_members_ids);
@endphp
|
@php
$family_deposit_record = \Streamline\Models\FamilyAccountDeposit::where('family_account_id', $family_account->id)->orderBy('id', 'desc')->get();
$last_deposit_amount = 0;
if(count($family_deposit_record) > 0){
$last_deposit_record_amount = $family_deposit_record->first();
$last_deposit_amount = $last_deposit_record_amount->deposit_amount;
}
@endphp
{{ ugandan_shillings($last_deposit_amount) }} (Date: {{ get_name($family_account->id, "family_account_id", "created_at", "family_account_deposits") != "N/A" ? streamline_date(get_name($family_account->id, "family_account_id", "deposit_date", "family_account_deposits")) : "N/A" }}) |
{{ is_numeric($family_account->current_balance) ? ugandan_shillings($family_account->current_balance) : "N/A" }} @php $current_balance_total += $family_account->current_balance; @endphp | {{ is_numeric($family_account->opening_amount) ? ugandan_shillings($family_account->opening_amount) : "" }} | {{ is_numeric($family_account->credit_limit) ? ugandan_shillings($family_account->credit_limit) : "" }} | {{ __('family_accounts.edit') }} | {{ Form::open(['url' => 'family_accounts/add_deposit']) }} {{ Form::hidden('family_account_id', $family_account->id) }} {{ Form::submit('Add deposit', ['class' => 'btn btn-success btn-sm']) }} {{ Form::close() }} | Statement | {{ Form::model($family_account->id, ['method' => 'DELETE', 'route' => ['family_accounts.destroy', $family_account->id], 'id' => 'delete_form_'.$family_account->id]) }} {{ Form::close() }} |
| {{ __('family_accounts.total') }} | {{ ugandan_shillings($current_balance_total) }} | |||||||||