public function print_skid_label($skid_no = null) { $this->layoutOpt['layout'] = 'print_skid_label'; App::import('Model', 'ContainerManager.ContainerSkid'); $ContainerSkid_Model = new ContainerSkid(); $data = $ContainerSkid_Model->find('first', array('conditions' => array('ContainerSkid.skid_no' => $skid_no))); $wo = explode(',', $data['ContainerSkid']['work_order_id']); $this->set(compact('data', 'skid_no', 'wo')); }
/** * view method * * @param string $id * @return void */ public function detail($id = null, $modal = null) { $this->layoutOpt['left_nav_selected'] = "view_quote"; $this->Quote->recursive = 3; $this->Quote->id = $id; if (!$this->Quote->exists()) { throw new NotFoundException(__('Invalid quote')); } $quote = $this->Quote->read(null, $id); if (!is_null($quote['Quote']['vid'])) { // redirect to parent quote $this->redirect(array($quote['Quote']['vid'], $modal)); } App::import('Model', 'QuoteManager.QuoteStatus'); $quoteStatusModel = new QuoteStatus(); $quote_status = $quoteStatusModel->find('all', array('conditions' => array('QuoteStatus.quote_id' => $id))); //debug($quote_status); App::import("Model", "Upload"); $upload_model = new Upload(); $uploads = $upload_model->find('all', array('conditions' => array('Upload.ref_id' => $id, 'Upload.ref_model' => 'quotes'), 'order' => array('Upload.title' => 'ASC'))); App::import("Model", "UploadPayment"); $upload_payment_model = new UploadPayment(); $upload_payment = $upload_payment_model->find('all', array('conditions' => array('UploadPayment.ref_id' => $id, 'UploadPayment.ref_model' => 'quotes'), 'order' => array('UploadPayment.payment_date' => 'ASC'))); App::import("Model", "PurchaseOrderManager.GeneralSetting"); $generalsetting_model = new GeneralSetting(); $deposit_amount = $generalsetting_model->find("first", array("conditions" => array("GeneralSetting.type" => 'deposit_payment'))); App::import("Model", "ContainerManager.ContainerSkid"); $containerskid_model = new ContainerSkid(); $container = $containerskid_model->find("first", array("conditions" => array("ContainerSkid.skid_no" => $quote['Quote']['skid_number']))); $user_id = $this->loginUser['id']; $this->set(compact('quote', 'user_id', 'modal', 'quote_status', 'uploads', 'upload_payment', 'deposit_amount', 'container')); }