<?php
$cs = Yii::app()->getClientScript();
$baseUrl = Yii::app()->baseUrl;
    
  ?>
  <script>
     $(document).ready(function() {
         var table_id ="#tbl_tracking_history";
         var table = $(table_id).on("preXhr.dt", function (e, settings, data) {
             return data;
         }).DataTable({
             scrollY         : "645px",
             pageLength      : 50,
             processing: true,
             order: [[ 3, "desc" ]],
             columns: [
                       {className: ""},
                       {className: ""}, 
                       {className: ""},        
                       {className: ""},      
                   ],
                   rowCallback: function ( row, data ){ 
                       
                   },
       	
             ajax: {
                 url: "<?php  echo Yii::app()->createUrl('Purchasingorder/GetTrackingHistory') ?>",
                 type: "POST",
                 cache : false,
                 data:{"po_id":<?php echo $model->purchasing_order_id;?>},
             },
             serverSide:     true,
             fixedColumns:   true,
             processing: true,
		 	  "fnCreatedRow"  : function( nRow, aData, iDataIndex ){
         		$(nRow).addClass("context-menu");
     		},
     });
    
          
           
  		
     });
        </script>
    <section class="panel">
        <header class="panel-heading clearfix panel-theame">
            <i class="material-icons">list</i> Shipment History
            <div class="pull-right">
            </div>
        </header>
        <div class="panel-body">
            <div class="custom-data-table">
                <table class="table table-hover table-bordered personal-task" id="tbl_tracking_history">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>User</th>
                            <th>Date/time</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </section>
