<section class="panel">
    <header class="panel-heading clearfix panel-theame">
        <i class="fa fa-tasks"></i> UnShipped Report - <?php echo ($report_type==1)?' Distributor':' Category';?>
    </header>
    <div class="panel-body">
        <div id="div_master_report_leadlist">
            <ul class="clearfix form-ul material"> 
                <li class="col-sm-2">
                    <?php echo CHtml::dropdownList('unshipped_report_year',date('Y'),Order::getyear(),array('class' => '','data-label'=>'Unshipped Year'));?>
                </li>
                <li class="col-sm-2">
                    <?php echo CHtml::dropdownList('unshipped_report_month', '', Order::getmonths(),array('class' => '','data-label'=>'Unshipped Month'));?>
                </li>
                <li class="col-sm-2">
                    <?php echo CHtml::dropdownList('unshipped_ch_status', '', [0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4'],array('data-label' => 'Status',
                    'multiple' => 'multiple',// Enable multiselect
                    'class' => 'multiple', // Add Select2 class
                    'data-placeholder' => '-Select-', // Placeholder
                    'data-search' => true, // Placeholder
                    //'size' => 5, // Number of visible options in the box
                    ));?>
                </li>
            </ul>
        </div>
        <div class='btn-wrap text-center'> 
            <button onclick="excelunshipped(<?php echo $report_type;?>);return false;" class='plan-save-btn btn btn-theme' target="_blank"><i class="fa fa-file-excel-o"></i> &nbsp;Excel</button>
        </div>
        <div class="panel-body">
            <div style="display:none;" id="div_master_report_load_content">
            </div>
        </div>
    </div>
</section>
<?php $cs = Yii::app()->getClientScript(); 

//Excel done by jisha on 25-6-2025
$cs->registerScript("excelunshipped", "function excelunshipped(type){
    var us_year = $('#unshipped_report_year').val(); 
    var us_month = $('#unshipped_report_month').val();
    var ch_status = $('#unshipped_ch_status').val();
    if(type=='1'){
        window.open($('#liveSite').val()+'index.php?r=ordertakingreport/excelunshippedDistibuter&us_year='+us_year+'&us_month='+us_month+'&type='+type+'&ch_status='+ch_status+'', '_blank');
    }else{
       window.open($('#liveSite').val()+'index.php?r=ordertakingreport/excelunshippedCategory&us_year='+us_year+'&us_month='+us_month+'&type='+type+'&ch_status='+ch_status+'', '_blank'); 
    }
}", CClientScript::POS_HEAD);