@extends('layouts.admin') @section('title', 'Add Exchange Rate') @section('content')

Add New Exchange Rate

Back to Rates
@csrf
The base currency for the exchange rate
@error('base_currency')
{{ $message }}
@enderror
The currency being converted to
@error('target_currency')
{{ $message }}
@enderror
Rate format: 1 Target Currency = X Base Currency @if(old('base_currency', 'KES') && old('target_currency'))
1 {{ old('target_currency') }} = X {{ old('base_currency', 'KES') }} @endif
@error('rate')
{{ $message }}
@enderror
The date when this rate becomes effective
@error('effective_date')
{{ $message }}
@enderror
Active rates are used in calculations
Cancel
Exchange Rate Guide
Rate Format

The exchange rate represents how much of the base currency equals one unit of the target currency.

1 Target Currency = X Base Currency
Examples
  • USD to KES: 1 USD = 150.50 KES
  • EUR to KES: 1 EUR = 165.25 KES
  • GBP to KES: 1 GBP = 190.75 KES
Effective Date

The system will use the most recent active rate on or before the calculation date.

Recent Rates
@php $recentRates = \App\Models\ExchangeRate::with(['baseCurrency', 'targetCurrency']) ->latest('effective_date') ->limit(5) ->get(); @endphp @if($recentRates->count()) @foreach($recentRates as $recentRate)
{{ $recentRate->target_currency }}/{{ $recentRate->base_currency }}
{{ number_format($recentRate->rate, 4) }}
{{ $recentRate->effective_date->format('M j') }}
@if($recentRate->is_active) Active @else Inactive @endif
@endforeach @else

No recent exchange rates found.

@endif
@endsection @push('scripts') @endpush @push('styles') @endpush