示例#1
0
 public function exportOrderAction()
 {
     $this->_firstAction = $this->_defaultAction;
     $this->_exportCsv = false;
     $this->_tablesList = array();
     if ($this->_request->isPost()) {
         $OrderId = $this->_getParam('ID');
         $oOrder = new DemandeSoumissionObject();
         $data = array('DS_Status' => 'closed');
         $oOrder->save($OrderId, $data, 1);
         $relatedId = array('SP_DemandeSoumission' => $OrderId);
         $relatedId['SP_ProduitDemande'] = $OrderId;
         $relatedId['SP_ItemDemande'] = $OrderId;
         $oRequestedproduct = new ProduitDemandeObject();
         //Get requested products for this quote request
         $qryReqProd = $oRequestedproduct->getByDemandeId($OrderId);
         foreach ($qryReqProd as $data) {
             $relatedId['SP_Produit'][] = $data['PD_ProduitID'];
             $relatedId['SP_Piece'][] = $data['PD_ProduitID'];
         }
         $this->relatedId = $relatedId;
     }
     $this->addColumnsLabel = true;
     $this->_ftpTransfer = true;
     parent::toCsvAction();
     $this->render('to-csv');
 }