@extends('backend.partials.master') @section('title') {{ ___('vendor.Earnings & payouts') }} @endsection @section('maincontent') @include('backend.portal.marketplace._status') @if($available < 0)
{{ ___('vendor.Your balance is negative: a refund or adjustment came after you were paid. It is netted against your next sales.') }}
@endif
{{ ___('vendor.Available to withdraw') }}

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

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

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

@if($holdDays > 0){{ str_replace(':days', $holdDays, ___('vendor.Shares are held :days days before they can be withdrawn.')) }}@endif
{{ ___('vendor.Your commission rate') }}

@if($vendor->commission_fixed !== null){{ currency_symbol() }}{{ number_format($vendor->commission_fixed, 2) }} {{ ___('vendor.per sale') }}@else{{ $vendor->effectiveCommissionRate() }}%@endif

{{ ___('vendor.Statement') }}
{{ ___('vendor.View') }} · CSV

{{ ___('vendor.Request a payout') }}

@if($minPayout > 0)

{{ str_replace(':amount', currency_symbol() . number_format($minPayout, 2), ___('vendor.The minimum payout is :amount.')) }}

@endif @if($tdsRate > 0)

{{ str_replace(':rate', $tdsRate, ___('vendor.:rate% tax is withheld from each payout.')) }}

@endif @if($available <= 0 || ! $vendor->isApproved())

{{ ___('vendor.Nothing to withdraw yet.') }}

@else
@csrf
@error('amount'){{ $message }}@enderror
@error('account_details'){{ $message }}@enderror
@endif

{{ ___('vendor.My payouts') }}

@forelse($payouts as $p) @empty@endforelse
{{ ___('vendor.Ref') }}{{ ___('vendor.Amount') }}{{ ___('vendor.Tax withheld') }}{{ ___('vendor.Net paid') }}{{ ___('vendor.Method') }}{{ ___('vendor.Status') }}{{ ___('vendor.Requested') }}
{{ $p->reference }}{{ currency_symbol() }}{{ number_format($p->amount, 2) }}{{ currency_symbol() }}{{ number_format($p->tds, 2) }}{{ currency_symbol() }}{{ number_format($p->netPaid(), 2) }}{{ $p->method }}{{ ___('vendor.'.$p->status) }}{{ $p->requested_on?->format('d M Y') }}
{{ ___('vendor.No payouts yet.') }}
@if($adjustments->isNotEmpty())

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

@foreach($adjustments as $a)@endforeach
{{ ___('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 }}
@endif

{{ ___('vendor.Earnings ledger') }}

@forelse($earnings as $e) @empty@endforelse
{{ ___('vendor.Date') }}{{ ___('vendor.Sale') }}{{ ___('vendor.Gross') }}{{ ___('vendor.Refunded') }}{{ ___('vendor.Commission') }}{{ ___('vendor.Net') }}{{ ___('vendor.Withdrawable from') }}{{ ___('vendor.Status') }}
{{ $e->created_at->format('d M Y') }}{{ $e->description }}{{ currency_symbol() }}{{ number_format($e->gross, 2) }}{{ currency_symbol() }}{{ number_format($e->refunded, 2) }}{{ currency_symbol() }}{{ number_format($e->commission, 2) }} ({{ rtrim(rtrim($e->commission_rate, '0'), '.') }}%)@if($e->vat > 0)
+ {{ ___('vendor.VAT') }} {{ currency_symbol() }}{{ number_format($e->vat, 2) }}@endif
{{ currency_symbol() }}{{ number_format($e->net, 2) }}{{ $e->available_on?->format('d M Y') ?? '—' }}@if($e->isHeld()) {{ ___('vendor.held') }}@endif{{ ___('vendor.'.$e->status) }}
{{ ___('vendor.No earnings yet.') }}
@endsection