<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php $__env->slot('header', null, []); ?> <div class="d-flex flex-wrap justify-content-between align-items-center gap-2"><div><h2 class="h4 mb-0">BTRC Subscriber Report</h2><p class="text-muted mb-0">Regulatory subscriber, identity, connection and bandwidth information</p></div><div class="d-flex gap-2"><a href="<?php echo e(route('admin.reports.btrc.export',request()->query())); ?>" class="btn btn-success">Export CSV</a><button onclick="window.print()" class="btn btn-outline-secondary">Print</button></div></div> <?php $__env->endSlot(); ?>
<form class="card border-0 shadow-sm mb-4 d-print-none"><div class="card-body row g-3 align-items-end"><div class="col-md-2"><label class="form-label">Connected from</label><input type="date" name="from" value="<?php echo e($filters['from']??''); ?>" class="form-control"></div><div class="col-md-2"><label class="form-label">Connected to</label><input type="date" name="to" value="<?php echo e($filters['to']??''); ?>" class="form-control"></div><div class="col-md-2"><label class="form-label">Status</label><select name="status" class="form-select"><option value="">All</option><option value="active" <?php if(($filters['status']??'')==='active'): echo 'selected'; endif; ?>>Active</option><option value="inactive" <?php if(($filters['status']??'')==='inactive'): echo 'selected'; endif; ?>>Inactive</option></select></div><div class="col-md-2"><label class="form-label">Zone</label><select name="zone" class="form-select"><option value="">All</option><?php $__currentLoopData = $zones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $zone): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option <?php if(($filters['zone']??'')===$zone): echo 'selected'; endif; ?>><?php echo e($zone); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div class="col-md-2"><label class="form-label">Package</label><select name="package_id" class="form-select"><option value="">All</option><?php $__currentLoopData = $packages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($package->id); ?>" <?php if(($filters['package_id']??'')==$package->id): echo 'selected'; endif; ?>><?php echo e($package->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div class="col-md-2"><label class="form-label">Search</label><input name="search" value="<?php echo e($filters['search']??''); ?>" class="form-control" placeholder="ID/name/mobile/IP"></div><div class="col-12"><button class="btn btn-primary">Generate report</button><a href="<?php echo e(route('admin.reports.btrc')); ?>" class="btn btn-outline-secondary">Reset</a></div></div></form>
<div class="row g-3 mb-4"><div class="col-6 col-lg-3"><div class="card border-0 shadow-sm"><div class="card-body"><small>Total Subscribers</small><h3><?php echo e(number_format($summary['total'])); ?></h3></div></div></div><div class="col-6 col-lg-3"><div class="card border-0 shadow-sm"><div class="card-body"><small>Active</small><h3 class="text-success"><?php echo e(number_format($summary['active'])); ?></h3></div></div></div><div class="col-6 col-lg-3"><div class="card border-0 shadow-sm"><div class="card-body"><small>Inactive</small><h3 class="text-danger"><?php echo e(number_format($summary['inactive'])); ?></h3></div></div></div><div class="col-6 col-lg-3"><div class="card border-0 shadow-sm"><div class="card-body"><small>Monthly Billing</small><h3><?php echo e(app(\App\Services\CurrencyService::class)->format($summary['monthly_revenue'])); ?></h3></div></div></div></div>
<div class="card border-0 shadow-sm"><div class="table-responsive"><table class="table table-sm table-bordered align-middle mb-0" style="min-width:1500px"><thead><tr><th>SL</th><th>Customer ID</th><th>Subscriber</th><th>Mobile</th><th>NID</th><th>Address</th><th>Zone</th><th>Package</th><th>Bandwidth</th><th>IP</th><th>Type</th><th>Connected</th><th>Status</th><th>MikroTik</th><th>ONU MAC</th></tr></thead><tbody><?php $__empty_1 = true; $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><tr><td><?php echo e($customers->firstItem()+$loop->index); ?></td><td><?php echo e($customer->customer_code); ?></td><td><?php echo e($customer->name); ?></td><td><?php echo e($customer->contact_phone); ?></td><td><?php echo e($customer->national_id ?: '-'); ?></td><td><?php echo e($customer->office_address ?: '-'); ?></td><td><?php echo e($customer->zone ?: '-'); ?></td><td><?php echo e($customer->package?->name ?? '-'); ?></td><td><?php echo e($customer->package?->net_speed ?? '-'); ?></td><td><?php echo e($customer->ip_address ?: '-'); ?></td><td><?php echo e($customer->connection_type ?: '-'); ?></td><td><?php echo e($customer->connection_date?->format('Y-m-d') ?? '-'); ?></td><td><span class="badge <?php echo e($customer->status==1?'bg-success':'bg-danger'); ?>"><?php echo e($customer->status==1?'Active':'Inactive'); ?></span></td><td><?php echo e($customer->mikrotik?->name ?? '-'); ?></td><td><?php echo e($customer->onumac ?: '-'); ?></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><tr><td colspan="15" class="text-center py-4">No subscribers found.</td></tr><?php endif; ?></tbody></table></div><div class="card-footer bg-white d-print-none"><?php echo e($customers->links()); ?></div></div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH D:\herd\billing\laravel-app\resources\views\admin\reports\btrc.blade.php ENDPATH**/ ?>