<div class="d-flex justify-content-between align-items-center mb-3">
    <h5 class="mb-0"><?= lang('adv_finance.bank_accounts') ?></h5>
    <?php if(auth_can('gl.manage')): ?><a href="/advanced-finance/bank-accounts/create" class="btn btn-primary btn-sm"><i class="fas fa-plus me-1"></i><?= lang('common.create') ?></a><?php endif; ?>
</div>
<div class="card"><div class="card-body">
    <table id="ba-table" class="table table-striped w-100" data-url="/advanced-finance/bank-accounts/datatable"
           data-columns='[{"data":"account_code","title":"Code"},{"data":"bank_name","title":"Bank"},{"data":"account_number","title":"Acct #"},{"data":"iban","title":"IBAN"},{"data":"account_type","title":"Type"},{"data":"current_balance","title":"Balance"},{"data":"is_active","title":"Status","orderable":false},{"data":"id","title":"Actions","orderable":false,"searchable":false}]'>
        <thead><tr><th>Code</th><th>Bank</th><th>Acct #</th><th>IBAN</th><th>Type</th><th>Balance</th><th>Status</th><th>Actions</th></tr></thead>
    </table>
</div></div>
<?php $__view->push('scripts') ?><script>document.addEventListener('DOMContentLoaded',function(){DataTableHelper.init('ba-table',{columnDefs:[{targets:-1,render:function(d){return '<a href="/advanced-finance/bank-accounts/'+d+'/edit" class="btn btn-sm btn-outline-warning"><i class="fas fa-edit"></i></a>';}}]});});</script><?php $__view->endPush() ?>