@extends('layouts.master') @section('page_title', 'My Dashboard') @section('content')

WELCOME {{ Auth::user()->name }}. This is your DASHBOARD

@if(Qs::userIsAdministrative())
@endif @if(Qs::userIsAdministrative())
Billing Periods Overview
@php $currentPeriod = \App\Models\BillingPeriod::current()->first(); $activePeriods = \App\Models\BillingPeriod::active()->orderBy('start_date', 'desc')->take(3)->get(); @endphp @if($currentPeriod)
Current Billing Period
{{ $currentPeriod->name }}

{{ $currentPeriod->sch_session }}

Due Date:
{{ $currentPeriod->billing_due_date->format('M j, Y') }}
Status:
{{ ucfirst($currentPeriod->status) }}
Bills:
{{ $currentPeriod->bills()->count() }}
Total Amount:
GHS {{ number_format($currentPeriod->total_billed, 2) }}
Recent Billing Periods
@if($activePeriods->count() > 0) @foreach($activePeriods->take(3) as $period)
{{ $period->name }} @if($period->is_current) Current @endif
{{ $period->start_date->format('M j') }} - {{ $period->end_date->format('M j, Y') }}
{{ ucfirst($period->status) }}
{{ $period->bills()->count() }} bills
@endforeach @else

No billing periods found

Create First Period
@endif
@else
No Current Billing Period Set

Create and set up billing periods to track fee collection by term.

Create Billing Period
@endif
@endif @endsection