@extends('seller.layouts.app') @section('panel_content')
{{ single_price(Auth::user()->balance) }}
{{ translate('Affiliate Balance') }}
{{--
{{ translate('Affiliate Withdraw Request') }}
--}}
@php $referral_code_url = $url; @endphp

@foreach($shops as $key => $shop) @endforeach
# {{ translate('shop name')}} {{ translate('Order number')}} {{ translate('brokerage amount') }} {{ translate('level') }}
{{ ($key+1) }} {{ $shop['shop_name'] }} {{ $shop['order_number'] }} {{ single_price($shop['brokerage']) }} {{ $shop['level'] }}
{{translate('Affiliate Earning History')}}
@foreach($affiliate_logs as $key => $affiliate_log) @endforeach
# {{ translate('Referral User')}} {{ translate('Amount')}} {{ translate('Order Id')}} {{ translate('Referral Type') }} {{ translate('Product') }} {{ translate('Date') }}
{{ ($key+1) + ($affiliate_logs->currentPage() - 1)*$affiliate_logs->perPage() }} @if($affiliate_log->user_id !== null) {{ $affiliate_log->user->name }} @else {{ translate('Guest').' ('. $affiliate_log->guest_id.')' }} @endif {{ single_price($affiliate_log->amount) }} @if($affiliate_log->order_id != null) {{ $affiliate_log->order->code }} @else {{ $affiliate_log->order_detail->order->code }} @endif {{ ucwords(str_replace('_',' ', $affiliate_log->affiliate_type)) }} @if($affiliate_log->order_detail_id != null) {{ $affiliate_log->order_detail->product->name }} @endif @foreach ($affiliate_log->order->details as $key => $orderDetail)
{{ $orderDetail->product->name }}
@endforeach
{{ $affiliate_log->created_at->format('d, F Y') }}
{{ $affiliate_logs->links() }}
@endsection @section('modal') @endsection @section('script') @endsection