@extends('admin.layouts.app') @section('page_title', __('Edit :x', ['x' => __('Transaction')])) @section('css') {{-- Select2 --}} @endsection @section('content')
{{ __('Transactions') }} >> {{ __('Edit :x', ['x' => __('Transaction')]) }}

{{ __('Status') }}:

@php $color = ['Pending' => 'text-warning', 'Accepted' => 'text-primary', 'Rejected' => 'text-red']; @endphp

{{ __($transaction->status) }}

@csrf
{{ __('User') }}
{{ optional($transaction->user)->name }}
{{ __('Transaction Type') }}
{{ $transaction->transaction_type }}
@if (!is_null(optional($transaction->order)->reference))
{{ __('Reference') }}
{{ $transaction->order->reference }}
@endif
{{ __('Currency') }}
{{ optional($transaction->currency)->name }}
@if ($transaction->transaction_type == 'Withdrawal')
{{ __('Payment Method') }}
{{ optional($transaction->withdrawalMethod)->method_name }}
@php $params = (array) json_decode($transaction->user()->first()->withdrawalSettings()->where('withdrawal_method_id', $transaction->withdrawal_method_id)->first()->param); @endphp @foreach ($params as $key => $value)
{{ __(str_replace("_", " ", ucfirst($key))) }}
{{ $value }}
@endforeach @endif
{{ __('Transaction Date') }}
@if ($transaction->status == 'Rejected')

{{ __("Rejected status can't be changed") }}

@else
@endif
{{ __('Cancel') }} @if ($transaction->status != 'Rejected') @endif
{{ __('Amount') }}
{{ formatNumber($transaction->amount, optional($transaction->currency)->symbol) }}
{{ __('Charge') }}
{{ formatNumber($transaction->charge_amount, optional($transaction->currency)->symbol) }}
{{ __('Commission') }}
{{ formatNumber($transaction->commission_amount, optional($transaction->currency)->symbol) }}
{{ __('Discount') }}
{{ formatNumber($transaction->discount_amount, optional($transaction->currency)->symbol) }}

{{ __('Total') }}
{{ formatNumber($transaction->total_amount, optional($transaction->currency)->symbol) }}
@endsection @section('js') @endsection