@extends('layouts.main') @push('styles') @endpush @section('content')

Refund Family Accounts

@include('patient_discounts::family_accounts.menu')
@include('flash::message')
{{ Form::open(['method'=>'post','route'=>'family_accounts.store_family_refund']) }}
{{ Form::label('family_head',__('family_accounts.family_head')) }} {{ Form::text('family_head', get_full_name($family_account_details->family_head_id, "id", "first_name", "last_name", "patients"), ['class' => 'form-control col-sm-12 compulsory', 'readonly' => 'true']) }}
{{ Form::hidden('family_account_id', $family_account_details->id) }}
{{ Form::label('current_balance', 'Current Balance') }} {{ Form::number('current_balance', $family_account_details->current_balance,['class' => 'form-control compulsory', 'id' => 'current_balance', 'readonly']) }}
{{ Form::label('refund_amount', 'Amount to refund') }} {{ Form::number('refund_amount', '',['class' => 'form-control compulsory', 'id' => 'refund_amount', 'required']) }}
{{ Form::label('account_id','Account To Pay From') }} {{ Form::select('account_id', $banks, '', ['class' => 'form-control compulsory','required', 'id' => 'account_id', 'onchange' => 'get_bank_balance()']) }}
{{ Form::label('account_balance','Account Balance') }} {{ Form::text('account_balance', 0, ['class'=>'form-control compulsory', 'id'=>'account_balance', 'readonly']) }}
{{ Form::label('refund_date', 'Refund Date') }}
{{ Form::text('refund_date', date('d-m-Y'), ['class'=>'form-control compulsory', 'required' , 'readonly', 'id'=>'refund_date']) }}
{{ Form::label('refunded_to', 'Refunded To') }} {{ Form::text('refunded_to', '', ['class'=>'form-control compulsory', 'required']) }}
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success submit_btn'])}} {{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
{{ Form::close() }}

{{ __('family_accounts.family_members') }}

@php $family_members_array = explode(",", $family_account_details->family_members_ids); @endphp
    @for($i = 0; $i < count($family_members_array); $i++)
  1. {{ get_full_name($family_members_array[$i], "id", "first_name", "last_name", "patients") }}
    {{ __('family_accounts.number') }} {{ get_name($family_members_array[$i], "id", "number","patients") }}
    {{ __('family_accounts.contact') }}{{ get_name($family_members_array[$i], "id", "phone","patients") }}
    {{ __('family_accounts.residence') }}{{ patient_residence($family_members_array[$i]) }}
  2. @endfor
@endsection @push('scripts') @endpush