<?php

$cs = Yii::app()->getClientScript();
$baseUrl = Yii::app()->baseUrl;
$cs = Yii::app()->getClientScript();


$cs->registerScript("loadDeliveryTracker", '
        $(document).ready(function() {
        var purchasing_order_id = $("#hid_purchasing_order_id").val();
        var table_id ="#tbl_delivery_tracker_notes_list";
        var table = $(table_id).DataTable({
             scrollY         : "250px",
             paging:false,
            ajax: {
                url: "' . Yii::app()->createUrl('purchasingorder/getdeliverytrackernoteslist') . '",
                type: "POST",
                data:{"purchasing_order_id":purchasing_order_id},
                cache : false,
            },
            serverSide:     true,
            fixedColumns:   true,
            processing: true,
            fixedHeader: {
                headerOffset: $("header.main").outerHeight()
            }
        } );
        $(".dataTables_scrollFoot").hide();

    });', CClientScript::POS_HEAD);


?>

<div class="row">

</div>

<div class="custom-data-table">
 <input type="hidden" name="hid_purchasing_order_id" id="hid_purchasing_order_id" value="<?php echo $purchasing_order_id;?>">
    <table class="table table-hover table-bordered personal-task" id="tbl_delivery_tracker_notes_list">

        <thead>
            <tr>
                <th>No.</th>
                <th>Item Name</th>
                <th>Expected Delivery Date</th>                            
                <th>Notes</th>
            </tr>

        </thead>
        <tfoot>
            <tr>
                <th>No.</th>
                <th>Item Name</th>
                <th>Expected Delivery Date</th>                            
                <th>Notes</th>
            </tr>
        </tfoot>
    </table>
</div>