<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>كشف تحويل مرتبات بنك الاسكندرية<?php $__template->endSection(); ?>
<?php $__template->section('page_actions'); ?>
<a href="/hr/payroll/periods/<?= (int) $period['id'] ?>/bank-transfer/csv" class="btn btn-success">تصدير CSV</a>
<a href="/hr/payroll/periods/<?= (int) $period['id'] ?>" class="btn btn-secondary">رجوع</a>
<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<div class="card">
    <div style="padding:16px;border-bottom:1px solid #E5E7EB;display:flex;justify-content:space-between;align-items:center;">
        <div>
            <h3 style="margin:0;font-size:16px;">كشف مرتبات بنك الاسكندرية — <?= e($period['year'] ?? '') ?>/<?= str_pad((string) ($period['month'] ?? ''), 2, '0', STR_PAD_LEFT) ?></h3>
            <p style="margin:4px 0 0;font-size:13px;color:#6B7280;"><?= $count ?> موظف — إجمالي <?= money($total_amount) ?></p>
        </div>
        <button onclick="window.print()" class="btn btn-sm btn-outline-primary no-print">طباعة</button>
    </div>
    <div class="table-responsive">
        <table class="data-table">
            <thead>
                <tr>
                    <th>م</th>
                    <th>اسم الموظف</th>
                    <th>الرقم القومي</th>
                    <th>رقم الحساب</th>
                    <th>صافي الراتب</th>
                </tr>
            </thead>
            <tbody>
                <?php $i = 1; foreach ($transfers as $t): ?>
                <tr>
                    <td><?= $i++ ?></td>
                    <td style="font-weight:600;"><?= e($t['employee_name']) ?></td>
                    <td style="font-family:monospace;direction:ltr;"><?= e($t['national_id']) ?></td>
                    <td style="font-family:monospace;direction:ltr;"><?= e($t['bank_account_number']) ?></td>
                    <td style="font-weight:700;"><?= money($t['net_salary']) ?></td>
                </tr>
                <?php endforeach; ?>
                <tr style="font-weight:700;background:#F3F4F6;">
                    <td colspan="4">الإجمالي</td>
                    <td><?= money($total_amount) ?></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<?php $__template->endSection(); ?>
