@extends('admin.layout') @section('title', 'Invoice ' . $invoice->invoice_number) @section('content')

Invoice {{ $invoice->invoice_number }}

{{ strtoupper($invoice->hotel_name) }}
@if($settings && $settings->hotel_logo) @if($settings->hotel_logo && Storage::disk('public')->exists($settings->hotel_logo)) Hotel Logo @else
LOGO
HOTEL
@endif @endif
{{ $invoice->hotel_name }}
@if($settings)
{{ $settings->hotel_address }}
{{ $settings->hotel_phone }} | {{ $settings->hotel_email }}
@endif

INVOICE

# {{ $invoice->invoice_number }}
{{ $invoice->created_at->format('d F Y') }}
@if(($invoice->non_refundable ?? false) || (!empty($invoice->notes) && preg_match('/non[- ]?refund/i', $invoice->notes)))
NON-REFUNDABLE
@endif
Bill To:
{{ $invoice->guest_name }}
{{ $invoice->guest_email }}
@if($invoice->guest_phone)
{{ $invoice->guest_phone }}
@endif
Booking Details:
Booking ID: {{ $invoice->booking->booking_code ?? 'N/A' }}
Check-in: {{ $invoice->check_in_date->format('d/m/Y') }}
Check-out: {{ $invoice->check_out_date->format('d/m/Y') }}
Duration: {{ $invoice->nights }} {{ $invoice->nights > 1 ? 'nights' : 'night' }}
@php $statusClass = match($invoice->status ?? 'draft') { 'draft' => 'status-draft', 'sent' => 'status-sent', 'paid' => 'status-paid', 'cancelled' => 'status-cancelled', default => 'status-draft' }; @endphp {{ ucfirst($invoice->status ?? 'Draft') }}
@if($invoice->booking && $invoice->booking->roomServices && $invoice->booking->roomServices->count() > 0) @foreach($invoice->booking->roomServices as $service) @endforeach @endif
Description Room Nights Rate Amount
{{ $invoice->booking->room->roomType->name ?? $invoice->room_type }} Room {{ $invoice->room_number }} {{ $invoice->nights }} Rp {{ number_format($invoice->room_rate, 0, ',', '.') }} Rp {{ number_format($invoice->subtotal, 0, ',', '.') }}
{{ $service->service_name }} - {{ $service->quantity }} Rp {{ number_format($service->unit_price, 0, ',', '.') }} Rp {{ number_format($service->total_price, 0, ',', '.') }}
@php( $dpp = max(0, ($invoice->subtotal ?? 0) + ($invoice->services_total ?? 0) - ($invoice->discount_amount ?? 0)) ) @php($taxRate = (int) \App\Models\Settings::get('tax_rate', 0))
Room Subtotal: Rp {{ number_format($invoice->subtotal, 0, ',', '.') }}
@if($invoice->services_total > 0)
Services Total: Rp {{ number_format($invoice->services_total, 0, ',', '.') }}
@endif @if(($invoice->discount_amount ?? 0) > 0)
Discount: - Rp {{ number_format($invoice->discount_amount, 0, ',', '.') }}
@endif
Total (Termasuk Pajak): Rp {{ number_format($invoice->total_amount ?? ($dpp + ($invoice->tax_amount ?? 0)), 0, ',', '.') }}
DPP (Tax Base): Rp {{ number_format($dpp, 0, ',', '.') }}
@if($invoice->tax_amount > 0)
Tax ({{ $taxRate }}%): Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }}
@endif
TOTAL: Rp {{ number_format($invoice->total_amount, 0, ',', '.') }}
@if($invoice->notes)
Special Requests / Notes:
{{ $invoice->notes }}
@endif
Thank you for choosing {{ $invoice->hotel_name }}!
This is a computer-generated invoice and does not require a signature.
Generated on {{ now()->format('d F Y, H:i') }} WIB
@if($settings && $settings->hotel_website)
Visit us at: {{ $settings->hotel_website }}
@endif
Update Invoice Status
@endsection