setMimeEncoding('application/pdf'); $date = gmdate('D, d M Y H:i:s',time()).' GMT'; $document->setModifiedDate($date); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); $modelSettings =& $this->getModel('settings'); //$batchIds = JRequest::getVar('batchIds',array()); $orderIds = JRequest::getVar('orderIds',array()); $modelShippingBatchs =& $this->getModel('shippingbatchs'); $modelShippingBatchs->setModeListing(true); $batchesListing =& $modelShippingBatchs->getData(); //if ($this->_layout == 'labels') //$batches =& $modelShippingBatchs->getExpeditionLabelsData($batchIds); $modelManufacturingOrders =& $this->getModel('manufacturingorders'); $abbs =& $modelManufacturingOrders->getMaterials(); $orders =& $modelManufacturingOrders->getManufacturingLabelsData($orderIds); $pdf = new ExpeditionPDF(); $modelSettings =& $this->getModel('settings'); $this->assignRef('settings',$modelSettings); $this->loadHelper('manulabelhelper'); $manuLabelHelper = new ManuLabelHelper(); $manuLabelHelper->generate($pdf,$orders,$abbs); $todayDate = JRequest::getVar('todayDate'); $pdf->generateListing($batchesListing,$todayDate); $dateNow = new JDate(); $dateNow->setOffset(date('Z')/3600.0); $fechaS = $dateNow->toFormat('%Y%m%d_%H%M%S'); $dir = $_SERVER['DOCUMENT_ROOT'] . '/components/com_vxc/labels/'; @mkdir($dir,0777,true); $filename = 'expLabels'.$fechaS.'.pdf'; $this->assignRef('filename',$filename); $this->assignRef('pdf',$pdf); parent::display($tpl); }// function }// class ?>