@extends('backend.layouts_backend.master2') @section('title') Loan Details @endsection @section('content') {{-- header --}}

Loan Details

{{-- end header --}}
  • Loan code : {{ $loan->loan_code ?? '' }}
  • Loan Date : {{ short_date($loan->loan_date) ?? '' }}
  • Due Date : {{ short_date($loan->due_date) ?? '' }}
  • Client : {{ $loan->client->first_name ?? '' }} {{ $loan->client->last_name ?? '' }} {{ $loan->client->other_names ?? '' }}
  • Loan Amount : {{ $loan->loan_amount ?? '' }}
  • Balance : {{ $loan->loan_balance ?? '' }}
  • Status : {{ get_loan_status_from_id($loan->loan_status) ?? '' }}
  • Created By : {{ get_user_fullname($loan->created_by) ?? '' }}
  • Description : {{ $loan->reason_of_loan ?? '' }}
@php $loan_client_id = $loan->client_id; $loan_id = $loan->id; $user_loan_repayments = \App\Models\LoanRepayment::where('loan_id', $loan_id)->get(); @endphp {{-- loan repayments --}}
Loan Repayments

@if (count($user_loan_repayments) > 0)
@foreach ($user_loan_repayments as $loan_repayment) @endforeach
#Id Repayment Code Loan Details Amount Paid Payment Date Action
{{ $loan_repayment->id ?? 'N/A' }} {{ $loan_repayment->loan_repayment_code ?? 'N/A' }} {{ $loan_repayment->loan->loan_code }} ({{ $loan_repayment->loan->client->first_name ?? '' }} {{ $loan_repayment->loan->client->last_name ?? '' }}) {{ $loan_repayment->payment_amount ?? 'N/A' }} {{ short_date($loan_repayment->payment_date) ?? 'N/A' }}
{{-- --}} {{-- --}} {{-- @can('county-edit') --}} {{-- @endcan --}} {{-- @can('county-delete') --}}
@csrf @method('DELETE')
{{-- @endcan --}}

@else @endif
{{-- Add loan repayment --}}
Add Loan Repayments

{{-- alert add item --}} @if (session('messagesave')) {{--
{{ session('message')}}
--}} @endif {{-- alert delete item --}} @if (session('messagedelete')) {{--
{{ session('messagedelete')}}
--}} @endif {{-- alert update item --}} @if (session('messageupdate')) @endif
@csrf {{-- pick loan id --}}

{{-- validation --}} @if ($errors->has('loan_id')) @endif

{{-- validation --}} @if ($errors->has('payment_date')) @endif

{{-- validation --}} @if ($errors->has('payment_amount')) @endif
{{-- --}}
@endsection @section('extra_scripts') {{-- handline select2 --}} @endsection