function upload_single_file_payment_edit($id = null)
 {
     $this->autoRender = false;
     if (!empty($this->request->data['UploadPayment']['file'])) {
         $this->uploadFilePaymentEdit($this->request->data['UploadPayment']['id']);
     }
     App::import("Model", "UploadPayment");
     $upload = new UploadPayment();
     $this->data['UploadPayment']['id'] = $id;
     if (!$upload->save($this->data)) {
         //			$this->Session->setFlash(__('The file could not be saved. Please, try again.'), 'default', array('class' => 'text-error'));
     }
     $this->redirect("http://{$_SERVER['SERVER_NAME']}{$this->webroot}quote_manager/quotes/detail/{$id}#payment-info");
 }
 function upload_single_file_payment($id)
 {
     if (!empty($this->request->data['UploadPayment']['file'])) {
         $this->uploadFilePayment();
     }
     App::import("Model", "UploadPayment");
     $upload = new UploadPayment();
     if (!$upload->save($this->data)) {
         $this->Session->setFlash(__('The file could not be saved. Please, try again.'), 'default', array('class' => 'text-error'));
     }
     //		else {
     //      $this->Session->setFlash(__('The file could not be saved. Please, try again.'), 'default', array('class' => 'text-error'));
     //    }
     $this->redirect("http://{$_SERVER['SERVER_NAME']}{$this->webroot}work_order_manager/work_orders/detail/{$id}#payment-info");
 }