<?php
$cs = Yii::app()->getClientScript();
$settlementId = Yii::app()->request->getParam('id');
?>

<script>
$(document).ready(function () {

    $('#tbl_expense_details').DataTable({
        scrollY: '400px',
        scrollX: true,
        scrollCollapse: true,
        paging: true,
        pageLength: 50,
        processing: true,
        serverSide: true,
        autoWidth: false,
        responsive: false,

        ajax: {
            url: '<?php echo Yii::app()->createUrl("expensesettlement/expenseList"); ?>',
            type: 'POST',
            data: function (d) {
                d.id = '<?php echo $settlementId; ?>'; 
            }
        },
        columnDefs: [
            { className: "text-right", targets: [5] } 
        ],

        columns: [
            { data: 0, orderable: false },
            { data: 1 },                   
            { data: 2 },                  
            { data: 3 },              
            { data: 4 } , 
            { data: 5 },
             // { data:6 }                 
        ]
    });

});
</script>

<section class='panel'>
    <header class='panel-heading'>
        <i class='fa fa-list'></i> Expense Details
    </header>

    <div class='panel-body'>
        <table class='table table-bordered' id='tbl_expense_details'>
            <thead>
                <tr>
                    <th>No</th>
                    <th>Expense Date</th>
                    <th>Expense Type</th>
                     <th>Description</th>
                     <th>Account Number</th>
                    <th>Amount</th>
                   <!--  <th>Created By</th> -->
                </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
</section>
