コード例 #1
0
 public function initPageHeaderToolbar()
 {
     parent::initPageHeaderToolbar();
     if ($this->display == '') {
         $this->page_header_toolbar_btn['update-selection'] = array('href' => 'javascript:void(0)', 'desc' => $this->l('Multiple change of status'), 'class' => 'process-icon-duplicate');
         $this->page_header_toolbar_btn['expedition' . ($this->controller_status == STATUS3 ? '' : '-bl') . ''] = array('href' => 'javascript:void(0)', 'js' => $this->controller_status == STATUS3 ? '' : 'jAlert(\'' . $this->l('To use this feature, switch to the PRO offer.') . '\')', 'desc' => $this->l('Shipment'), 'class' => 'icon-AdminParentShipping');
         $this->page_header_toolbar_btn['print_invoices_delivery'] = array('href' => '#', 'desc' => $this->l('Print documents'), 'class' => 'process-icon-preview');
         $this->page_header_toolbar_btn['new'] = array('href' => 'index.php?controller=AdminOrders&add' . $this->table . '&token=' . Tools::getAdminToken('AdminOrders' . (int) Tab::getIdFromClassName('AdminOrders') . (int) $this->context->employee->id), 'desc' => $this->l('Add new'), 'target' => '_blank');
     }
 }
コード例 #2
0
 public function initPageHeaderToolbar()
 {
     if ($this->display == 'details') {
         $this->page_header_toolbar_btn['back_to_index'] = array('href' => Context::getContext()->link->getAdminLink('AdminAdvancedSupplyOrder'), 'desc' => $this->l('Back to list'), 'icon' => 'process-icon-back');
     } elseif ($this->display == 'update_receipt') {
         $this->page_header_toolbar_btn['back_to_index'] = array('href' => Context::getContext()->link->getAdminLink('AdminAdvancedSupplyOrder'), 'desc' => $this->l('Back to list'), 'icon' => 'process-icon-back');
     }
     if ($this->display == 'update_receipt') {
         $this->page_header_toolbar_btn['save'] = array('short' => $this->l('Export history'), 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&export_history&id_supply_order=' . Tools::getValue('id_supply_order'), 'desc' => html_entity_decode($this->l('Export history')));
     } elseif (empty($this->display)) {
         if ($this->controller_status && !$this->is_template_list) {
             /*$this->page_header_toolbar_btn['duplicate'] = array(
             		'short' => $this->l('Billing with several orders'),
             		'href' => 'javascript:void(0)',
             		'desc' => $this->l('Billing with several orders'));*/
             if ($this->controller_status == STATUS3) {
                 $this->page_header_toolbar_btn['refresh'] = array('short' => $this->l('Generate Supply Orders'), 'href' => $this->context->link->getAdminLink('AdminGenerateSupplyOrders'), 'desc' => html_entity_decode($this->l('Generate Supply Orders')));
             } else {
                 $text = addslashes($this->l('To use this feature, switch to the PRO offer'));
                 $this->page_header_toolbar_btn['refresh'] = array('short' => $this->l('Generate Supply Orders'), 'js' => 'cancelBubble(event, \'' . $text . '\');', 'href' => '#', 'desc' => html_entity_decode($this->l('Generate Supply Orders')));
             }
             $this->page_header_toolbar_btn['save'] = array('short' => $this->l('Export orders'), 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&csv_orders&id_warehouse=' . $this->getCurrentWarehouse() . '&id_supplier=' . $this->getCurrentSupplier(), 'desc' => html_entity_decode($this->l('Export orders')));
             $this->page_header_toolbar_btn['save-and-stay'] = array('short' => $this->l('Export orders details'), 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&csv_orders_details&id_warehouse=' . $this->getCurrentWarehouse() . '&id_supplier=' . $this->getCurrentSupplier(), 'desc' => html_entity_decode($this->l('Export orders details')));
         }
         if ($this->controller_status == STATUS1 && $this->nbcmdfou > ERP_CMFOFR) {
             $text = addslashes($this->l('Only 1 order is allowed in the free version. Switch to a higher version to eliminate this limit.'));
             $this->page_header_toolbar_btn['new_supply_order'] = array('js' => 'cancelBubble(event, \'' . $text . '\');', 'desc' => html_entity_decode($this->l('Add a new supply order')), 'href' => '#', 'icon' => 'process-icon-new');
         } else {
             $this->page_header_toolbar_btn['new_supply_order'] = array('href' => self::$currentIndex . '&addsupply_order&token=' . $this->token, 'desc' => html_entity_decode($this->l('Add a new supply order')), 'icon' => 'process-icon-new');
         }
         $this->page_header_toolbar_btn['new_supply_order_template'] = array('href' => self::$currentIndex . '&addsupply_order&mod=template&token=' . $this->token, 'desc' => html_entity_decode($this->l('Add a new supply order template')), 'icon' => 'process-icon-new');
     }
     if ($this->is_1_6) {
         parent::initPageHeaderToolbar();
     }
 }
コード例 #3
0
 public function initPageHeaderToolbar()
 {
     if (empty($this->display)) {
         $this->page_header_toolbar_btn['new_supplier'] = array('href' => self::$currentIndex . '&addsupplier&token=' . $this->token, 'desc' => $this->l('Add a new supplier'), 'icon' => 'process-icon-new');
     }
     $this->page_header_toolbar_btn['save'] = array('href' => self::$currentIndex . '&export_csv&token=' . $this->token, 'desc' => $this->l('Export suppliers'), 'icon' => 'process-icon-save');
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if ($this->is_1_6) {
         parent::initPageHeaderToolbar();
     }
     if ($this->display == '') {
         $this->page_header_toolbar_btn['simulate'] = array('href' => 'javascript:void(0)', 'desc' => $this->l('Simulate'), 'class' => 'process-icon-preview');
     }
     if ($this->display == 'simulate') {
         $this->page_header_toolbar_btn['generate-supply-orders'] = array('href' => 'javascript:void(0)', 'desc' => $this->l('Generate'), 'class' => 'process-icon-refresh-index');
     }
     if ($this->display == 'simulate' || $this->display == 'ordering') {
         $this->page_header_toolbar_btn['back'] = array('href' => $this->context->link->getAdminLink('AdminGenerateSupplyOrders'), 'desc' => $this->l('Return to orders list'));
     }
 }
コード例 #5
0
 public function initPageHeaderToolbar()
 {
     parent::initPageHeaderToolbar();
     if ($this->display != 'add' && $this->display != 'edit') {
         $url_add_zone = self::$currentIndex . '&';
         $url_add_zone .= 'add' . $this->table . '&';
         $url_add_zone .= 'token=' . $this->token . '&';
         $url_add_zone .= 'id_parent=' . Tools::getValue('id_erpip_zone') . '&';
         $url_add_zone .= 'id_warehouse=' . Tools::getValue('id_warehouse') . '&';
         $url_add_zone .= 'warehouse_name=' . Tools::getValue('warehouse_name') . '&';
         $url_add_zone .= 'zone_name=' . Tools::getValue('zone_name') . '&';
         $url_add_zone .= 'display=add';
         $this->page_header_toolbar_btn['new'] = array('href' => $url_add_zone, 'desc' => $this->l('Add new'));
         $this->page_header_toolbar_btn['save'] = array('href' => self::$currentIndex . '&add' . $this->table . '&token=' . $this->token . '&export_csv', 'desc' => $this->l('Export'));
     }
     if (!empty($this->display) || Tools::isSubmit('id_erpip_zone')) {
         $this->page_header_toolbar_btn['back_to_list'] = array('href' => self::$currentIndex . '&token=' . $this->token, 'desc' => $this->l('Back'), 'icon' => 'process-icon-back');
     }
 }
コード例 #6
0
 public function initPageHeaderToolbar()
 {
     if ($this->is_1_6) {
         parent::initPageHeaderToolbar();
     }
     $link = $this->context_link->getAdminLink('AdminAdvancedStock') . '&export_csv';
     $link .= Tools::isSubmit('id_warehouse') && Tools::getValue('id_warehouse') != -1 ? '&id_warehouse=' . (int) Tools::getValue('id_warehouse') : '';
     $link .= Tools::isSubmit('id_category') && Tools::getValue('id_category') != -1 ? '&id_category=' . (int) Tools::getValue('id_category') : '';
     $link .= Tools::isSubmit('id_supplier') && Tools::getValue('id_supplier') != -1 ? '&id_supplier=' . (int) Tools::getValue('id_supplier') : '';
     $link .= Tools::isSubmit('id_manufacturer') && Tools::getValue('id_manufacturer') != -1 ? '&id_manufacturer=' . (int) Tools::getValue('id_manufacturer') : '';
     $link .= Tools::isSubmit('area') && Tools::getValue('area') != -1 ? '&area=' . Tools::getValue('area') : '';
     $link .= Tools::isSubmit('subarea') && Tools::getValue('subarea') != -1 ? '&subarea=' . Tools::getValue('subarea') : '';
     $link .= Tools::isSubmit('moreless') && Tools::getValue('moreless') != -1 ? '&moreless=' . Tools::getValue('moreless') : '';
     $link .= Tools::isSubmit('quantity_filter') && Tools::getValue('quantity_filter') != -1 ? '&quantity_filter=' . (int) Tools::getValue('quantity_filter') : '';
     $test = $this->context_link->getAdminLink('AdminAdvancedStock') . '&export_catalog';
     $test .= Tools::isSubmit('id_warehouse') && Tools::getValue('id_warehouse') != -1 ? '&id_warehouse=' . Tools::getValue('id_warehouse') : '';
     // Export catalogue
     $this->page_header_toolbar_btn['import'] = array('short' => 'Export current catalog', 'href' => $test, 'desc' => $this->l('Export current catalog'));
     // Export CSV
     $this->page_header_toolbar_btn['stats'] = array('short' => 'Export current stock', 'href' => $link, 'desc' => $this->l('Export current stock'));
     if ($this->controller_status == STATUS1) {
         $text = addslashes($this->l('Proceed to superior offer to use this feature.'));
         if ($this->controller_status) {
             // Creation of a stock image
             $this->page_header_toolbar_btn['save-and-stay'] = array('short' => 'New stock image', 'js' => 'cancelBubble(event, \'' . $text . '\');', 'href' => '#', 'desc' => $this->l('Make a new stock image'));
         }
         // Update Areas
         if ($this->advanced_stock_management) {
             $this->page_header_toolbar_btn['update'] = array('short' => 'Update Areas', 'href' => '#', 'js' => 'cancelBubble(event, \'' . $text . '\');', 'desc' => $this->l('Update Location'));
         }
     } else {
         if ($this->controller_status) {
             // Creation of a stock image
             $this->page_header_toolbar_btn['save-and-stay'] = array('short' => 'New stock image', 'href' => '#', 'desc' => $this->l('Make a new stock image'));
         }
         // Update Areas
         if ($this->advanced_stock_management) {
             $this->page_header_toolbar_btn['update'] = array('short' => 'Update Areas', 'href' => '#', 'desc' => $this->l('Update Location'));
         }
     }
     $var_assign = array();
     if ($this->is_1_6) {
         $var_assign = array('show_page_header_toolbar' => $this->show_page_header_toolbar);
     }
     $var_assign = array_merge($var_assign, array('page_header_toolbar_title' => '1 Click ERP illicoPresta', 'page_header_toolbar_btn' => $this->page_header_toolbar_btn));
     $this->context->smarty->assign($var_assign);
 }
コード例 #7
0
 public function initPageHeaderToolbar()
 {
     parent::initPageHeaderToolbar();
     $token = Tools::getAdminToken('AdminInventory' . (int) Tab::getIdFromClassName('AdminInventory') . (int) $this->context->employee->id);
     $back = 'index.php?controller=AdminInventory&token=' . $token;
     $this->toolbar_btn['back'] = array('href' => $back, 'desc' => $this->l('Back to inventory'));
     $this->page_header_toolbar_btn['save'] = array('short' => $this->l('Export report'), 'href' => $this->context->link->getAdminLink('AdminStockGap') . '&export_csv&id_container=' . $this->id_container, 'desc' => $this->l('Export report'));
 }
コード例 #8
0
 public function initPageHeaderToolbar()
 {
     // build export link grid PDF: get filters
     $link = Tools::isSubmit('id_warehouse') && Tools::getValue('id_warehouse') != -1 ? '&id_warehouse=' . Tools::getValue('id_warehouse') : '';
     $link .= Tools::isSubmit('id_category') && Tools::getValue('id_category') != -1 ? '&id_category=' . Tools::getValue('id_category') : '';
     $link .= Tools::isSubmit('id_supplier') && Tools::getValue('id_supplier') != -1 ? '&id_supplier=' . Tools::getValue('id_supplier') : '';
     $link .= Tools::isSubmit('id_manufacturer') && Tools::getValue('id_manufacturer') != -1 ? '&id_manufacturer=' . Tools::getValue('id_manufacturer') : '';
     $link .= Tools::isSubmit('areaFilter') && Tools::getValue('areaFilter') != -1 ? '&area=' . Tools::getValue('areaFilter') : '';
     $link .= Tools::isSubmit('subareaFilter') && Tools::getValue('subareaFilter') != -1 ? '&subarea=' . Tools::getValue('subareaFilter') : '';
     parent::initPageHeaderToolbar();
     // stocks gap
     if ($this->controller_status) {
         $this->page_header_toolbar_btn['stats'] = array('short' => $this->l('Display the stock gap'), 'href' => $this->context->link->getAdminLink('AdminStockGap'), 'desc' => $this->l('Reports'));
     }
     // Export PDF grid
     $this->page_header_toolbar_btn['preview'] = array('short' => $this->l('Print the simple inventory grid'), 'href' => $this->context->link->getAdminLink('AdminInventory') . '&submitAction=generateInventoryPDF&advanced=false' . $link, 'target' => 'blank', 'desc' => $this->l('Export simple grid'));
     if ($this->controller_status) {
         if ($this->controller_status == STATUS3) {
             // Apply mass quantity
             $this->page_header_toolbar_btn['duplicate'] = array('short' => $this->l('Apply the same quantity as the physical quantity'), 'href' => 'javascript:void(0)', 'desc' => $this->l('Copy quantities'));
             // EXPORT CSV
             $this->page_header_toolbar_btn['download'] = array('short' => $this->l('Export CSV file'), 'href' => $this->context->link->getAdminLink('AdminInventory') . '&export_csv' . $link, 'desc' => $this->l('Offline inventory (CSV file)'));
             // IMPORT CSV
             $this->page_header_toolbar_btn['save-and-stay'] = array('short' => $this->l('New inventory with file'), 'href' => 'javascript:void(0)', 'desc' => $this->l('Import CSV file'));
             // export grid pdf only if display area / sub area
             if ($this->getCurrentValue('id_display') == '1') {
                 $this->page_header_toolbar_btn['save-calendar'] = array('short' => $this->l('Print the advanced inventory grid'), 'href' => 'javascript:jAlert("' . $this->l('This functionnality would be released soon.') . '");', 'target' => 'blank', 'desc' => $this->l('Export advanced grid'));
             }
         } else {
             $text = addslashes($this->l('To use this functionnality switch to PRO Version.'));
             // Apply mass quantity
             $this->page_header_toolbar_btn['duplicate'] = array('short' => $this->l('Apply the same quantity as the physical quantity'), 'js' => 'cancelBubble(event, \'' . $text . '\');', 'desc' => $this->l('Copy quantities'));
             // EXPORT CSV
             $this->page_header_toolbar_btn['download'] = array('short' => $this->l('Export CSV file'), 'js' => 'cancelBubble(event, \'' . $text . '\');', 'desc' => $this->l('Offline inventory (CSV file)'));
             // IMPORT CSV
             $this->page_header_toolbar_btn['save-and-stay'] = array('short' => $this->l('New inventory with file'), 'js' => 'cancelBubble(event, \'' . $text . '\');', 'desc' => $this->l('Import CSV file'));
             // export grid pdf only if display area / sub area
             if ($this->getCurrentValue('id_display') == '1') {
                 $this->page_header_toolbar_btn['save-calendar'] = array('short' => $this->l('Print the advanced inventory grid'), 'href' => 'javascript:jAlert("' . $this->l('This functionnality would be released soon.') . '");', 'desc' => $this->l('Export advanced grid'));
             }
         }
     }
     // Select inventory container and record
     $this->page_header_toolbar_btn['save'] = array('short' => $this->l('New inventory'), 'href' => 'javascript:void(0)', 'desc' => $this->l('Save'));
 }