<div class="table-responsive">
    <table id="subExpenseTypeTable" class="table table-bordered table-striped">
        <thead>
            <tr>
                <th>ID</th>
                <th>Parent Type</th>
                <th>Sub Type Name</th>
                <th class="text-right">Action</th>
            </tr>
        </thead>
        <tbody>
        <?php foreach($sub_expense_types as $row): ?>
            <tr>
                <td><?= $row->id ?></td>
                <td><?= $this->expense_types->get_expense_type_name($row->expense_type_id); ?></td>
                <td><?= $row->sub_expense_type ?></td>
                <td class="text-right">
                    <a href="#" class="btn btn-sm edit-subtype-btn btn-warning"
                       data-id="<?= $row->id ?>"
                       data-type-id="<?= $row->expense_type_id ?>"
                       data-name="<?= htmlspecialchars($row->sub_expense_type, ENT_QUOTES) ?>"
                       data-note="<?= htmlspecialchars($row->note, ENT_QUOTES) ?>">
                       <i class="fa fa-edit"></i>
                    </a>
                    <a href="javascript:void(0);" class="btn btn-sm delete-confirmation-modal btn-danger"
                       data-url="<?= base_url('admin/DailyExpense/delete_sub_expense_type/' . $row->id) ?>">
                       <i class="fa fa-trash"></i>
                    </a>
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
</div>
