@if($search) @endif
Agent Report
Generated on: {{ now()->format('d M Y H:i:s') }}
Search filter: {{ $search }}
Sort by: {{ ucfirst($sortColumn) }} ({{ $sortDirection }})
@php $total_saldo = 0; $total_credit = 0; @endphp @foreach ($data as $item) @php $total_saldo += $item->saldo; $total_credit += $item->total_credit; @endphp @endforeach
{{ __('Code') }} {{ __('Name') }} {{ __('Address') }} {{ __('PIC') }} {{ __('Position') }} {{ __('Email') }} {{ __('Contact') }} {{ __('Type') }} {{ __('Payment') }} {{ __('Commission') }} {{ __('Saldo') }} {{ __('Credit') }}
{{ $item->code }} {{ $item->name }} {{ $item->address }} {{ $item->type == 'I' ? $item->pic_name : $item->name }} {{ $item->type == 'I' ? $item->pic_position : '' }} @if ($item->type == 'I') {{ $item->pic_email }} @else {{ $item->email }} @endif @if ($item->type == 'I') {{ $item->pic_phone }} @else {{ $item->phone }} @endif {{ $item->type == 'P' ? 'Perorangan' : 'Institusi' }} @php $payments = []; if (strpos($item->payment, 'B') !== false) $payments[] = 'Bank Transfer'; if (strpos($item->payment, 'C') !== false) $payments[] = 'Credit'; if (strpos($item->payment, 'O') !== false) $payments[] = 'On Site'; if (strpos($item->payment, 'S') !== false) $payments[] = 'Saldo'; @endphp {{ implode(', ', $payments) }} {{ $item->commission }} {{ $item->saldo }} {{ $item->total_credit }}
Total {{ $total_saldo }} {{ $total_credit }}