add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ach_devi', 'devi'); $this->add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ach_cmde', 'cmde'); $this->add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ach_recept', 'recept'); $this->add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ach_livr', 'livr'); $this->add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ach_fact', 'fact'); $this->add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ach_fourn', 'fourn'); $this->add_tab('acquisition_menu_ach', 'ach', 'acquisition_menu_ref_budget', 'bud'); //Suggestions $this->add_tab('acquisition_menu_sug', 'sug', 'acquisition_menu_sug_multiple', 'multi'); $this->add_tab('acquisition_menu_sug', 'sug', 'acquisition_menu_sug_import', 'import'); $this->add_tab('acquisition_menu_sug', 'sug', 'acquisition_menu_sug_empr', 'empr_sug'); $this->add_tab('acquisition_menu_sug', 'sug', 'acquisition_menu_sug_todo'); //Locations if ($acquisition_rent_requests_activate) { $this->add_tab('acquisition_menu_rent', 'rent', 'acquisition_menu_rent_requests', 'requests'); if (SESSrights & ACQUISITION_ACCOUNT_INVOICE_AUTH) { $this->add_tab('acquisition_menu_rent', 'rent', 'acquisition_menu_rent_accounts', 'accounts'); $this->add_tab('acquisition_menu_rent', 'rent', 'acquisition_menu_rent_accounts_to_invoice', 'accounts', '&accounts_search_form_invoiced_filter=1&accounts_search_form_request_status=3'); $this->add_tab('acquisition_menu_rent', 'rent', 'acquisition_menu_rent_invoices', 'invoices'); $this->add_tab('acquisition_menu_rent', 'rent', 'acquisition_menu_rent_invoices_to_validate', 'invoices', '&invoices_search_form_status=1'); } } } protected function is_active_tab($label_code, $categ, $sub='') { global $accounts_search_form_invoiced_filter; global $invoices_search_form_status; $active = false; switch ($label_code) { case 'acquisition_menu_rent_accounts': if(($this->is_equal_var_get('categ', 'rent') && $this->is_equal_var_get('sub', 'accounts') && $accounts_search_form_invoiced_filter == "")) { $active = true; } break; case 'acquisition_menu_rent_accounts_to_invoice': if(($this->is_equal_var_get('categ', 'rent') && $this->is_equal_var_get('sub', 'accounts') && $accounts_search_form_invoiced_filter == "1")) { $active = true; } break; case 'acquisition_menu_rent_invoices': if(($this->is_equal_var_get('categ', 'rent') && $this->is_equal_var_get('sub', 'invoices') && $invoices_search_form_status == "")) { $active = true; } break; case 'acquisition_menu_rent_invoices_to_validate': if(($this->is_equal_var_get('categ', 'rent') && $this->is_equal_var_get('sub', 'invoices') && $invoices_search_form_status == "1")) { $active = true; } break; default: $active = parent::is_active_tab($label_code, $categ, $sub); break; } return $active; } }