@extends('backend.partials.master') @section('title') {{ ___('menus.agent_dashboard') }} @endsection @section('maincontent')
{{ ___('label.my_sales') }}

{{ currency_symbol() }}{{ number_format($sales) }}

{{ ___('permissions.bookings') }}

{{ $bookings }}

{{ ___('label.commission') }}

{{ currency_symbol() }}{{ number_format($commission) }}

{{ ___('menus.wallet') }}

{{ currency_symbol() }}{{ number_format($wallet) }}

@if(($credit['credit_limit'] ?? null) !== null) {{-- Partner credit: unpaid open bookings against the agency's limit. --}} @php $usedPct = $credit['credit_limit'] > 0 ? min(100, round($credit['outstanding'] / $credit['credit_limit'] * 100)) : 100; @endphp
{{ ___('admin.agent_credit_used') }}@if($credit['group']) · {{ $credit['group'] }}@endif {{ currency_symbol() }}{{ number_format($credit['outstanding']) }} / {{ currency_symbol() }}{{ number_format($credit['credit_limit']) }} · {{ ___('admin.agent_available') }} {{ currency_symbol() }}{{ number_format($credit['available']) }}
@endif

{{ ___('label.my_recent_bookings') }}

@foreach($recent as $b) BKG-{{ str_pad($b->id, 5, '0', STR_PAD_LEFT) }} {{ $b->customer_name }} {{ $b->travel_date?->translatedFormat('d M Y') }} {{ $b->travelers }} {{ currency_symbol() }}{{ number_format($b->amount) }} {!! $b->statusBadge() !!} @endforeach
@endsection