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

$cs->registerScript("loadOrderTakingReport", '
        $(document).ready(function() {

        var table_id ="#tbl_ordtaking_summary";
        var table = $(table_id).DataTable({
            scrollY         : "380px",
           // scrollX         : "true",
           // scrollCollapse  : true,
            pageLength      : 50,
			processing: true,
            ajax: {
                url: "' . Yii::app()->createUrl('ordertakingreport/GetList') . '",
                type: "POST",
                cache : false,
                "data": function ( params ) {
                    params.YII_CSRF_TOKEN = "'.Yii::app()->request->csrfToken.'";
                }
            },
            serverSide:     true,
            fixedColumns:   true,
			processing: true,
            fixedHeader: {
                headerOffset: $("header.main").outerHeight()
            }
        } );
        $(".dataTables_scrollFoot").hide();
    });', CClientScript::POS_HEAD);
    ?>
    <section class="panel">
        <header class="panel-heading clearfix panel-theame">
            <i class="fa fa-tasks"></i> Order Taking Summary Report
            <div class="pull-right">
                <?php  //if (isset(Yii::app()->user->havePermissionOn['master_invreport_add']) ||  Yii::app()->user->authorised_user == 1) {?>

                 <button class="btn btn-sm btn-theme" onclick="loadPopupModal('ordertakingreport/add','Add Order Taking Summary Report','lg')"><i class="fa fa-plus"></i> ADD</button> 
                <?php //} ?>
            </div>
        </header>
        <div class="panel-body">
            <div class="custom-data-table">
                <table class="table table-hover table-bordered personal-task" id="tbl_ordtaking_summary">
                    <thead>
                        <tr>
                            <th>Sl No</th>
                            <th>Month</th>
                            <th>Year</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
						    <th>Sl No</th>
                            <th>Month</th>
                            <th>Year</th>
                            <th>Actions</th>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </section>