<div class="row layout-spacing">
    <div class="col-lg-12">
        <div class="statbox widget box box-shadow">
            <div class="widget-content widget-content-area">
                <table id="style-3" class="table style-3  table-hover">
                    <thead>
                        <tr>
                            <th class="text-center">No</th>
                            <th class="text-center">Aksi</th>
                            <th class="text-center">Karyawan</th>
                            <th class="text-center">Pokok Gaji</th>
                            <th class="text-center">Bonus / Reward</th>
                            <th class="text-center">Potongan / Punishment</th>
                            <th class="text-center">Total Terima</th>
                            <th class="text-center">Status / Metode</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $a = 1; ?>
                        <?php foreach ($data_gaji as $Data_gaji) : ?>
                        <tr>
                            <td class="text-center">
                                <?= $a; ?>
                            </td>
                            <td class="text-center">
                                <a class="btn btn-primary btn-sm"
                                    href="<?= base_url('keuangan/identitas/detail_gaji/' . $this->encrypt->encode($Data_gaji->gaji_id))  ?>"
                                    style="color: white;">Detail</a>
                            </td>
                            <td class="text-left">
                                <?= $Data_gaji->nm_panggilan ?> - <?= $Data_gaji->role_level ?>
                            </td>
                            <td class="text-right">
                                <?= number_format($Data_gaji->gaji_pokok, 0, ',', '.') ?>,-
                            </td>
                            <td class="text-right">
                                <?= number_format($Data_gaji->ttl_bonus, 0, ',', '.') ?>,-
                            </td>
                            <td class="text-right">
                                <?= number_format($Data_gaji->ttl_potongan, 0, ',', '.') ?>,-
                            </td>
                            <td class="text-right">
                                <?= number_format($Data_gaji->ttl_gaji, 0, ',', '.') ?>,
                            </td>
                            <td class="text-center">
                                <?php if ($Data_gaji->sts_gaji == 'PROSES') : ?>
                                <?php if ($Data_gaji->metode == 'TRANSFER') : ?>
                                <span style="float: center;" class="shadow-none badge badge-danger">PROSES
                                    TRANSFER</span>
                                <?php else: ?>
                                <span style="float: center;" class="shadow-none badge badge-danger">PROSES TUNAI</span>
                                <?php endif; ?>
                                <?php else: ?>
                                <?php if ($Data_gaji->metode == 'TRANSFER') : ?>
                                <span style="float: center;" class="shadow-none badge badge-success">SELESAI
                                    TRANSFER</span>
                                <?php else: ?>
                                <span style="float: center;" class="shadow-none badge badge-success">SELESAI
                                    TUNAI</span>
                                <?php endif; ?>
                                <?php endif; ?>
                            </td>
                        </tr>
                        <?php $a++; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>