@extends('seller.layouts.app')
@section('panel_content')
@foreach($shops as $key => $shop)
#
{{ translate('shop name')}}
{{ translate('Order number')}}
{{ translate('brokerage amount') }}
{{ translate('level') }}
@endforeach
{{ ($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)
#
{{ 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
@foreach ($affiliate_log->order->details as $key => $orderDetail)
{{ $affiliate_log->created_at->format('d, F Y') }}