@extends('frontend.layouts.app')
@section('content')
{{translate('Affiliate Earning History')}}
@foreach($affiliate_logs as $key => $affiliate_log)
#
{{ translate('Referral User')}}
{{ translate('Amount')}}
{{ translate('Order Id')}}
{{ translate('Referral Type') }}
{{ translate('Product') }}
{{ translate('Date') }}
@endforeach
{{ ($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
{{ $affiliate_log->created_at->format('d, F Y') }}
{{ translate('Affiliate payment history')}}
@foreach ($affiliate_payments as $key => $affiliate_payment)
#
{{ translate('Date') }}
{{translate('Amount')}}
{{translate('Payment Method')}}
@endforeach
{{ $key+1 }}
{{ date('d-m-Y', strtotime($affiliate_payment->created_at)) }}
{{ single_price($affiliate_payment->amount) }}
{{ ucfirst(str_replace('_', ' ', $affiliate_payment ->payment_method)) }}
{{ translate('Affiliate withdraw request history')}}
@foreach ($affiliate_withdraw_requests as $key => $affiliate_withdraw_request)
#
{{ translate('Date') }}
{{ translate('Amount')}}
{{ translate('Status')}}
@endforeach
{{ $key+1 }}
{{ date('d-m-Y', strtotime($affiliate_withdraw_request->created_at)) }}
{{ single_price($affiliate_withdraw_request->amount) }}
@if($affiliate_withdraw_request->status == 1)
{{translate('Approved')}}
@elseif($affiliate_withdraw_request->status == 2)
{{translate('Rejected')}}
@else
{{translate('Pending')}}
@endif