@extends('customer')
@section('title', 'Quick Currency Exchange')
@section('content')
{{-- Exchange currencies instantly at competitive rates with just a few clicks.
--}}
Quick Currency Exchange
Today's Exchange Rates
@foreach ($currencies as $currency)
Currency
Buy Rate
Sell Rate
@endforeach
{{ $currency->currency_pair }}
{{-- Ubah parameter kedua dari 0 menjadi 2 --}}
{{ number_format($currency->buy_rate, 2, ',', '.') }}
{{ number_format($currency->sell_rate, 2, ',', '.') }}
Quick Currency Exchange
Your Transaction History
@foreach ($transactions as $transaction)
Date
Currency
Amount
Kurs
Total Received
Shipping Cost
Total Amount
Transfer to
Transfer Time
Delivery Method
Delivery Address
Status
Cancel Reason
Action
@endforeach
{{ $transaction->created_at->format('d-m-Y H:i') }}
{{ $transaction->currency ?? '-' }}
{{ number_format($transaction->amount, 2, ',', '.') }}
{{ number_format($transaction->kurs, 2, ',', '.') }}
{{ number_format($transaction->total_received, 2, ',', '.') }}
{{ number_format($transaction->shipping_cost, 2, ',', '.') }}
@php $total_amount = $transaction->total_received + $transaction->shipping_cost @endphp
@if ($transaction->shipping_cost === null && $transaction->delivery_method === 'delivery')
Waiting
@else
{{ number_format($total_amount, 2, ',', '.') }}
@endif
{{ $transaction->transferAccount->bank_name . ' - ' . $transaction->transferAccount->rekening . ' - ' . $transaction->transferAccount->nama_rekening }}
{{ $transaction->transfer_time }}
{{ $transaction->delivery_method }}
@php
$statusDisplay = $transaction->status;
if ($transaction->status == 'processing') {
if ($transaction->transfer_proof) {
$statusDisplay = 'waiting confirmation';
} else {
$statusDisplay = 'waiting payment';
}
}
@endphp
{{ ucfirst($statusDisplay) }}
{{ ucfirst($transaction->cancel_reason ?? ' - ') }}
@if ($transaction->status == 'completed')
@endif
@if ($transaction->status == 'pending')
@endif
@if ($transaction->status == 'processing')
@if ($transaction->transfer_proof)
@else
@endif
@endif