<section class="panel">

    <header class="panel-heading">

        Distributorwise Order Report

    </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('from_year',date('Y'),Order::getyear(),array('class' => '','data-label'=>'From Year'));?>

                    </li>

                    <li class="col-sm-2">

                        <?php echo CHtml::dropdownList('from_month', '', Order::getmonths(),array('class' => '','data-label'=>'From Month'));?>

                    </li>

                    <li class="col-sm-2">

                        <?php echo CHtml::dropdownList('to_year',date('Y'),Order::getyear(),array('class' => '','data-label'=>'To Year'));?>

                    </li>

                    <li class="col-sm-2">

                        <?php echo CHtml::dropdownList('to_month', '', Order::getmonths(),array('class' => '','data-label'=>'To Month'));?>

                    </li>

                </ul>

        </div>

        <div class='btn-wrap text-center'> 

            <!--<button onclick="load_html(1);return false;" class='btn btn-theme' target="_blank"><i class="fa fa-list"></i> Html</button>-->

             <button onclick="excelmonthwisereport();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(); 



$cs->registerScript("excelmonthwisereport", "function excelmonthwisereport(){



            var from_year = $('#from_year').val();

            var from_month = $('#from_month').val();

            var to_year = $('#to_year').val();

            var to_month = $('#to_month').val();



         

    window.open($('#liveSite').val()+'index.php?r=reports/monthwisereportexcel&from_year='+from_year+'&from_month='+from_month+'&to_year='+to_year+'&to_month='+to_month, '_blank');



}", CClientScript::POS_HEAD);