@extends('admin.dashboard.layout.app') @section('style') @endsection @section('content') @include('admin.dashboard.layout.header', ['title' => 'Merchant List'])
@foreach($merchants as $index => $merchant) @php $mwd = optional($merchant->paymentPreferences->firstWhere('payment_gateway_id', 3))->disbursement_rate; $ibft = optional($merchant->paymentPreferences->firstWhere('payment_gateway_id', 4))->ibft_disbursement_rate; $serviceRate = optional($merchant->paymentPreferences->first())->service_rate; $jazzcash = $merchant->paymentPreferences->firstWhere('payment_gateway_id', 1); $easypaisa = $merchant->paymentPreferences->firstWhere('payment_gateway_id', 2); $jazzcashActive = $jazzcash && $jazzcash->status == 1; $easypaisaActive = $easypaisa && $easypaisa->status == 1; @endphp @endforeach
Sr. No. Merchant ID Merchant Name Business Name Phone Created At Avail Balance MWD Disbursement % IBFT Disbursement % Collection Service Rate % Cnic Address City JazzCash Easypaisa
{{ $index + 1 }} {{ $merchant->id }} {{ $merchant->name }} {{ $merchant->business_name }} {{ $merchant->phone }} {{ optional($merchant->created_at)->format('M d, Y') }} {{ $merchant->merchantBalance->available_for_withdraw ?? 'NA' }} {{ $mwd !== null ? $mwd.' %' : 'NA' }} {{ $ibft !== null ? $ibft.' %' : 'NA' }} {{ $serviceRate !== null ? $serviceRate.' %' : 'NA' }} {{ $merchant->cnic }} {{ $merchant->address }} {{ $merchant->city }}
@endsection @section('script') @endsection