 <section class="panel">
    <header class="panel-heading">
        BANK NEGOTIATION
    </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::textField('from_date','',array('class' => 'datepicker','data-label'=>'DA From'));?>
                    </li>
                    <li class="col-sm-2">
                        <?php echo CHtml::textField('to_date', '',array('class' => 'datepicker','data-label'=>'DA To'));?>
                    </li>
                </ul>
        </div>
        <div class='btn-wrap text-center'> 
            <button onclick="excel();return false;" class='plan-save-btn btn btn-theme' target="_blank"><i class="fa fa-download"></i> Excel</button>
        </div>
    </div>
</section>


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

$cs->registerScript("excel", "function excel(){
        
       
        var from_date = $('#from_date').val(); 
        var to_date = $('#to_date').val();
        
        window.open($('#liveSite').val()+'index.php?r=reports/bank_negotiation_excel&from_date='+from_date+'&to_date='+to_date, '_blank');
}", CClientScript::POS_HEAD);
