<div class="d-flex justify-content-between align-items-center mb-3">
    <h4 class="mb-0"><?= lang('finance.session_history') ?></h4>
    <a href="/finance/cashier" class="btn btn-outline-secondary"><?= lang('common.back') ?></a>
</div>

<div class="card">
    <div class="card-body">
        <table id="sessions-table" class="table table-striped w-100"
               data-url="/finance/cashier/sessions/datatable"
               data-columns='[
                   {"data":"id","title":"#"},
                   {"data":"register_name","title":"<?= lang('finance.register') ?>"},
                   {"data":"operator_name","title":"<?= lang('finance.operator') ?>"},
                   {"data":"session_date","title":"<?= lang('finance.date') ?>"},
                   {"data":"opening_balance","title":"<?= lang('finance.opening') ?>"},
                   {"data":"closing_balance","title":"<?= lang('finance.closing') ?>"},
                   {"data":"variance","title":"<?= lang('finance.variance') ?>"},
                   {"data":"total_transactions","title":"<?= lang('finance.transactions') ?>"},
                   {"data":"status","title":"<?= lang('common.status') ?>"}
               ]'>
            <thead><tr><th>#</th><th>Register</th><th>Operator</th><th>Date</th><th>Opening</th><th>Closing</th><th>Variance</th><th>Trans.</th><th>Status</th></tr></thead>
        </table>
    </div>
</div>

<?php $__view->push('scripts'); ?>
<script>document.addEventListener('DOMContentLoaded', function() { DataTableHelper.init('sessions-table', {order:[[0,'desc']]}); });</script>
<?php $__view->endPush(); ?>