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

Edit Exchange Rate

Back to Rates
@csrf @method('PUT')
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
@error('rate')
{{ $message }}
@enderror
The date when this rate becomes effective
@error('effective_date')
{{ $message }}
@enderror
is_active) ? 'checked' : '' }}>
Active rates are used in calculations
Current Rate Preview
Base Currency
{{ $exchangeRate->base_currency }}
Target Currency
{{ $exchangeRate->target_currency }}
Exchange Rate
1 {{ $exchangeRate->target_currency }} = {{ number_format($exchangeRate->rate, 4) }} {{ $exchangeRate->base_currency }}
Cancel
Rate Information
Created
{{ $exchangeRate->created_at->format('M j, Y H:i') }}
Last Updated
{{ $exchangeRate->updated_at->format('M j, Y H:i') }}
Current Status
@if($exchangeRate->is_active) Active @else Inactive @endif
Quick Actions
View Details @if($exchangeRate->is_active)
@csrf @method('DELETE')
@else
@csrf @method('PUT')
@endif
Similar Rates
@php $similarRates = \App\Models\ExchangeRate::where('base_currency', $exchangeRate->base_currency) ->where('target_currency', $exchangeRate->target_currency) ->where('id', '!=', $exchangeRate->id) ->orderBy('effective_date', 'desc') ->limit(3) ->get(); @endphp @if($similarRates->count()) @foreach($similarRates as $similarRate)
{{ number_format($similarRate->rate, 4) }}
{{ $similarRate->effective_date->format('M j, Y') }}
@if($similarRate->is_active) Active @else Inactive @endif
@endforeach @else

No similar rates found.

@endif
@endsection