@extends('admin.layout.master') @section('title', 'Loan Summary') @section('custom_style') @endsection @section('content')

Loan Summary

@include('payroll.includes.report_print_excel_button')
{{--
--}}

@if (count($loans) > 0)
{{-- @foreach ($loans->chunk(30) as $chunkLoan) --}} {{-- {!! $print['head'] !!} --}} @include('payroll.report_header', ['title' => " Loan Sammary Report",'text_align'=>"text-center"]) @php $sl = 1; $total_balance = 0; $total_paid = 0; @endphp @foreach ($loans as $loan) @endforeach
SL Code Name Designation Date Loan Start Amount Total Installment Installment Paid Balance Status Action
{{ $sl++ }} {{ $loan->empinfo->emp_code }} {{ $loan->empinfo->emp_name }} {{ $loan->empinfo->fetch_designation->name }} {{ $loan->application_date }} {{ date('M-Y', strtotime($loan->disburse_date)) }} {{ $loan->amount }} {{ $loan->installment_no }} {{ $loan->installment_amount}} {{ $loan->totalPaid > 0 ? $loan->totalPaid : 0}} @php $balance = $loan->amount - $loan->totalPaid; $total_balance += $balance; $total_paid += $loan->totalPaid; @endphp {{ $loan->amount - $loan->totalPaid}} @if ($loan->amount <= $loan->totalPaid) {{ 'Completed' }} @else {{ 'Running' }} @endif @if (count($loan->loan_advance_payment_history) > 0) Details @endif
Total {{number_format($loans->sum('amount'))}} {{number_format($total_paid)}} {{number_format($total_balance)}}
{{--
--}} {{-- @endforeach --}}
@endif
@endsection @section('script') @endsection