<?php
class PrintListResumenAction extends wtActions
{
    public function execute() 
    {
        $o_GridItemResumenAction = new GridItemResumenAction();
        $o_GridAction = $o_GridItemResumenAction->runProcessGrid();
        $o_GridAction->setControlArray( false );
        $o_GridAction->initialize();
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        $this->a_ResultSelect = $o_GridAction->getResultSelect();
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        $this->export_excel = $this->getRequestParameter( 'export_excel' );
        if( $this->export_excel )
        {
            header( 'Content-Type: application/vnd.ms-excel' );
            header( 'Content-Disposition: attachment;filename="Productos_mas_vendidos_'.date( "Ymd" ).'.xls"' );
            header( 'Cache-Control: max-age=0' );
            
            ViewResponse::getInstance()->setMethodAjax();
        }
    }
}