@extends('layouts.app') @section('title', 'القروض والسلف') @section('page_title', 'القروض والسلف') @section('content')
{{-- Active Loans List (2/3 width) --}}

سجل القروض والسلف القائمة

@forelse($loans as $loan) @empty @endforelse
الموظف النوع المبلغ الإجمالي الخصم الشهري المتبقي الحالة إجراء

{{ $loan->employee->name }}

{{ $loan->loan_number }}

{{ $loan->type === 'loan' ? 'قرض' : 'سلفة' }} {{ number_format($loan->amount, 2) }} {{ number_format($loan->monthly_deduction, 2) }} {{ number_format($loan->remaining_amount, 2) }} {{ match($loan->status) { 'active' => 'نشط', 'completed' => 'مكتمل', 'cancelled' => 'ملغى', default => $loan->status } }}
@csrf @method('DELETE')
لا توجد قروض أو سلف مسجلة حالياً.
@if($loans->hasPages())
{{ $loans->links() }}
@endif
{{-- Create Loan Form (1/3 width) --}}

تسجيل قرض أو سلفة جديدة

@csrf {{-- Employee Select --}}
{{-- Type --}}
{{-- Amount --}}
{{-- Monthly Deduction --}}
{{-- Start Date --}}
{{-- Notes --}}
@endsection