<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Booking Report</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            font-size: 12px;
            line-height: 1.4;
            color: #333;
        }
        .header {
            text-align: center;
            border-bottom: 2px solid #333;
            padding-bottom: 20px;
            margin-bottom: 30px;
        }
        .header h1 {
            margin: 0;
            color: #2d3748;
            font-size: 24px;
        }
        .header p {
            margin: 5px 0;
            color: #718096;
        }
        .summary {
            margin-bottom: 30px;
        }
        .summary-grid {
            display: table;
            width: 100%;
            border-collapse: collapse;
        }
        .summary-cell {
            display: table-cell;
            width: 25%;
            padding: 10px;
            text-align: center;
            border: 1px solid #e2e8f0;
        }
        .summary-cell h3 {
            margin: 0 0 5px 0;
            font-size: 14px;
            color: #4a5568;
        }
        .summary-cell .value {
            font-size: 18px;
            font-weight: bold;
            color: #2d3748;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }
        th, td {
            border: 1px solid #e2e8f0;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f7fafc;
            font-weight: bold;
            color: #4a5568;
        }
        .status-badge {
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: bold;
        }
        .footer {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #e2e8f0;
            text-align: center;
            color: #718096;
            font-size: 10px;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>Hotel Management System</h1>
        <p>Booking Report</p>
        <p>Period: <?php echo e(\Carbon\Carbon::parse($dateFrom)->format('M d, Y')); ?> - <?php echo e(\Carbon\Carbon::parse($dateTo)->format('M d, Y')); ?></p>
        <p>Generated: <?php echo e(now()->format('M d, Y H:i:s')); ?></p>
    </div>

    <div class="summary">
        <h2>Summary Statistics</h2>
        <div class="summary-grid">
            <div class="summary-cell">
                <h3>Total Bookings</h3>
                <div class="value"><?php echo e($summary['total_bookings']); ?></div>
            </div>
            <div class="summary-cell">
                <h3>Total Revenue</h3>
                <div class="value">$<?php echo e(number_format($summary['total_revenue'], 2)); ?></div>
            </div>
            <div class="summary-cell">
                <h3>Advance Payments</h3>
                <div class="value">$<?php echo e(number_format($summary['total_advance_payment'], 2)); ?></div>
            </div>
            <div class="summary-cell">
                <h3>Due Amount</h3>
                <div class="value">$<?php echo e(number_format($summary['total_due_amount'], 2)); ?></div>
            </div>
        </div>
    </div>

    <div class="summary">
        <h2>Status Breakdown</h2>
        <div class="summary-grid">
            <div class="summary-cell">
                <h3>Confirmed</h3>
                <div class="value"><?php echo e($summary['confirmed_bookings']); ?></div>
            </div>
            <div class="summary-cell">
                <h3>Checked In</h3>
                <div class="value"><?php echo e($summary['checked_in_bookings']); ?></div>
            </div>

            <div class="summary-cell">
                <h3>Rejected</h3>
                <div class="value"><?php echo e($summary['rejected_bookings']); ?></div>
            </div>
        </div>
    </div>

    <h2>Detailed Booking Information</h2>
    <table>
        <thead>
            <tr>
                <th>Check IN</th>
                <th>Check OUT</th>
                <th>Room</th>
                <th>Customer</th>
                <th>Nights</th>
                <th>Total</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $bookings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $booking): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e(\Carbon\Carbon::parse($booking->check_in)->format('Y-m-d H:i:s')); ?></td>
                    <td><?php echo e(\Carbon\Carbon::parse($booking->check_out)->format('Y-m-d H:i:s')); ?></td>
                    <td>
                        <?php echo e($booking->room->room_no); ?><br>
                        <small><?php echo e($booking->room->roomType->room_type); ?></small>
                    </td>
                    <td>
                        <?php if($booking->primaryCustomer): ?>
                            <?php echo e($booking->primaryCustomer->first_name); ?> <?php echo e($booking->primaryCustomer->last_name); ?><br>
                            <small><?php echo e($booking->primaryCustomer->nationality); ?></small>
                        <?php else: ?>
                            No customer data
                        <?php endif; ?>
                    </td>
                    <td><?php echo e($booking->number_of_nights); ?></td>
                    <td>$<?php echo e(number_format($booking->total_price, 2)); ?></td>
                    <td>
                        <span class="status-badge" style="background-color: <?php echo e($booking->booking_status == 'Checked In' ? '#bee3f8' : '#fed7d7'); ?>; color: <?php echo e($booking->booking_status == 'Checked In' ? '#2b6cb0' : '#c53030'); ?>;">
                            <?php echo e($booking->booking_status); ?>

                        </span>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>

    <div class="footer">
        <p>This report was generated automatically by the Hotel Management System</p>
        <p>For any questions, please contact the system administrator</p>
    </div>
</body>
</html> <?php /**PATH /home4/lvwxwpmy/public_html/hotelms/resources/views/backend/reports/pdf/booking.blade.php ENDPATH**/ ?>