@extends('layouts.master') @section('title', 'Loans') @section('content')
| Employee | Start | Loan | Repaid | Balance | Instalment | Progress | Status | |
|---|---|---|---|---|---|---|---|---|
| @include('partials.person', ['e' => $l->employee]) | {{ fmt_date($l->start_date) }} | {{ money($l->total_amount, false) }} | {{ money($l->paid_amount, false) }} | {{ money($l->balance, false) }} | {{ money($l->monthly_deduction, false) }} | {{ $p }}% · {{ $l->monthly_deduction > 0 ? ceil($l->balance / $l->monthly_deduction) . ' months left' : '—' }} |
{!! status_badge($l->status) !!} | @include('partials.row-actions', ['modal' => '#editModal', 'edit' => 'Employee Loans edit', 'delete' => 'Employee Loans delete', 'update' => route('loans.update', $l), 'destroy' => route('loans.destroy', $l), 'title' => 'Edit loan · ' . optional($l->employee)->full_name, 'record' => rec($l, ['total_amount', 'paid_amount', 'monthly_deduction', 'start_date', 'end_date', 'status', 'notes'])]) |