Beispiel #1
0
 public function display($tpl = null)
 {
     $context = 'quotation_id';
     $quotationHelper = new quotationHelper();
     $uri = JFactory::getURI();
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDSHOP_quotation'));
     $model = $this->getModel('quotation');
     JToolBarHelper::title(JText::_('COM_REDSHOP_QUOTATION_MANAGEMENT'), 'redshop_quotation48');
     JToolBarHelper::addNewX();
     JToolBarHelper::editListX();
     JToolBarHelper::deleteList();
     $filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'quotation_cdate');
     $filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', 'DESC');
     $filter_status = $app->getUserStateFromRequest($context . 'filter_status', 'filter_status', 0);
     $lists['order'] = $filter_order;
     $lists['order_Dir'] = $filter_order_Dir;
     $quotation = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $optionsection = $quotationHelper->getQuotationStatusList();
     $lists['filter_status'] = JHTML::_('select.genericlist', $optionsection, 'filter_status', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $filter_status);
     $this->lists = $lists;
     $this->quotation = $quotation;
     $this->pagination = $pagination;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }
Beispiel #2
0
 public function display($tpl = null)
 {
     $quotationHelper = new quotationHelper();
     $option = JRequest::getVar('option');
     $layout = JRequest::getVar('layout', 'default');
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDSHOP_QUOTATION'));
     $document->addScript(JURI::base() . 'components/' . $option . '/assets/js/order.js');
     $document->addScript(JURI::base() . 'components/' . $option . '/assets/js/common.js');
     $document->addStyleSheet(JURI::base() . 'components/' . $option . '/assets/css/search.css');
     $document->addScript(JURI::base() . 'components/' . $option . '/assets/js/search.js');
     $document->addScript(JURI::base() . 'components/' . $option . '/assets/js/json.js');
     $uri = JFactory::getURI();
     $lists = array();
     $model = $this->getModel();
     if ($layout != 'default') {
         $this->setLayout($layout);
     }
     $detail = $this->get('data');
     $redconfig = new Redconfiguration();
     $isNew = $detail->quotation_id < 1;
     $userarr = $this->get('userdata');
     $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT');
     JToolBarHelper::title(JText::_('COM_REDSHOP_QUOTATION_DETAIL') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_quotation48');
     JToolBarHelper::save();
     JToolBarHelper::custom('send', 'send.png', 'send.png', JText::_('COM_REDSHOP_SEND'), false);
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
     }
     $status = $quotationHelper->getQuotationStatusList();
     $lists['quotation_status'] = JHTML::_('select.genericlist', $status, 'quotation_status', 'class="inputbox" size="1" ', 'value', 'text', $detail->quotation_status);
     $this->lists = $lists;
     $this->quotation = $detail;
     $this->quotationuser = $userarr;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }