<div class="d-flex justify-content-between align-items-center mb-3">
    <h5 class="mb-0"><?= lang('adv_finance.refunds') ?></h5>
    <?php if(auth_can('refunds.create')): ?><a href="/advanced-finance/refunds/create" class="btn btn-primary btn-sm"><i class="fas fa-plus me-1"></i><?= lang('adv_finance.create_refund') ?></a><?php endif; ?>
</div>
<div class="card mb-3"><div class="card-body"><div class="row g-2" data-filter-table="refund-table"><div class="col-md-3"><select name="status_filter" class="form-select form-select-sm" onchange="DataTableHelper.reload('refund-table')"><option value="">All</option><option value="pending">Pending</option><option value="approved">Approved</option><option value="processed">Processed</option><option value="rejected">Rejected</option></select></div></div></div></div>
<div class="card"><div class="card-body">
    <table id="refund-table" class="table table-striped w-100" data-url="/advanced-finance/refunds/datatable"
           data-columns='[{"data":"refund_number","title":"Refund #"},{"data":"member_name","title":"Member"},{"data":"refund_amount","title":"Amount"},{"data":"refund_date","title":"Date"},{"data":"method_name","title":"Method"},{"data":"status_badge","title":"Status","orderable":false},{"data":"id","title":"Actions","orderable":false,"searchable":false}]'>
        <thead><tr><th>Refund #</th><th>Member</th><th>Amount</th><th>Date</th><th>Method</th><th>Status</th><th>Actions</th></tr></thead>
    </table>
</div></div>
<?php $__view->push('scripts') ?><script>document.addEventListener('DOMContentLoaded',function(){DataTableHelper.init('refund-table',{columnDefs:[{targets:-1,render:function(d){return '<a href="/advanced-finance/refunds/'+d+'" class="btn btn-sm btn-outline-primary"><i class="fas fa-eye"></i></a>';}}]});});</script><?php $__view->endPush() ?>