{{-- resources/views/currencies/currency-form.blade.php --}} @props([ 'currency' => null, // The currency model (null for create) 'action' => '', // Form action URL 'method' => 'POST', // Form method (POST for create, PUT/PATCH for edit) ])
@csrf @method($method)
{{-- Currency Code --}}
@error('code') {{ $message }} @else Please provide a valid 3-letter currency code. @enderror
ISO 4217 currency code (e.g. USD, EUR, GBP)
{{-- Currency Name --}}
@error('name') {{ $message }} @else Please provide the currency name. @enderror
{{-- Currency Symbol --}}
@error('symbol') {{ $message }} @enderror
Symbol used to represent the currency (e.g. $, €, £)
{{-- Buying Exchange Rate --}}
1 {{ $currency?->code ?? 'NEW' }} = KES
@error('buying_exchange_rate') {{ $message }} @else Please provide a valid buying rate. @enderror
Rate at which we buy this currency (1 unit = X KES)
{{-- Selling Exchange Rate --}}
1 {{ $currency?->code ?? 'NEW' }} = KES
@error('selling_exchange_rate') {{ $message }} @else Please provide a valid selling rate. @enderror
Rate at which we sell this currency (1 unit = X KES)
{{-- Service Relationship Warning --}} @if($currency && $currency->services()->exists())
This currency is used by {{ $currency->services()->count() }} services. Changing rates may affect existing pricing.
@endif {{-- Form Actions --}}
Cancel @if($currency && $currency->code !== 'KES') @endif
{{-- Delete Confirmation Modal --}} @if($currency && $currency->code !== 'KES' && !$currency->services()->exists()) @endif @push('scripts') @endpush