<!DOCTYPE html>
<html lang="id">

<head>
    <meta charset="UTF-8">
    <title>Laporan_Analisis_Pelanggan_Loyal_MegaMart</title>
    <style>
        body {
            font-family: 'Courier New', Courier, monospace;
            color: #000;
            padding: 20px;
            font-size: 12px;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 2px dashed #000;
            padding-bottom: 10px;
        }

        .header h2 {
            margin: 0;
            font-size: 16px;
            font-weight: bold;
        }

        table {
            border-collapse: collapse;
            margin-top: 15px;
            width: 100%;
        }

        table th,
        table td {
            border: 1px solid #000;
            padding: 8px;
            text-align: left;
        }

        table th {
            background-color: #f2f2f2;
            font-weight: bold;
        }

        .text-right {
            text-align: right;
        }

        .font-bold {
            font-weight: bold;
        }
    </style>
</head>

<body>

    <div class="header">
        <h2>MEGA MART LAPORAN ANALISIS LOYALITAS PELANGGAN (CRM)</h2>
        <p>Klasifikasi Nilai Reward Poin & Kontribusi Finansial Member</p>
        <p>Tanggal Cetak: <?php echo e(now()->isoFormat('LLLL')); ?></p>
    </div>

    <table>
        <thead>
            <tr>
                <th>No</th>
                <th>Nama Pelanggan</th>
                <th>Nomor HP</th>
                <th class="text-right">Akumulasi Poin Reward</th>
                <th class="text-right">Total Belanja (Monetary Spend)</th>
            </tr>
        </thead>
        <tbody>
            <?php $no = 1; ?>
            <?php $__currentLoopData = $pelangganLoyal; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($no++); ?></td>
                <td class="font-bold"><?php echo e($p->nama); ?></td>
                <td><?php echo e($p->no_hp ?? '-'); ?></td>
                <td class="text-right font-bold" style="color: #b45309;"><?php echo e($p->poin_loyalitas); ?> Poin</td>
                <td class="text-right font-bold">Rp <?php echo e(number_format($p->total_spend, 0, ',', '.')); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>

    <script>
        window.print();
    </script>

</body>

</html><?php /**PATH D:\SKRIPSI CRM 2026 II\PROGRAM CRM MEGA MART\megamart-crm\resources\views/admin/laporan_pelanggan_cetak.blade.php ENDPATH**/ ?>