@extends('backend.partials.master') @section('title') {{ $vendor->company_name }} @endsection @section('maincontent') @if(session('vendor_password'))
{{ ___('vendor.Login password (shown once, give it to the vendor):') }} {{ session('vendor_password') }}
@endif
{{ ___('vendor.Net earned') }}

{{ currency_symbol() }}{{ number_format($earned, 2) }}

{{ ___('vendor.Held (not yet withdrawable)') }}

{{ currency_symbol() }}{{ number_format($pending, 2) }}

{{ ___('vendor.Adjustments') }}

{{ currency_symbol() }}{{ number_format($adjustmentsTotal, 2) }}

{{ ___('vendor.Withdrawable now') }}

{{ currency_symbol() }}{{ number_format($available, 2) }}

@if($available < 0){{ ___('vendor.The vendor owes the agency; this is netted against their next sales.') }}@endif
{{ ___('vendor.Paid out') }}

{{ currency_symbol() }}{{ number_format($paidOut, 2) }}

{{ $vendor->contact_name }} · {{ $vendor->email }} · {{ $vendor->phone }}

{{ collect([$vendor->address, $vendor->city, $vendor->country])->filter()->join(', ') }}

{{ $vendor->description }}

{{ ___('vendor.Offers:') }} {{ implode(', ', $vendor->service_types ?? []) }}

@if(hasPermission('vendor_update'))
@csrf @method('PUT')
@error('commission_rate'){{ $message }}@enderror
@error('commission_fixed'){{ $message }}@enderror
@endif
@if($vendor->payout_method)

{{ ___('vendor.Payout details') }}: {{ $vendor->payout_method }} — {{ $vendor->payout_account }}

@endif

{{ ___('vendor.Documents') }}

@forelse($vendor->documents as $d)
{{ $d->title }}{{ $d->original_name }} · {{ $d->created_at->format('d M Y') }}
@empty

{{ ___('vendor.No documents yet.') }}

@endforelse

{{ ___('vendor.Balance adjustments') }}

@if(hasPermission('vendor_update'))
@csrf
@endif
@forelse($adjustments as $a) @empty@endforelse
{{ ___('vendor.Date') }}{{ ___('vendor.Type') }}{{ ___('vendor.Amount') }}{{ ___('vendor.Reason') }}
{{ $a->adjusted_on?->format('d M Y') }}{{ ___('vendor.'.$a->type) }}{{ $a->type === 'debit' ? '−' : '+' }}{{ currency_symbol() }}{{ number_format($a->amount, 2) }}{{ $a->reason }} @if(hasPermission('vendor_update'))
@csrf @method('DELETE')
@endif
{{ ___('vendor.None.') }}
@foreach($listings as $kind => $group)

{{ $group['label'] }}

@forelse($group['items'] as $item) @empty@endforelse
{{ ___('vendor.Name') }}{{ ___('vendor.Approval') }}
{{ $item->{$group['name']} }} {{ ___('vendor.'.$item->vendor_approval) }} @if(hasPermission('vendor_update')) @foreach(['approved' => ___('vendor.Approve'), 'rejected' => ___('vendor.Reject')] as $d => $label) @if($item->vendor_approval !== $d)
@csrf
@endif @endforeach @endif
{{ ___('vendor.None.') }}
@endforeach
@endsection