<!doctype html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Payment Receipt #<?php echo e($account->id); ?></title>
    <style>
        *{box-sizing:border-box}body{margin:0;background:#eef2f7;color:#111;font-family:Arial,sans-serif}.toolbar{display:flex;justify-content:center;gap:8px;padding:14px}.toolbar button,.toolbar a{border:0;border-radius:7px;padding:9px 15px;font-weight:700;text-decoration:none;cursor:pointer}.print{background:#111827;color:#fff}.back{background:#fff;color:#334155}.receipt{width:80mm;min-height:120mm;margin:0 auto 24px;padding:5mm;background:#fff}.center{text-align:center}.logo{display:block;max-width:23mm;max-height:18mm;object-fit:contain;margin:0 auto 2mm}.business-name{margin:0;font-size:20px;line-height:1.1}.small{font-size:11px;line-height:1.45}.divider{border-top:1px dashed #111;margin:3mm 0}.row{display:flex;justify-content:space-between;gap:4mm;margin:1.5mm 0;font-size:11px}.row span:first-child{color:#444}.row strong{text-align:right}.customer{font-size:11px;line-height:1.55}.item-head,.item{display:grid;grid-template-columns:1fr auto;gap:4mm;font-size:11px}.item-head{padding-bottom:1.5mm;border-bottom:1px solid #111;font-weight:700}.item{padding:2.5mm 0}.total{font-size:15px;font-weight:800}.footer{margin-top:4mm;font-size:11px;font-weight:700;text-align:center}@page{size:80mm auto;margin:0}@media print{body{background:#fff}.toolbar{display:none}.receipt{margin:0;width:80mm;box-shadow:none}}
    </style>
</head>
<body>
    <div class="toolbar">
        <button class="print" type="button" onclick="window.print()">Print Receipt</button>
        <a class="back" href="<?php echo e(route('admin.customers.ledger', $customer)); ?>">Back</a>
    </div>
    <main class="receipt">
        <header class="center">
            <?php if($business['logo']): ?>
                <img class="logo" src="<?php echo e(asset('storage/'.$business['logo'])); ?>" alt="<?php echo e($business['name']); ?> logo">
            <?php endif; ?>
            <h1 class="business-name"><?php echo e($business['name']); ?></h1>
            <?php if($business['address']): ?><div class="small"><?php echo e($business['address']); ?></div><?php endif; ?>
            <?php if($business['phone']): ?><div class="small">Mobile: <?php echo e($business['phone']); ?></div><?php endif; ?>
        </header>

        <div class="divider"></div>
        <div class="row"><span>Receipt No.</span><strong>#<?php echo e(str_pad((string) $account->id, 6, '0', STR_PAD_LEFT)); ?></strong></div>
        <div class="row"><span>Payment Date</span><strong><?php echo e(optional($account->entry_date)->format('d M Y')); ?></strong></div>
        <div class="divider"></div>

        <section class="customer">
            <div><strong><?php echo e($customer->name); ?></strong> (<?php echo e($customer->customer_code); ?>)</div>
            <div>Mobile: <?php echo e($customer->contact_phone ?: '-'); ?></div>
            <div>PPPoE User: <?php echo e($customer->ip_address ?: '-'); ?></div>
        </section>

        <div class="divider"></div>
        <div class="item-head"><span>Description</span><span>Amount</span></div>
        <div class="item">
            <span>
                Payment received<br>
                <small><?php echo e($paymentMonth ?: 'Payment month not specified'); ?></small><br>
                <small>Package: <?php echo e($customer->package?->name ?? 'Standard'); ?><?php echo e($customer->package?->net_speed ? ' · '.$customer->package->net_speed : ''); ?></small>
            </span>
            <strong><?php echo e(app(\App\Services\CurrencyService::class)->format($account->amount)); ?></strong>
        </div>
        <div class="divider"></div>
        <div class="row total"><span>Total Paid</span><strong><?php echo e(app(\App\Services\CurrencyService::class)->format($account->amount)); ?></strong></div>
        <div class="divider"></div>
        <footer class="footer">PAYMENT RECEIVED<br>Thank you</footer>
    </main>
</body>
</html>
<?php /**PATH D:\herd\billing\laravel-app\resources\views\admin\customers\ledger-receipt.blade.php ENDPATH**/ ?>