<!DOCTYPE html>
<html lang="<?php echo e(app()->getLocale()); ?>" dir="<?php echo e(html_dir()); ?>">
<head>
<meta charset="utf-8">
<title><?php echo e($invoice->invoice_number); ?></title>
<style>
body { font-family: dejavusans, sans-serif; font-size: 13pt; color: #111; }
h1 { font-size: 18pt; margin: 0 0 6px; }
h2 { font-size: 14pt; margin: 14px 0 8px; }
p { margin: 4px 0; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { border: 1px solid #ccc; padding: 6px 8px; }
th { background: #f3f3f3; }
.total td { font-weight: bold; }
.logo { max-height: 56px; max-width: 160px; }
</style>
</head>
<body>
<?php
    $hideName = $hideName ?? false;
    $paidMonths = $invoice->items->map(fn ($item) => $item->billingPeriod?->label())->filter()->unique()->values();
    $logo = company_logo_file();
?>
<?php if($logo): ?>
<img src="<?php echo e($logo); ?>" alt="" class="logo"><br>
<?php endif; ?>
<h1><?php echo e(setting('company_name')); ?></h1>
<p><?php echo e(setting('company_address')); ?> · <?php echo e(setting('company_phone')); ?></p>
<h2><?php echo e($invoice->invoice_number); ?> — <?php echo e($invoice->date?->toDateString()); ?></h2>
<p><?php echo e(__('messages.line')); ?>: <strong><?php echo e($invoice->line?->phone_number); ?></strong></p>
<?php if(! $hideName && $invoice->customer?->name): ?>
<p><?php echo e(__('messages.customer')); ?>: <?php echo e($invoice->customer->name); ?></p>
<?php endif; ?>
<?php if($paidMonths->isNotEmpty()): ?>
<p><?php echo e(__('messages.paid_months')); ?>: <strong><?php echo e($paidMonths->join('، ')); ?></strong></p>
<?php endif; ?>
<table>
<thead><tr><th><?php echo e(__('messages.items')); ?></th><th><?php echo e(__('messages.price')); ?></th><th><?php echo e(__('messages.total')); ?></th></tr></thead>
<tbody>
<?php $__currentLoopData = $invoice->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
    <td><?php echo e($item->billingPeriod?->label() ?: $item->description); ?></td>
    <td><?php echo e(money($item->unit_price)); ?></td>
    <td><?php echo e(money($item->total)); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
<tfoot>
<tr class="total"><td><?php echo e(__('messages.total')); ?></td><td></td><td><?php echo e(money($invoice->total)); ?></td></tr>
</tfoot>
</table>
<p><?php echo e(setting('invoice_footer')); ?></p>
</body>
</html>
<?php /**PATH D:\laragon\www\esim\resources\views/invoices/pdf.blade.php ENDPATH**/ ?>