<div class="d-flex justify-content-between align-items-center mb-3">
    <h5 class="mb-0"><?= lang('adv_finance.write_offs') ?></h5>
    <?php if(auth_can('installments.create')): ?><a href="/advanced-finance/write-offs/create" class="btn btn-primary btn-sm"><i class="fas fa-plus me-1"></i><?= lang('adv_finance.create_write_off') ?></a><?php endif; ?>
</div>
<div class="card"><div class="card-body">
    <table id="wo-table" class="table table-striped w-100" data-url="/advanced-finance/write-offs/datatable"
           data-columns='[{"data":"write_off_number","title":"WO #"},{"data":"member_name","title":"Member"},{"data":"invoice_number","title":"Invoice"},{"data":"amount","title":"Amount"},{"data":"status_badge","title":"Status","orderable":false},{"data":"id","title":"Actions","orderable":false,"searchable":false}]'>
        <thead><tr><th>WO #</th><th>Member</th><th>Invoice</th><th>Amount</th><th>Status</th><th>Actions</th></tr></thead>
    </table>
</div></div>
<?php $__view->push('scripts') ?><script>document.addEventListener('DOMContentLoaded',function(){DataTableHelper.init('wo-table',{columnDefs:[{targets:-1,render:function(d){return '<a href="/advanced-finance/write-offs/'+d+'" class="btn btn-sm btn-outline-primary"><i class="fas fa-eye"></i></a>';}}]});});</script><?php $__view->endPush() ?>