public function pdf_door_manufacturing_list($id = null)
 {
     $this->layoutOpt['layout'] = 'pdf_report';
     $this->Quote->id = $id;
     if (!$this->Quote->exists()) {
         throw new NotFoundException(__('Invalid quote'));
     }
     $quote = $this->Quote->read(null, $id);
     $user_id = $this->loginUser['id'];
     $bar_code_number = $quote['WorkOrder']['work_order_number'] . "00777";
     App::import('Model', 'QuoteManager.QuoteStatus');
     $quoteStatusModel = new QuoteStatus();
     $quote_status = $quoteStatusModel->find('all', array('conditions' => array('QuoteStatus.quote_id' => $id)));
     $reportTitle = "Door Manufacturing List";
     $reportDate = time();
     $this->set(compact('quote', 'section', 'user_id', 'quote_status', 'reportTitle', 'reportDate', 'bar_code_number'));
     //$content = $this->render("/Elements/Detail/Quote/pdf_door_manufacturing_list");
     require_once APP . 'Vendor' . DS . 'html2pdf' . DS . 'html2pdf.class.php';
     header('Content-type: application/pdf');
     $html2pdf = new HTML2PDF('P', 'A4', 'en');
     $content = $this->render("/Elements/Detail/Quote/pdf_door_manufacturing_list");
     $html2pdf->pdf->SetDisplayMode('fullpage');
     $html2pdf->writeHTML($content);
     $pdfFileName = "door_manufacturing" . ".pdf";
     $html2pdf->Output($pdfFileName, "D");
     exit;
 }
 function getQuoteStatusForCornJob($id = null)
 {
     App::import('Model', 'QuoteManager.QuoteStatus');
     $QuoteStatus_Model = new QuoteStatus();
     $quote_status = $QuoteStatus_Model->find('all', array('conditions' => array('QuoteStatus.quote_id' => $id)));
     return $quote_status;
 }