<?php $__env->startSection('title', __('nav.overdue')); ?>
<?php $__env->startSection('content'); ?>
<h1 class="h4 mb-3"><?php echo e(__('nav.overdue')); ?></h1>
<form class="row g-2 mb-3">
<div class="col-md-4"><input class="form-control" name="q" value="<?php echo e(request('q')); ?>" placeholder="<?php echo e(__('messages.search_line_or_customer')); ?>"></div>
<div class="col-md-2"><input class="form-control" type="number" name="year" value="<?php echo e(request('year', now()->year)); ?>" placeholder="<?php echo e(__('messages.year')); ?>"></div>
<div class="col-md-2"><input class="form-control" type="number" name="month" min="1" max="12" value="<?php echo e(request('month', now()->month)); ?>" placeholder="<?php echo e(__('messages.month')); ?>"></div>
<div class="col-md-2"><select class="form-select" name="telecom_company_id"><option value=""><?php echo e(__('messages.company')); ?></option><?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($c->id); ?>" <?php if(request('telecom_company_id')==$c->id): echo 'selected'; endif; ?>><?php echo e($c->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div>
<div class="col-md-2"><button class="btn btn-success w-100"><?php echo e(__('messages.search')); ?></button></div>
</form>
<div class="mb-2">
<a class="btn btn-sm btn-outline-success" href="<?php echo e(route('overdue.export', request()->query())); ?>"><?php echo e(__('messages.excel')); ?></a>
<button class="btn btn-sm btn-outline-secondary" onclick="window.print()"><?php echo e(__('messages.print')); ?></button>
</div>
<div class="card"><div class="table-responsive"><table class="table mb-0">
<thead><tr><th><?php echo e(__('messages.line')); ?></th><th><?php echo e(__('messages.customer')); ?></th><th><?php echo e(__('messages.national_id')); ?></th><th><?php echo e(__('messages.main_account')); ?></th><th><?php echo e(__('messages.plan')); ?></th><th><?php echo e(__('messages.monthly_amount')); ?></th><th><?php echo e(__('messages.last_paid_period')); ?></th><th><?php echo e(__('messages.overdue_months')); ?></th><th><?php echo e(__('messages.outstanding')); ?></th></tr></thead>
<tbody><?php $__empty_1 = true; $__currentLoopData = $lines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><a href="<?php echo e(route('billing.show',$row['line'])); ?>"><?php echo e($row['line']->phone_number); ?></a></td>
<td><?php echo e($row['line']->customer?->name); ?></td>
<td><?php echo e($row['line']->customer?->national_id); ?></td>
<td><?php echo e($row['line']->mainAccount?->name); ?></td>
<td><?php echo e($row['line']->currentPlan?->name); ?></td>
<td><?php echo e(money($row['monthly'])); ?></td>
<td><?php echo e($row['paid_through']?->label()); ?></td>
<td><?php echo e($row['overdue_months']); ?></td>
<td><?php echo e(money($row['outstanding'])); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><tr><td colspan="9"><?php echo e(__('messages.no_results')); ?></td></tr><?php endif; ?></tbody></table></div>
<div class="card-body"><?php echo e($lines->links()); ?></div></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\esim\resources\views/overdue/index.blade.php ENDPATH**/ ?>