@extends('layouts.admin') @section('title', 'Currencies & Exchange Rates') @section('content')
@include('partials.admin.alerts')

Current Exchange Rates (Base: KES)

@if(isset($currentRates) && $currentRates->count())
@foreach($currentRates as $rate) @endforeach
Currency Code Exchange Rate Last Updated Status Actions
{{ $rate->targetCurrency->name ?? 'N/A' }} {{ $rate->target_currency }} 1 {{ $rate->target_currency }} = {{ number_format($rate->rate, 4) }} KES {{ $rate->effective_date->format('M j, Y') }} @if($rate->effective_date->isToday()) Current @else Historical @endif
@else

No current exchange rates found.

Add First Exchange Rate
@endif

Currencies Management

Add Currency
@forelse($currencies ?? [] as $currency) @empty @endforelse
Currency Name Code Symbol Decimal Places Status Last Rate Update Actions
{{ $currency->name }} {{ $currency->code }} {{ $currency->symbol ?? '—' }} {{ $currency->decimal_places }} @if($currency->active) Active @else Inactive @endif @if($currency->latestRate) {{ $currency->latestRate->effective_date->format('M j, Y') }} @else No rates @endif
@if($currency->code != 'KES')
@csrf @method('DELETE')
@endif

No currencies found.

Add First Currency
@if(isset($currencies) && $currencies->count())
Showing {{ $currencies->firstItem() }} to {{ $currencies->lastItem() }} of {{ $currencies->total() }} currencies
{{ $currencies->links() }}
@endif

Exchange Rate History

Clear Filters
@if(isset($historicalRates) && $historicalRates->count())
@foreach($historicalRates as $rate) @endforeach
Base Currency Target Currency Exchange Rate Effective Date Status Actions
{{ $rate->base_currency }} {{ $rate->target_currency }} 1 {{ $rate->target_currency }} = {{ number_format($rate->rate, 4) }} {{ $rate->base_currency }} {{ $rate->effective_date->format('M j, Y') }} @if($rate->is_active) Active @else Inactive @endif
{{ $historicalRates->links() }}
@else

No historical exchange rates found.

@if(request()->anyFilled(['currency', 'date_from', 'date_to'])) Clear Filters @else Add Exchange Rate @endif
@endif

Quick Exchange Rate Update

@csrf
Enter the rate for 1 unit of foreign currency in KES
@endsection