{{ $motel->name }}
Địa chỉ: {{ $motel->address ?? 'N/A' }}
Điện thoại: {{ $landlord->phone ?? 'N/A' }}
Email: {{ $landlord->email ?? 'N/A' }}
HÓA ĐƠN THANH TOÁN TIỀN PHÒNG
Mã hóa đơn:
{{ $invoice->invoice_code }}
Tháng:
{{ is_string($invoice->month) ? (strpos($invoice->month, '-') !== false ? \Carbon\Carbon::createFromFormat('Y-m-d', $invoice->month)->format('m/Y') : $invoice->month) : $invoice->month->format('m/Y') }}
Hạn thanh toán:
{{ is_string($invoice->due_date) ? (strpos($invoice->due_date, '-') !== false ? \Carbon\Carbon::createFromFormat('Y-m-d', $invoice->due_date)->format('d/m/Y') : $invoice->due_date) : $invoice->due_date->format('d/m/Y') }}
Khách hàng:
{{ $tenant->user->name ?? 'N/A' }}
Số điện thoại:
{{ $tenant->phone ?? 'N/A' }}
Phòng:
{{ $room->room_number }}
@php $invoiceDetails = $invoice->invoiceDetails ?? collect(); $totalAmount = 0; $index = 1; @endphp @if($invoiceDetails->count() > 0) @foreach($invoiceDetails as $detail) @php $totalAmount += $detail->amount ?? 0; @endphp @endforeach @else {{-- Tiền phòng --}} @php $totalAmount += $room->roomPrice->price ?? 0; @endphp {{-- Tiền điện --}} @if(isset($invoice->electricity_amount) && $invoice->electricity_amount > 0) @php $totalAmount += $invoice->electricity_amount; @endphp @endif {{-- Tiền nước --}} @if(isset($invoice->water_amount) && $invoice->water_amount > 0) @php $totalAmount += $invoice->water_amount; @endphp @endif {{-- Phí dịch vụ khác --}} @if(isset($invoice->service_amount) && $invoice->service_amount > 0) @php $totalAmount += $invoice->service_amount; @endphp @endif @endif
STT Nội dung Số tiền (VNĐ)
{{ $index++ }} @if($detail->item_name) {{ $detail->item_name }} @elseif($detail->serviceType && $detail->serviceType->name) {{ $detail->serviceType->name }} @else Dịch vụ @endif {{ number_format($detail->amount ?? 0) }}
{{ $index++ }} Tiền phòng tháng {{ is_string($invoice->month) ? (strpos($invoice->month, '-') !== false ? \Carbon\Carbon::createFromFormat('Y-m-d', $invoice->month)->format('m/Y') : $invoice->month) : $invoice->month->format('m/Y') }} 1 {{ number_format($room->roomPrice->price ?? 0) }}
{{ $index++ }} Tiền điện tháng {{ is_string($invoice->month) ? (strpos($invoice->month, '-') !== false ? \Carbon\Carbon::createFromFormat('Y-m-d', $invoice->month)->format('m/Y') : $invoice->month) : $invoice->month->format('m/Y') }} {{ $invoice->electricity_usage ?? 0 }} kWh {{ number_format($invoice->electricity_amount) }}
{{ $index++ }} Tiền nước tháng {{ is_string($invoice->month) ? (strpos($invoice->month, '-') !== false ? \Carbon\Carbon::createFromFormat('Y-m-d', $invoice->month)->format('m/Y') : $invoice->month) : $invoice->month->format('m/Y') }} {{ $invoice->water_usage ?? 0 }} m³ {{ number_format($invoice->water_amount) }}
{{ $index++ }} Phí dịch vụ khác 1 {{ number_format($invoice->service_amount) }}
Tổng cộng: {{ number_format($totalAmount) }} VNĐ
THÀNH TIỀN: {{ number_format($totalAmount) }} VNĐ
Quét mã QR để thanh toán:
QR Code
THÔNG TIN THANH TOÁN:
Ngân hàng: {{ $landlord->bank_name ?? 'N/A' }}
Số tài khoản: {{ $landlord->bank_account ?? 'N/A' }}
Tên tài khoản: {{ $landlord->bank_account_name ?? 'N/A' }}
Nội dung chuyển khoản: Thanh toan hoa don {{ $invoice->invoice_code }}