@extends('layout.app') @section('content')

Payout – {{ $property->property_name }}

Back

Owner: {{ $property->propertyOwner?->name }} · {{ $property->propertyOwner?->email }} · {{ $property->propertyOwner?->phone }}

@if($payments->isEmpty())

Nothing is owed to this hotel.

@endif {{-- One payout per currency: LKR and USD are never combined --}} @foreach($payments->groupBy(fn ($payment) => $payment->currency->code)->sortKeys() as $currency => $group)
{{ $currency }} payments
@csrf
@foreach($group as $payment) @php($payable = \App\Services\HotelPayouts::payable($payment)) @endforeach
Paid by guestBookingGuest Payment ({{ $currency }})Commission ({{ $currency }})To hotel ({{ $currency }})
{{ $payment->paid_at->timezone(config('bedspace.timezone'))->format('Y-m-d') }} {{ $payment->reservation->reference }}
{{ $payment->reservation->status->label() }}
{{ $payment->reservation->guest_name }} {{ number_format($payment->amount, 2) }} {{ number_format($payment->commission_amount, 2) }} {{ number_format($payable, 2) }}
Selected total ({{ $currency }}){{ number_format($group->sum(fn ($p) => \App\Services\HotelPayouts::payable($p)), 2) }}
@endforeach

Payout history

@forelse($history as $payout) @empty @endforelse
DateAmountReferenceNoteRecorded by
{{ $payout->paid_at->timezone(config('bedspace.timezone'))->format('Y-m-d') }} {{ $payout->money() }} {{ $payout->reference }} {{ $payout->notes }} {{ $payout->recordedBy?->name }}
No payouts yet.
@stop @section('scripts') @include('admin._selectedTotal') @stop