@if (session('status'))
{{ session('status') }} @if (session('last_payment_id')) · Print receipt @endif
@endif @if (session('error'))
{{ session('error') }}
@endif
Billing / {{ $folio->folio_number }}
@php $isOpen = $folio->status === \App\Models\Folio::STATUS_OPEN; @endphp

{{ $folio->folio_number }} $isOpen, 'bg-sand-200 text-ink-soft' => !$isOpen, ])> {{ \App\Models\Folio::STATUSES[$folio->status] ?? '—' }}

Opened {{ $folio->opened_at?->format('d M Y H:i') }} @if ($folio->closed_at) · Closed {{ $folio->closed_at->format('d M Y H:i') }} @endif

@if ($isOpen) @can('billing.post-charge') @endcan @can('billing.process-payment') @if ((float) $folio->balance > 0) @endif @endcan @endif @include('layouts.partials.icon', ['name' => 'receipt', 'class' => 'w-4 h-4']) Invoice
{{-- Post-charge dialog --}} @if ($showChargeDialog)

Post charge

@error('chargeCategoryId')

{{ $message }}

@enderror
@error('chargeDescription')

{{ $message }}

@enderror
@error('chargeUnitPrice')

{{ $message }}

@enderror
@error('chargeQuantity')

{{ $message }}

@enderror
@endif {{-- Take-payment dialog --}} @if ($showPaymentDialog)

Take payment

Add one line per payment method (split payment supported).

@php $linesTotal = 0; @endphp
@foreach ($paymentLines as $i => $line) @php $linesTotal += (float) ($line['amount'] ?? 0); @endphp
@error("paymentLines.{$i}.payment_method_id")

{{ $message }}

@enderror
@error("paymentLines.{$i}.amount")

{{ $message }}

@enderror
@if (count($paymentLines) > 1) @endif
@endforeach
Lines total: {{ money($linesTotal) }} Folio balance: {{ money($folio->balance) }}
@endif {{-- Void-charge dialog --}} @if ($voidChargeId)

Void charge

Reason will be recorded for the audit trail.

@error('voidReason')

{{ $message }}

@enderror
@endif

Charges

@if ($folio->charges->isEmpty())

No charges yet.

@else @foreach ($folio->charges->sortBy('created_at') as $c) @endforeach
Date Description Category Qty Unit Amount Tax Total
{{ ($c->charge_date ?? $c->created_at)->format('d M') }} {{ $c->description }} @if ($c->is_voided)
Voided · {{ $c->voided_reason }}
@endif
{{ $c->category?->name }} {{ $c->quantity }} {{ money($c->unit_price) }} {{ money($c->amount) }} {{ money($c->tax_amount) }} {{ money($c->total_amount) }} @if (!$c->is_voided && $isOpen) @can('billing.void-charge') @endcan @endif
@endif

Payments

@if ($folio->payments->isEmpty())

No payments yet.

@else @foreach ($folio->payments->sortByDesc('processed_at') as $p) @php $payColor = match ($p->status_color) { 'green' => 'bg-green-100 text-green-700', 'yellow' => 'bg-yellow-100 text-yellow-700', 'red' => 'bg-red-100 text-red-700', 'orange' => 'bg-orange-100 text-orange-700', default => 'bg-sand-200 text-ink-soft', }; @endphp @endforeach
Date Method Reference By Amount Status
{{ $p->processed_at->format('d M H:i') }} {{ $p->paymentMethod?->name }} {{ $p->reference_number ?: '—' }} {{ $p->createdBy?->name ?? '—' }} {{ money($p->amount) }} {{ \App\Models\Payment::STATUSES[$p->status] ?? $p->status }} Receipt @if ($p->isCompleted() && $isOpen) @can('billing.process-payment') @endcan @endif
@endif

Summary

Charges
{{ money($folio->total_charges) }}
Payments
{{ money($folio->total_payments) }}
Balance
{{ money($folio->balance) }}
@if ($folio->guest)

Guest

{{ $folio->guest->full_name }}

{{ $folio->guest->guest_number }}

@endif @if ($folio->reservation)

Reservation

{{ $folio->reservation->confirmation_number }}

Room {{ $folio->reservation->room?->room_number ?? '—' }} · {{ $folio->reservation->check_in_date?->format('d M') }} → {{ $folio->reservation->check_out_date?->format('d M') }}

@endif