diff --git a/apps/maarch_entreprise/indexing_searching/details.php b/apps/maarch_entreprise/indexing_searching/details.php
index ba1e1999a419c09d9de31085a6d9950c5bfcd813..ea62b686f75a61a47b36983d3011ccf7720bc6ad 100755
--- a/apps/maarch_entreprise/indexing_searching/details.php
+++ b/apps/maarch_entreprise/indexing_searching/details.php
@@ -74,16 +74,8 @@ $_SESSION['collection_id_choice'] = $coll_id;
 $_SESSION['current_basket']['coll_id'] = $coll_id;
 $idCourrier = $_GET['id'];
 
-//test service print_details
 $printDetails = false;
-if ($core->test_service('print_details', 'apps', false)) {
-    $printDetails = true;
-}
-//test service put_in_validation
 $putInValid = false;
-if ($core->test_service('put_in_validation', 'apps', false)) {
-    $putInValid = true;
-}
 //test service view technical infos
 $viewTechnicalInfos = false;
 if ($core->test_service('view_technical_infos', 'apps', false)) {
@@ -546,9 +538,6 @@ if ($stmt->rowCount() == 0) {
         <?php
         //TOOLBAR
         $toolBar = '';
-    if ($printDetails) {
-        $toolBar .= '<input type="button" class="button" name="print_details" id="print_details" value="'._PRINT_DETAILS.'" onclick="window.open(\''.$_SESSION['config']['businessappurl'].'index.php?display=true&page=print&id='.$s_id.'\', \'_blank\');" /> ';
-    }
 
     if ($putInValid) {
         $toolBar .= '<input type="submit" class="button"  value="'._PUT_DOC_ON_VALIDATION.'" name="put_doc_on_validation" onclick="return(confirm(\''._REALLY_PUT_DOC_ON_VALIDATION.'\n\r\n\r\'));" /> ';
diff --git a/apps/maarch_entreprise/indexing_searching/documents_list_mlb_search_adv.php b/apps/maarch_entreprise/indexing_searching/documents_list_mlb_search_adv.php
index fd9fad0ef6160cc9404a74cee0c10439be218806..7c98408bacadc00e20e1d097eb4f15487cf0fa4a 100755
--- a/apps/maarch_entreprise/indexing_searching/documents_list_mlb_search_adv.php
+++ b/apps/maarch_entreprise/indexing_searching/documents_list_mlb_search_adv.php
@@ -915,7 +915,7 @@ if ($nbTab > 0) {
         array_push($paramsTab['tools'], $export2);
     }
 
-    if ($printTool && $core_tools->test_service('print_doc_details_from_list', 'apps', false)) {
+    if ($printTool) {
         $print = array(
                     'script' => "window.open('".$_SESSION['config']['businessappurl']."index.php?display=true&page=print', '_blank');",
                     'icon' => 'link',
diff --git a/apps/maarch_entreprise/lang/en.php b/apps/maarch_entreprise/lang/en.php
index a59c34f6e0a07b46417d5b9dd65ad5cf9926dbaf..98120e70c9e79cd795bc1ac7fd9f0545ef73f746 100755
--- a/apps/maarch_entreprise/lang/en.php
+++ b/apps/maarch_entreprise/lang/en.php
@@ -290,9 +290,6 @@ if (!defined('_TRACE_ACT')) {
 if (!defined('_INCLUDE_SUB_ENTITIES')) {
     define('_INCLUDE_SUB_ENTITIES', 'Include sub-entities');
 }
-if (!defined('_GRAPHICS_REPORTS')) {
-    define('_GRAPHICS_REPORTS', 'Graphics mode enabled');
-}
 
 /************** Forms And lists **************/
 if (!defined('_ID')) {
@@ -3559,10 +3556,6 @@ if (!defined('_SQL_QUERY_NOT_SECURE')) {
     define('_SQL_QUERY_NOT_SECURE', 'SQL request is not secured');
 }
 
-//service to put doc on validation from details page
-if (!defined('_PUT_DOC_ON_VALIDATION_FROM_DETAILS')) {
-    define('_PUT_DOC_ON_VALIDATION_FROM_DETAILS', 'Send the document for validation from the detailed page');
-}
 if (!defined('_PUT_DOC_ON_VALIDATION')) {
     define('_PUT_DOC_ON_VALIDATION', 'Send the document for validation');
 }
@@ -3919,15 +3912,6 @@ if (!defined('_CHOOSE_CURRENT_STATUS')) {
 }
 
 //PRINT
-if (!defined('_PRINT_DETAILS_SERVICE')) {
-    define('_PRINT_DETAILS_SERVICE', 'Print the liaison sheet from the detail sheet');
-}
-if (!defined('_PRINT_DETAILS')) {
-    define('_PRINT_DETAILS', 'Print liaison sheet');
-}
-if (!defined('_PRINT_DOC_DETAILS_FROM_SEARCH')) {
-    define('_PRINT_DOC_DETAILS_FROM_SEARCH', 'Print the liaison sheets from the search');
-}
 if (!defined('_PRINT_DOC_FROM_LIST')) {
     define('_PRINT_DOC_FROM_LIST', 'Print the mail liaison sheets');
 }
diff --git a/apps/maarch_entreprise/lang/fr.php b/apps/maarch_entreprise/lang/fr.php
index e9d23ff0ca280959b141774c01672b0445a6a67e..affff4433f3c535ecadbeb0d8ce7573f7eff1c65 100755
--- a/apps/maarch_entreprise/lang/fr.php
+++ b/apps/maarch_entreprise/lang/fr.php
@@ -2928,9 +2928,6 @@ if (!defined('_N_DAYS')) {
 if (!defined('_INCLUDE_SUB_ENTITIES')) {
     define('_INCLUDE_SUB_ENTITIES', 'Inclure les sous-entités');
 }
-if (!defined('_GRAPHICS_REPORTS')) {
-    define('_GRAPHICS_REPORTS', "Activer l'affichage graphique");
-}
 
 /******************** Specific ************/
 if (!defined('_PROJECT')) {
@@ -3586,9 +3583,6 @@ if (!defined('_SQL_QUERY_NOT_SECURE')) {
 }
 
 //service to put doc on validation from details page
-if (!defined('_PUT_DOC_ON_VALIDATION_FROM_DETAILS')) {
-    define('_PUT_DOC_ON_VALIDATION_FROM_DETAILS', 'Envoyer le document en validation depuis la page détails');
-}
 if (!defined('_PUT_DOC_ON_VALIDATION')) {
     define('_PUT_DOC_ON_VALIDATION', 'Envoyer le document en validation');
 }
@@ -3957,15 +3951,9 @@ if (!defined('_CHOOSE_CURRENT_STATUS')) {
 }
 
 //PRINT
-if (!defined('_PRINT_DETAILS_SERVICE')) {
-    define('_PRINT_DETAILS_SERVICE', 'Imprimer la fiche de liaison depuis la fiche détail');
-}
 if (!defined('_PRINT_DETAILS')) {
     define('_PRINT_DETAILS', 'Imprimer fiche de liaison');
 }
-if (!defined('_PRINT_DOC_DETAILS_FROM_SEARCH')) {
-    define('_PRINT_DOC_DETAILS_FROM_SEARCH', 'Imprimer les fiches de liaison depuis la recherche');
-}
 if (!defined('_PRINT_DOC_FROM_LIST')) {
     define('_PRINT_DOC_FROM_LIST', 'Imprimer les fiches de liaison des courriers');
 }
diff --git a/apps/maarch_entreprise/lang/nl.php b/apps/maarch_entreprise/lang/nl.php
index 0655fcaff8f93d97108ec474e10c6e2b681dc90c..af46bad2275004a39e1c0701b3ca6b191f139f38 100755
--- a/apps/maarch_entreprise/lang/nl.php
+++ b/apps/maarch_entreprise/lang/nl.php
@@ -933,7 +933,6 @@ if (!defined('_FOR_YEAR')) { define('_FOR_YEAR', 'voor het jaar');}
 if (!defined('_FOR_MONTH')) { define('_FOR_MONTH', 'voor de maand');}
 if (!defined('_N_DAYS')) { define('_N_DAYS', 'AANT DAGEN');}
 if (!defined('_INCLUDE_SUB_ENTITIES')) { define('_INCLUDE_SUB_ENTITIES', 'De subeenheden insluiten');}
-if (!defined('_GRAPHICS_REPORTS')) { define('_GRAPHICS_REPORTS', 'De grafische weergave activeren');}
 if (!defined('_PROJECT')) { define('_PROJECT', 'Map');}
 if (!defined('_MARKET')) { define('_MARKET', 'Submap');}
 if (!defined('_SEARCH_CUSTOMER')) { define('_SEARCH_CUSTOMER', 'Raadpleging Mappen, Submappen');}
@@ -1147,7 +1146,6 @@ if (!defined('_NOTES_2')) { define('_NOTES_2', 'Voorbeeld Dienstnota’s 2');}
 if (!defined('_NOTES_3')) { define('_NOTES_3', 'Voorbeeld Dienstnota’s 3');}
 if (!defined('_WHERE_CLAUSE_NOT_SECURE')) { define('_WHERE_CLAUSE_NOT_SECURE', 'Niet beveiligde Where clause');}
 if (!defined('_SQL_QUERY_NOT_SECURE')) { define('_SQL_QUERY_NOT_SECURE', 'Niet beveiligd SQL-verzoek');}
-if (!defined('_PUT_DOC_ON_VALIDATION_FROM_DETAILS')) { define('_PUT_DOC_ON_VALIDATION_FROM_DETAILS', 'Het te bevestigen document vanuit de detailpagina verzenden');}
 if (!defined('_PUT_DOC_ON_VALIDATION')) { define('_PUT_DOC_ON_VALIDATION', 'Het te bevestigen document verzenden');}
 if (!defined('_REALLY_PUT_DOC_ON_VALIDATION')) { define('_REALLY_PUT_DOC_ON_VALIDATION', 'De verzending in goedkeuring bevestigen');}
 if (!defined('_ASK_RA_CODE_1')) { define('_ASK_RA_CODE_1', 'Er zal een e-mail verzonden worden naar het adres:');}
@@ -1276,9 +1274,6 @@ if (!defined('_CHOOSE_TYPE')) { define('_CHOOSE_TYPE', 'Kies een typologie');}
 if (!defined('_DEPARTMENT_OWNER')) { define('_DEPARTMENT_OWNER', 'Eenheid waartoe het behoort');}
 if (!defined('_FOLDER')) { define('_FOLDER', 'Seriële map');}
 if (!defined('_CHOOSE_CURRENT_STATUS')) { define('_CHOOSE_CURRENT_STATUS', 'Huidige status bewaren');}
-if (!defined('_PRINT_DETAILS_SERVICE')) { define('_PRINT_DETAILS_SERVICE', 'De verbindingsfiche vanuit de detailfiche afdrukken');}
-if (!defined('_PRINT_DETAILS')) { define('_PRINT_DETAILS', 'De verbindingsfiche afdrukken');}
-if (!defined('_PRINT_DOC_DETAILS_FROM_SEARCH')) { define('_PRINT_DOC_DETAILS_FROM_SEARCH', 'De verbindingsfiche vanuit de zoekopdracht afdrukken');}
 if (!defined('_PRINT_DOC_FROM_LIST')) { define('_PRINT_DOC_FROM_LIST', 'De verbindingsfiches van de brieven afdrukken');}
 if (!defined('_PRINT_LIST')) { define('_PRINT_LIST', 'De lijst afdrukken');}
 if (!defined('_PRINT_CATEGORY')) { define('_PRINT_CATEGORY', 'Categorie');}
diff --git a/apps/maarch_entreprise/quicklaunch.php b/apps/maarch_entreprise/quicklaunch.php
deleted file mode 100755
index dd724b020b3d2c721281522731a423a43fc30607..0000000000000000000000000000000000000000
--- a/apps/maarch_entreprise/quicklaunch.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2015 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
-* @brief  Access to the baskets
-*
-*
-* @file
-* @author Loic Vinet <dev@maarch.org>
-* @author Claire Figueras <dev@maarch.org>
-* @author Lauren Giovannoni <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup apps
-*/
-
-require_once('core/class/class_request.php');
-$core_tools = new core_tools();
-$core_tools->test_user();
-$core_tools->test_service('quicklaunch', "apps");
diff --git a/apps/maarch_entreprise/reports/report_by_period.php b/apps/maarch_entreprise/reports/report_by_period.php
index 1132190f1d2788fad190e72d8855da9c51ead16e..fb52bb9d87aafb33d4907f9d5c99ddf7105649f8 100755
--- a/apps/maarch_entreprise/reports/report_by_period.php
+++ b/apps/maarch_entreprise/reports/report_by_period.php
@@ -28,11 +28,7 @@ if ($id == 'process_delay') {
 $content = '';
 $content .= '<div id="params">';
     $content .= '<form id="report_by_period_form" name="report_by_period_form" method="get" action="">';
-  if (!$core_tools->test_service('graphics_reports', 'reports', false)) {
-      $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'.$title.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_array" value="array" checked="checked"/><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-  } else {
-      $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'.$title.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-  }
+  $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'.$title.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
           $content .= '<br/>';
           $content .= '<input type="hidden" name="id_report" id="id_report" value="'.$id.'" />';
             $content .= '<table style="width:600px;border: solid 1px #135F7F;margin:auto;" >';
diff --git a/apps/maarch_entreprise/xml/services.xml b/apps/maarch_entreprise/xml/services.xml
index 54f81f66e34881f5ee122078856efee1321da3a3..0ba4ea7ce5165d44135c2803484f0588f9d86705 100755
--- a/apps/maarch_entreprise/xml/services.xml
+++ b/apps/maarch_entreprise/xml/services.xml
@@ -122,19 +122,6 @@
     <enabled>true</enabled>
     <angular>true</angular>
   </SERVICE>
-  <SERVICE>
-    <id>quicklaunch</id>
-    <name>_QUICKLAUNCH</name>
-    <comment>_QUICKLAUNCH</comment>
-    <servicepage>quicklaunch.php</servicepage>
-    <servicetype>use</servicetype>
-    <system_service>true</system_service>
-    <enabled>true</enabled>
-    <WHEREAMIUSED>
-      <page>welcome.php</page>
-      <nature>include</nature>
-    </WHEREAMIUSED>
-  </SERVICE>
   <SERVICE>
     <id>admin_contacts</id>
     <name>_CONTACTS</name>
@@ -190,7 +177,7 @@
     <enabled>true</enabled>
   </SERVICE>
   <SERVICE>
-    <id>reopen_mail</id>
+    <id>update_status_mail</id>
     <!-- if servicetype = menu, this id must be equal to the id of the menu item -->
     <name>_UPDATE_STATUS_MAIL</name>
     <comment>_UPDATE_STATUS_MAIL</comment>
@@ -274,19 +261,6 @@
       <page>details.php</page>
     </WHEREAMIUSED>
   </SERVICE>
-  <SERVICE>
-    <id>put_in_validation</id>
-    <name>_PUT_DOC_ON_VALIDATION_FROM_DETAILS</name>
-    <comment>_PUT_DOC_ON_VALIDATION_FROM_DETAILS</comment>
-    <servicepage>none.php</servicepage>
-    <servicetype>use</servicetype>
-    <system_service>false</system_service>
-    <enabled>true</enabled>
-    <WHEREAMIUSED>
-      <page>details.php</page>
-      <nature>include</nature>
-    </WHEREAMIUSED>
-  </SERVICE>
   <SERVICE>
     <id>add_links</id>
     <name>_ADD_LINKS</name>
@@ -324,28 +298,6 @@
     <enabled>true</enabled>
     <angular>true</angular>
   </SERVICE>
-  <SERVICE>
-    <id>print_details</id>
-    <name>_PRINT_DETAILS_SERVICE</name>
-    <comment>_PRINT_DETAILS_SERVICE</comment>
-    <servicepage>print_details.php</servicepage>
-    <servicetype>use</servicetype>
-    <system_service>false</system_service>
-    <enabled>true</enabled>
-    <WHEREAMIUSED>
-      <page>details.php</page>
-      <nature>include</nature>
-    </WHEREAMIUSED>
-  </SERVICE>
-  <SERVICE>
-    <id>print_doc_details_from_list</id>
-    <name>_PRINT_DOC_DETAILS_FROM_SEARCH</name>
-    <comment>_PRINT_DOC_DETAILS_FROM_SEARCH</comment>
-    <servicepage>print.php</servicepage>
-    <servicetype>use</servicetype>
-    <system_service>false</system_service>
-    <enabled>true</enabled>
-  </SERVICE>
   <SERVICE>
     <id>admin_update_control</id>
     <name>_UPDATE_CONTROL</name>
diff --git a/migration/19.12/1912.sql b/migration/19.12/1912.sql
index d90b72b2ba1363b50776b0cd634d0fb8dee18357..57f65c9a624a37c625a4d0a61fbd54c92cc98ecc 100644
--- a/migration/19.12/1912.sql
+++ b/migration/19.12/1912.sql
@@ -369,6 +369,23 @@ DELETE FROM usergroups_services WHERE service_id = 'admin_thesaurus';
 DELETE FROM usergroups_services WHERE service_id = 'thesaurus_view';
 DELETE FROM usergroups_services WHERE service_id = 'add_thesaurus_to_res';
 UPDATE usergroups_services SET service_id = 'manage_tags_application' WHERE service_id = 'create_tag';
+UPDATE usergroups_services SET service_id = 'update_status_mail' WHERE service_id = 'reopen_mail';
+DELETE FROM usergroups_services WHERE service_id = 'quicklaunch';
+DELETE FROM usergroups_services WHERE service_id = 'put_in_validation';
+DELETE FROM usergroups_services WHERE service_id = 'print_details';
+DELETE FROM usergroups_services WHERE service_id = 'print_doc_details_from_list';
+DELETE FROM usergroups_services WHERE service_id = 'view_attachments';
+DELETE FROM usergroups_services WHERE service_id = 'manage_attachments';
+DELETE FROM usergroups_services WHERE service_id = 'index_attachment';
+DELETE FROM usergroups_services WHERE service_id = 'display_basket_list';
+DELETE FROM usergroups_services WHERE service_id = 'choose_entity';
+DELETE FROM usergroups_services WHERE service_id = 'export_seda_view';
+DELETE FROM usergroups_services WHERE service_id = 'manage_notes_doc';
+DELETE FROM usergroups_services WHERE service_id = 'notes_restriction';
+DELETE FROM usergroups_services WHERE service_id = 'graphics_reports';
+DELETE FROM usergroups_services WHERE service_id = 'show_reports';
+DELETE FROM usergroups_services WHERE service_id = 'param_templates_doctypes';
+DELETE FROM usergroups_services WHERE service_id = 'doctype_template_use';
 
 INSERT INTO usergroups_services (group_id, service_id)
 SELECT distinct(group_id), 'update_diffusion_indexing'
diff --git a/modules/attachments/xml/services.xml b/modules/attachments/xml/services.xml
index f2c596da9f96d28d987d76db7ed1c80aacb94fdc..bac6418ca9e23c1b6d78f6d1b8f5c1b2eace74b9 100755
--- a/modules/attachments/xml/services.xml
+++ b/modules/attachments/xml/services.xml
@@ -1,35 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-<SERVICE>
-   <id>view_attachments</id>
-   <name>_VIEW_ATTACHMENTS</name>
-   <comment>_VIEW_ATTACHMENTS_DESC</comment>
-   <servicepage>view_attachments.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-   <WHEREAMIUSED>
-     <page>details_documents.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>
-    <WHEREAMIUSED>
-     <page>details_invoices.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>
- </SERVICE>
- <SERVICE>
-   <id>manage_attachments</id>
-   <name>_MANAGE_ATTACHMENTS</name>
-   <comment>_VIEW_ATTACHMENTS_DESC</comment>
-   <servicepage>manage_attachments.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-   <WHEREAMIUSED>
-     <page>process_frame.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>
- </SERVICE>
 <!--
  <SERVICE>
    <id>attach_doc_indexing</id>
@@ -45,26 +15,6 @@
    </WHEREAMIUSED>
  </SERVICE>
 -->
-   <SERVICE>
-   <id>index_attachment</id>
-   <name>_INDEX_ATTACHMENT</name>
-   <comment>_INDEX_ATTACHMENT_DESC</comment>
-   <servicepage>none</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-  </SERVICE>
-   <SERVICE>
-   <id>edit_attachments_from_detail</id>
-   <name>_CREATE_ATTACHMENTS_FROM_DETAILS</name>
-   <comment>_CREATE_ATTACHMENTS_FROM_DETAILS</comment>
-   <servicetype>use</servicetype>
-   <system_service>false</system_service>
-   <enabled>true</enabled>
-   <WHEREAMIUSED>
-        <page>frame_list_attachments.php</page>
-    </WHEREAMIUSED>
-  </SERVICE>
   <SERVICE>
    <id>modify_attachments</id>
    <name>_MODIFY_ATTACHMENTS</name>
@@ -98,4 +48,4 @@
         <page>frame_list_attachments.php</page>
     </WHEREAMIUSED>
   </SERVICE>
-</root>
\ No newline at end of file
+</root>
diff --git a/modules/basket/display_basket_list.php b/modules/basket/display_basket_list.php
deleted file mode 100755
index 1f8425e5506372ceeba9ee06a09af0cd2d386f0b..0000000000000000000000000000000000000000
--- a/modules/basket/display_basket_list.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2015 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
-* @brief  Lists the baskets for the current user (service)
-*
-*
-* @file
-* @author Loic Vinet <dev@maarch.org>
-* @author Claire Figueras <dev@maarch.org>
-* @author Laurent Giovannoni <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup basket
-*/
-
-require_once('core/class/class_request.php');
-require_once('modules/basket/class/class_modules_tools.php');
-$core_tools = new core_tools();
-$core_tools->test_user();
-
-$_SESSION['basket_used'] = '';
-if (!isset($_REQUEST['noinit'])) {
-    $_SESSION['current_basket'] = array();
-}
-/************/
-$bask = new basket();
-$db = new Database();
-
-?>
-
-<div id="welcome_box_left_baskets">
-    <br />
-    <?php
-    if ($core_tools->test_service('display_basket_list', 'basket', false)) {
-        // Refresh personnal basket info
-        $bask->load_module_var_session($_SESSION['user']); ?>
-    <div class="blank_space">&nbsp;</div>
-    <?php
-    }
-?>
-</div>
\ No newline at end of file
diff --git a/modules/basket/xml/services.xml b/modules/basket/xml/services.xml
index 179f91f8581d59b954031ecc945d5cce40cfbfde..272759a07138752ba73e50061be1c8c1a70ec8d1 100755
--- a/modules/basket/xml/services.xml
+++ b/modules/basket/xml/services.xml
@@ -16,22 +16,5 @@
      <nature>listelement</nature>
    </WHEREAMIUSED>
  </SERVICE>
- <SERVICE>
-   <id>display_basket_list</id>
-   <name>_DISPLAY_BASKET_LIST</name>
-   <comment>_DISPLAY_BASKET_LIST</comment>
-   <servicepage>display_basket_list.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-   <WHEREAMIUSED>
-		<page>welcome</page>
-		<nature>include</nature>
-	</WHEREAMIUSED>
-   <WHEREAMIUSED>
-		<page>view_basket</page>
-		<nature>include</nature>
-	</WHEREAMIUSED>
- </SERVICE>
 </root>
 
diff --git a/modules/entities/add_users_entities.php b/modules/entities/add_users_entities.php
deleted file mode 100755
index f4592040443af69f36747faea73913525e4c4b92..0000000000000000000000000000000000000000
--- a/modules/entities/add_users_entities.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
-* File : add_users_entities.php
-*
-* Form to add an entity to a user, pop up page
-*
-* @package  Maarch Framework 3.0
-* @version 1
-* @since 03/2009
-* @license GPL
-* @author  C�dric Ndoumba  <dev@maarch.org>
-*/
-try{
-    require_once("modules/entities/class/EntityControler.php");
-} catch (Exception $e){
-    functions::xecho($e->getMessage());
-}
-core_tools::load_lang();
-//core_tools::test_admin('manage_entities', 'entities');
-
-require_once('modules/entities/class/class_manage_entities.php');;
-$ent = new entity();
-$entity_ctrl = new EntityControler();
-//$except = array();
-/* If you want that a user can not belong to an entity and one of this entity subentity, decomment these lines
-for($i = 0; $i < count($_SESSION['m_admin']['entity']['entities']); $i++)
-{
-    $except[] = $_SESSION['m_admin']['entity']['entities'][$i]['ENTITY_ID'];
-}
-*/
-
-
-$entities = array();
-//$entities = $entity_ctrl->getAllEntities(); // To do : recup l'arborescence des entit�s
-$entities = $entity_ctrl->getAllEntities();
-//var_dump($entities);
-$EntitiesIdExclusion = array();
-if ($_SESSION['user']['UserId'] != 'superadmin') {
-    $my_tab_entities_id = $ent->get_all_entities_id_user($_SESSION['user']['entities']);
-    $my_tab_entities_id = array_unique($my_tab_entities_id);
-    //var_dump($my_tab_entities_id);
-    if (count($my_tab_entities_id) > 0) {
-        $countEntities = count($entities);
-        for ($cptAllEnt = 0;$cptAllEnt<$countEntities;$cptAllEnt++) {
-            //$result = array_search("'" . $entities[$cptAllEnt]->__get('entity_id') . "'", $my_tab_entities_id);
-            //var_dump($result);
-            if (!is_integer(array_search("'" . $entities[$cptAllEnt]->__get('entity_id') . "'", $my_tab_entities_id))) {
-                array_push($EntitiesIdExclusion, $entities[$cptAllEnt]->__get('entity_id'));
-                unset($entities[$cptAllEnt]);
-            }
-        }
-    }
-} else {
-    $entities = $entity_ctrl->getAllEntities();
-}
-$entities = array_values($entities);
-
-$allEntitiesTree= array();
-$allEntitiesTree = $ent->getShortEntityTreeAdvanced(
-    $allEntitiesTree, 'all', '', $EntitiesIdExclusion, 'all'
-);
-//var_dump($allEntitiesTree);
-
-function in_session_array($entity_id)
-{
-    for($i=0; $i<count($_SESSION['m_admin']['entity']['entities']);$i++)
-    {
-        if(trim($entity_id) == trim($_SESSION['m_admin']['entity']['entities'][$i]['ENTITY_ID']))
-            return true;
-    }
-    return false;
-}
-
-?>
-<div class="popup_content">
-<h2 class="tit"><?php echo USER_ADD_ENTITY;?></h2>
-<form name="chooseEntity" id="chooseEntity" method="get" action="#" class="forms" style="height:350px;">
-<p>
-    <label for="entity_id" style="width:90%;"> <?php echo _CHOOSE_ENTITY;?> : </label>
-    <select name="entity_id" id="entity_id" size="30" style="width: auto" >
-    <?php
-		
-        $countAllEntities = count($allEntitiesTree);
-        for ($cptEntities = 0;$cptEntities < $countAllEntities;$cptEntities++) {
-            if (!$allEntitiesTree[$cptEntities]['KEYWORD']) {
-                $optionStr .= '<option title="' 
-                    .  str_replace('&emsp;', '', $ent->show_string($allEntitiesTree[$cptEntities]['SHORT_LABEL'])) 
-                    . '" data-object_type="entity_id" value="' 
-                    . $allEntitiesTree[$cptEntities]['ID'] . '"';
-                if ($allEntitiesTree[$cptEntities]['DISABLED']) {
-                    $optionStr .= ' disabled="disabled" class="disabled_entity"';
-                } else {
-                     //$optionStr .= ' style="font-weight:bold;"';
-                }
-                $optionStr .=  '>' 
-                    .  $ent->show_string($allEntitiesTree[$cptEntities]['SHORT_LABEL']) 
-                    . '</option>';
-            }
-        }
-        echo $optionStr;
-		
-		
-    ?>
-    </select>
-    <script type="text/javascript">$j("#entity_id").chosen({width: "95%", disable_search_threshold: 10, search_contains: true});</script>
-</p>
-<br/>
-<p>
-    <label for="role"><?php echo _ROLE;?> : </label>
-    <input type="text"  name="role" id="role" style="width:90%;" />
-</p>
-<br/>
-<p class="buttons" style="position:absolute;bottom:5px;margin:0px;padding:0px;left:0px;text-align:center;width:100%;">
-    <input type="button" name="Submit" value="<?php echo _VALIDATE;?>" class="button" onclick="checkUserEntity('chooseEntity', '<?php echo $_SESSION['config']['businessappurl'].'index.php?display=true&module=entities&page=check_user_entities';?>', '<?php echo $_SESSION['config']['businessappurl'].'index.php?display=true&module=entities&page=manage_user_entities';?>', '<?php echo $_SESSION['config']['businessappurl'].'index.php?display=true&module=entities&page=users_entities_form';?>');"  />
-    <input type="button" name="cancel" value="<?php echo _CANCEL;?>" class="button"  onclick="destroyModal('add_user_entities');"/>
-</p>
-
-</form>
-</div>
diff --git a/modules/entities/choose_entity.php b/modules/entities/choose_entity.php
deleted file mode 100755
index eae795f699164de5ca3c494b0c90934312f79a3f..0000000000000000000000000000000000000000
--- a/modules/entities/choose_entity.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
-* File : choose_entity.php
-*
-* Form to choose  entity
-*
-* @package  Maarch Framework 3.0
-* @version 1
-* @since 03/2009
-* @license GPL
-* @author  Cédric Ndoumba  <dev@maarch.org>
-* @author  Claire Figueras  <dev@maarch.org>
-*/
-
-$path = 'modules'.DIRECTORY_SEPARATOR.'entities'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_manage_entities.php';
-require($path);
-$core_tools = new core_tools();
-$func = new functions();
-
-$core_tools->load_lang();
-$core_tools->load_html();
-$core_tools->load_header('', true, false);
-
-if(isset($_REQUEST['entityid'])  )
-{
-	if (empty($_REQUEST['entityid']))
-	{
-		$_SESSION['m_admin']['entity']['entityId'] = "";
-	}
-	else
-	{
-		$_SESSION['m_admin']['entity']['entityId'] = $_REQUEST['entityid'];
-	}
-}
-$ent = new entity();
-$entities = array();
-$except = array();
-
-if($_SESSION['user']['UserId'] == 'superadmin')
-{
-	$entities = $ent->getShortEntityTree($entities,'all', '', $except);
-}
-else
-{
-	$entities = $ent->getShortEntityTree($entities,$_SESSION['user']['entities'],  '' , $except);
-}
-//print_r($entities);
-?>
-<body>
-<form name="choose_entity" method="get" action="<?php echo $_SESSION['config']['businessappurl'];?>index.php" class="forms" >
-<input type="hidden" name="display" value="true" />
-<input type="hidden" name="module" value="entities" />
-<input type="hidden" name="page" value="choose_entity" />
-	<p>
-		<label for="entity_id"><?php echo _ENTITY;?> : </label>
-		<select name="entityid" onchange="this.form.submit();">
-			<option value="" ><?php echo _CHOOSE_ENTITY;?></option>
-			<?php
-			for($i=0; $i<count($entities);$i++)
-			{
-				?>
-				<option value="<?php functions::xecho($entities[$i]['ID']);?>" <?php  if($entities[$i]['ID']== $_SESSION['m_admin']['entity']['entityId']){ echo 'selected="selected"'; }?> ><?php functions::xecho($entities[$i]['LABEL']);?></option><?php
-			}
-			?>
-		</select><span class="red_asterisk"><i class="fa fa-star"></i></span>
-	</p>
-</form>
-<?php $core_tools->load_js();?>
-</body>
-</html>
diff --git a/modules/entities/entity_late_mail.php b/modules/entities/entity_late_mail.php
index 8e404c2337d533ef10f7f22795fab066340b4114..bdb3b134ea6b55fb75bfda63d45a8f02dcc00c0f 100755
--- a/modules/entities/entity_late_mail.php
+++ b/modules/entities/entity_late_mail.php
@@ -14,11 +14,7 @@ if (isset($_REQUEST['arguments']) && !empty($_REQUEST['arguments'])) {
 $content = '';
 $content .= '<div id="params">';
     $content .= '<form id="report_by_period_form" name="report_by_period_form" method="get" action="">';
-  if (!$core_tools->test_service('graphics_reports', 'reports', false)) {
-      $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._ENTITY_LATE_MAIL.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_array" value="array" checked="checked" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-  } else {
-      $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._ENTITY_LATE_MAIL.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-  }
+  $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._ENTITY_LATE_MAIL.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
   $content .= '<br/>';
         $content .= '<input type="hidden" name="id_report" id="id_report" value="'.$id.'" />';
     $content .= '<table style="width:600px;border: solid 1px #135F7F;margin:auto;" >';
diff --git a/modules/entities/entity_process_delay.php b/modules/entities/entity_process_delay.php
index 7b0779e349579c981a2e1348af93c2d182c7c411..86bbfc41e97b80265412fe128df90a5f1c8f8320 100755
--- a/modules/entities/entity_process_delay.php
+++ b/modules/entities/entity_process_delay.php
@@ -14,11 +14,7 @@ if (isset($_REQUEST['arguments']) && !empty($_REQUEST['arguments'])) {
 $content = '';
 $content .= '<div id="params">';
     $content .= '<form id="report_by_period_form" name="report_by_period_form" method="get" action="">';
-        if (!$core_tools->test_service('graphics_reports', 'reports', false)) {
-            $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._ENTITY_PROCESS_DELAY.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_array" value="array" checked="checked" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-        } else {
-            $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._ENTITY_PROCESS_DELAY.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-        }
+        $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._ENTITY_PROCESS_DELAY.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
   $content .= '<br/>';
         $content .= '<input type="hidden" name="id_report" id="id_report" value="'.$id.'" />';
     $content .= '<table style="width:600px;border: solid 1px #135F7F;margin:auto;" >';
diff --git a/modules/entities/entity_response_rate_stat.php b/modules/entities/entity_response_rate_stat.php
index b80d093fc513329493a4fb1fcbc48c05d6390509..5f8fcf0dba73152fc886ec5c8762877978c89ce5 100755
--- a/modules/entities/entity_response_rate_stat.php
+++ b/modules/entities/entity_response_rate_stat.php
@@ -14,11 +14,7 @@ if (isset($_REQUEST['arguments']) && !empty($_REQUEST['arguments'])) {
 $content = '';
 $content .= '<div id="params">';
     $content .= '<form id="report_by_period_form" name="report_by_period_form" method="get" action="">';
-  if (!$core_tools->test_service('graphics_reports', 'reports', false)) {
-      $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._RESPONSE_RATE_BY_ENTITIES.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_array" value="array" checked="checked" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-  } else {
-      $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._RESPONSE_RATE_BY_ENTITIES.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-  }
+  $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._RESPONSE_RATE_BY_ENTITIES.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
     $content .= '<br/>';
         $content .= '<input type="hidden" name="id_report" id="id_report" value="'.$id.'" />';
     $content .= '<table style="width:600px;border: solid 1px #135F7F;margin:auto;" >';
diff --git a/modules/entities/entity_vol_stat.php b/modules/entities/entity_vol_stat.php
index 692c19614628b29444d21087e50a636c42ad9957..d0d432ab50cd4d76635f8bb747a891f9b0375aca 100755
--- a/modules/entities/entity_vol_stat.php
+++ b/modules/entities/entity_vol_stat.php
@@ -25,11 +25,7 @@ if (isset($_REQUEST['arguments']) && !empty($_REQUEST['arguments'])) {
 $content = '';
 $content .= '<div id="params">';
   $content .= '<form id="report_by_period_form" name="report_by_period_form" method="get" action="">';
-        if (!$core_tools->test_service('graphics_reports', 'reports', false)) {
-            $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._MAIL_VOL_BY_ENT_REPORT.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_array" value="array" checked="checked"/><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-        } else {
-            $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._MAIL_VOL_BY_ENT_REPORT.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
-        }
+        $content .= '<div id="statLabel" style="font-weight:bold;text-align:center;text-transform:uppercase;">'._MAIL_VOL_BY_ENT_REPORT.' <span style="font-weight: initial;">(<input type="radio" name="form_report" id="report_graph"  value="graph" checked="checked" /><label for="report_graph"> '._GRAPH.' </label><input type="radio" name="form_report" id="report_array" value="array" /><label for="report_array"> '._ARRAY.'</label>)</span></div>';
   $content .= '<br/>';
         $content .= '<input type="hidden" name="id_report" id="id_report" value="'.$id.'" />';
   $content .= '<table style="width:600px;border: solid 1px #135F7F;margin:auto;" >';
diff --git a/modules/entities/remove_user_entities.php b/modules/entities/remove_user_entities.php
deleted file mode 100755
index 5be68f6d5e56b45ae1f7a43fdeadccab21401d29..0000000000000000000000000000000000000000
--- a/modules/entities/remove_user_entities.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-if(isset($_REQUEST['entities']) && $_REQUEST['entities'] >= 0)
-{
-	$entities = explode('#', $_REQUEST['entities']);
-	unset($entities[count($entities) -1]);
-	$to_unset = array();
-	for($i=0;$i<count($entities);$i++)
-	{ 
-		for($j=0; $j<count($_SESSION['m_admin']['entity']['entities']);$j++)
-		{
-			if(!empty($entities[$i]) && trim($entities[$i]) == trim($_SESSION['m_admin']['entity']['entities'][$j]['ENTITY_ID']))
-			{
-				array_push($to_unset, $j);
-				break;
-			}
-		}
-	}
-	for($i=0;$i<count($to_unset);$i++)
-	{
-		unset($_SESSION['m_admin']['entity']['entities'][$to_unset[$i]]);
-	}
-	$_SESSION['m_admin']['entity']['entities'] = array_values($_SESSION['m_admin']['entity']['entities']);
-	$_SESSION['m_admin']['load_entities'] = false;
-	echo "{ status : 0 }";
-}
-else
-{
-	echo "{ status : 1 }";
-}
-?>
diff --git a/modules/entities/users_entities_form.php b/modules/entities/users_entities_form.php
deleted file mode 100755
index f76dab919b0c9aa590d7df95dc1975838dad1ef8..0000000000000000000000000000000000000000
--- a/modules/entities/users_entities_form.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
-* File : users_entities_form.php
-*
-* Form to choose a entity in the user_entities management (iframe included in the user_entities management)
-*
-* @package  Maarch Framework 3.0
-* @version 1
-* @since 03/2009
-* @license GPL
-* @author  Cédric Ndoumba  <dev@maarch.org>
-* @author  Claire Figueras  <dev@maarch.org>
-*/
-core_tools::load_lang();
-header("Content-Type: text/html", true);
-?>
-<div class="block" style="height:400px;position:relative;">
-<form name="userEntity" method="get" action="#" >
-
- <h2> <?php echo _USER_ENTITIES_TITLE;?> :</h2>
-<div class="content" style="height:150px;overflow:auto;">
-<?php
-
-    if(empty($_SESSION['m_admin']['entity']['entities'])   )
-    {
-        echo _USER_BELONGS_NO_ENTITY.".<br/>";
-    }
-    else
-    {
-        for($theline = 0; $theline < count($_SESSION['m_admin']['entity']['entities']) ; $theline++)
-        {
-                if( $_SESSION['m_admin']['entity']['entities'][$theline]['PRIMARY'] == 'Y')
-                {
-                    ?><i class="fa fa-arrow-right" title="<?php echo _PRIMARY_ENTITY;?>"></i> <?php
-                }
-                else
-                {
-                    echo "&nbsp;&nbsp;&nbsp;&nbsp;";
-                }
-                ?>
-                <input type="checkbox"  class="check" name="entities[]" value="<?php functions::xecho($_SESSION['m_admin']['entity']['entities'][$theline]['ENTITY_ID']);?>" ><?php if(isset($_SESSION['m_admin']['entity']['entities'][$theline]['SHORT_LABEL']) && !empty($_SESSION['m_admin']['entity']['entities'][$theline]['SHORT_LABEL'])){ functions::xecho($_SESSION['m_admin']['entity']['entities'][$theline]['SHORT_LABEL']); }elseif(isset($_SESSION['m_admin']['entity']['entities'][$theline]['LABEL'])){ echo $_SESSION['m_admin']['entity']['entities'][$theline]['LABEL'];}?><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i><?php echo $_SESSION['m_admin']['entity']['entities'][$theline]['ROLE'];?></i><br/></input>
-                <?php
-        }
-         ?> <div style="position: absolute;bottom: 10px;"><input class="button" type="button" name="removeEntities" id="removeEntities" value="<?php echo _DELETE_ENTITY;?>" onclick="doActionEntity('<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&amp;module=entities&amp;page=remove_user_entities', '<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&amp;module=entities&amp;page=users_entities_form');" /><br/><br/>
-<?php   }
-
-    //if (!isset($_SESSION['m_admin']['entity']['entities'])|| (count($_SESSION['m_admin']['entity']['entities']) < $_SESSION['m_admin']['nbentities']  || empty($_SESSION['m_admin']['entity']['entities'])))
-    //{
-    ?>
-        <input class="button" type="button" name="addEntity" onclick="displayModal('<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&amp;module=entities&amp;page=add_users_entities', 'add_user_entities', 600, 150);" value="<?php echo _ADD_TO_ENTITY;?>" />
-    <?php
-    //}
-    ?>
-    <br/><br/>
-    <?php  if (isset($_SESSION['m_admin']['entity']['entities']) && count($_SESSION['m_admin']['entity']['entities']) > 0)
-    {
-    ?>
-        <input type="button" class="button" name="setPrimary" value="<?php echo _CHOOSE_PRIMARY_ENTITY;?>" onclick="doActionEntity('<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&amp;module=entities&amp;page=set_primary_entity', '<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=entities&page=users_entities_form');"/>
-    <?php
-    }
-    ?>
-    </div>
-    </form>
-    </div>
-    </div>
-
diff --git a/modules/entities/users_entities_up.php b/modules/entities/users_entities_up.php
deleted file mode 100755
index ace89d8b7d9e7efd3c76897aea42504d4b957ef9..0000000000000000000000000000000000000000
--- a/modules/entities/users_entities_up.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
-* File : users_entities_up.php
-*
-* Users - Entities form relate
-*
-* @package  Maarch Framework 3.0
-* @version 1
-* @since 03/2009
-* @license GPL
-* @author  Cédric Ndoumba  <dev@maarch.org>
-* @author  Claire Figueras  <dev@maarch.org>
-*/
-
-$admin = new core_tools();
-$admin->test_admin('manage_entities', 'entities');
-
-$func = new functions();
-if(isset($_GET['id']))
-{
-    $id = addslashes($func->wash($_GET['id'], "no", _THE_USER));
-}
-else
-{
-    $id = "";
-}
- /****************Management of the location bar  ************/
-$init = false;
-if(isset($_REQUEST['reinit']) && $_REQUEST['reinit'] == "true")
-{
-    $init = true;
-}
-$level = "";
-if(isset($_REQUEST['level']) && $_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)
-{
-    $level = $_REQUEST['level'];
-}
-$page_path = $_SESSION['config']['businessappurl'].'index.php?page=users_entities_up&module=entities';
-$page_label = _MODIFICATION;
-$page_id = "users_entities_up";
-$admin->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
-/***********************************************************/
-require_once('modules'.DIRECTORY_SEPARATOR.'entities'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_users_entities.php');
-$usersent = new users_entities();
-
-$usersent->formuserentities("up", $id);
-?>
diff --git a/modules/entities/users_entities_up_db.php b/modules/entities/users_entities_up_db.php
deleted file mode 100755
index 714bf45df22d16b599d68994d9b9e686870faa60..0000000000000000000000000000000000000000
--- a/modules/entities/users_entities_up_db.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
-* File : users_entities_up_db.php
-*
-* Modify the users_entities in the database after the form
-*
-* @package  Maarch Framework 3.0
-* @version 1
-* @since 03/2009
-* @license GPL
-* @author  Cédric Ndoumba  <dev@maarch.org>
-*/
-
-$core_tools = new core_tools();
-$core_tools->test_admin('manage_entities', 'entities');
-$core_tools->load_lang();
-require_once('modules'.DIRECTORY_SEPARATOR.'entities'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_users_entities.php');
-
-$usersEnt = new users_entities();
-
-$usersEnt->addupusersentities("up");
-?>
diff --git a/modules/entities/xml/IVS/requests_definitions.xml b/modules/entities/xml/IVS/requests_definitions.xml
index b1de4c2066c801706f2a90375ece0fc8437ddf98..ae8333a232fddf311b78eb0f22c2316ea77aee89 100755
--- a/modules/entities/xml/IVS/requests_definitions.xml
+++ b/modules/entities/xml/IVS/requests_definitions.xml
@@ -136,15 +136,6 @@
 		<parameter name="display" value="true"/>
 		<parameter name="module" value="entities"/>
     </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="choose_entity">
-		<parameter name="page" value="choose_entity"/>
-		<parameter name="display" value="true"/>
-		<parameter name="module" value="entities"/>
-    </requestDefinition>
-    <requestDefinition method="GET" path="/apps/maarch_entreprise/index.php" validationRule="choose_entity">
-		<parameter name="page" value="choose_entity"/>
-		<parameter name="module" value="entities"/>
-    </requestDefinition>
     <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="entity_late_mail">
 		<parameter name="page" value="entity_late_mail"/>
 		<parameter name="display" value="true"/>
@@ -298,4 +289,4 @@
     </requestDefinition>
 
 
-</requestDefinitions>
\ No newline at end of file
+</requestDefinitions>
diff --git a/modules/entities/xml/IVS/validation_rules.xml b/modules/entities/xml/IVS/validation_rules.xml
index 28868cf4f5b7c13cf62e1e372eb4d07ad82c2d9a..8f478edc6bfe8c88653a5cf42d279b4081dd3844 100755
--- a/modules/entities/xml/IVS/validation_rules.xml
+++ b/modules/entities/xml/IVS/validation_rules.xml
@@ -128,10 +128,6 @@
 		<parameter name="module" type="identifier" />
 		<parameter name="form_values" type="string" />
     </validationRule>
-    <validationRule name="choose_entity" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="entityid" type="identifier" />
-    </validationRule>
     <validationRule name="entity_late_mail" extends="standardForm" mode="error">
 		<parameter name="module" type="identifier" />
 		<parameter name="arguments" type="ajax_ids_2" />
@@ -261,4 +257,4 @@
 
     <validationRule name="entity_add" extends="standardForm" mode="error" />
 
-</validationRules>
\ No newline at end of file
+</validationRules>
diff --git a/modules/entities/xml/services.xml b/modules/entities/xml/services.xml
index 3912ed6478cc47fb90adc628472f39bfd1e6e8f2..2f8e7d22b1ad2394d108cddc407b95dca2ec59d2 100755
--- a/modules/entities/xml/services.xml
+++ b/modules/entities/xml/services.xml
@@ -32,76 +32,6 @@
         </WHEREAMIUSED>
         <angular>true</angular>
     </SERVICE>
-    <SERVICE>
-        <id>choose_entity</id>
-        <name>_CHOOSE_ENTITY</name>
-        <servicepage>choose_entity</servicepage>
-        <servicetype>use</servicetype>
-        <system_service>true</system_service>
-        <enabled>true</enabled>
-        <WHEREAMIUSED>
-            <page>class_admin_sites.php</page>
-            <nature>frame</nature>
-            <height>20</height>
-            <width>100%</width>
-            <border>0</border>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>class_admin_natures.php</page>
-            <nature>frame</nature>
-            <height>20</height>
-            <width>100%</width>
-            <border>0</border>
-        </WHEREAMIUSED>
-    </SERVICE>
-    <SERVICE>
-        <id>manage_users_entities</id>
-        <name>_MANAGE_USERS_ENTITIES</name>
-        <servicepage>service_user_entities.php</servicepage>
-        <servicetype>use</servicetype>
-        <system_service>true</system_service>
-        <enabled>true</enabled>
-        <WHEREAMIUSED>
-            <page>user_init</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>formuser</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>users_list_init</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>user_check</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>users_up_db.php</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>users_add_db</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-    </SERVICE>
-    <SERVICE>
-        <id>entities_index_mlb</id>
-        <name>_ENTITIES_INDEX_MLB</name>
-        <servicepage>entities_index_mlb.php</servicepage>
-        <servicetype>use</servicetype>
-        <system_service>true</system_service>
-        <enabled>true</enabled>
-        <WHEREAMIUSED>
-            <page>index_mlb</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-        <WHEREAMIUSED>
-            <page>check_category</page>
-            <nature>include</nature>
-        </WHEREAMIUSED>
-    </SERVICE>
     <SERVICE>
         <id>entities_print_sep_mlb</id>
         <name>_ENTITIES_PRINT_SEP_MLB</name>
diff --git a/modules/export_seda/xml/services.xml b/modules/export_seda/xml/services.xml
index 4c1a318da871d0bb1f78ccd35f9ad04e47bf210b..31cfcdf398ec350c295967a1dd54feb89943a308 100755
--- a/modules/export_seda/xml/services.xml
+++ b/modules/export_seda/xml/services.xml
@@ -1,16 +1,3 @@
 <?xml version="1.0" ?>
 <root>
-    <SERVICE>
-       <id>export_seda_view</id>
-       <name>_EXPORT_SEDA_VIEW</name>
-       <comment>_EXPORT_SEDA_VIEW</comment>
-       <servicepage>export_seda_view.php</servicepage>
-       <servicetype>use</servicetype>
-       <system_service>false</system_service>
-       <enabled>true</enabled>
-       <WHEREAMIUSED>
-         <page>details.php</page>
-         <nature>include</nature>
-       </WHEREAMIUSED>
-    </SERVICE>
 </root>
diff --git a/modules/notes/lang/en.php b/modules/notes/lang/en.php
index 2d6b58c72733b544ac53b632ad504679830d635a..4426bfbcfa70ebcc91d1710f13ff15ffe19e8701 100755
--- a/modules/notes/lang/en.php
+++ b/modules/notes/lang/en.php
@@ -72,10 +72,6 @@ if (!defined("_SELECT_NOTE_TEMPLATE")) {
     define("_SELECT_NOTE_TEMPLATE", "Select a note template");
 }
 
-//SERVICES FOR NOTES
-if (!defined("_NOTES_RESTRICTION")) {
-    define("_NOTES_RESTRICTION", "By default, limit the notes to your department");
-}
 
 if (!defined("_NOTE")) {
     define("_NOTE", "Note");
diff --git a/modules/notes/lang/fr.php b/modules/notes/lang/fr.php
index 1ae3bbaf22c1fc94507277f1bdaca81df1dee025..f1fb6144eb238fc86ec9d614c9c35d91f1664bfd 100755
--- a/modules/notes/lang/fr.php
+++ b/modules/notes/lang/fr.php
@@ -72,11 +72,6 @@ if (!defined("_SELECT_NOTE_TEMPLATE")) {
     define("_SELECT_NOTE_TEMPLATE", "Sélectionner un modèle d'annotation");
 }
 
-//SERVICES FOR NOTES
-if (!defined("_NOTES_RESTRICTION")) {
-    define("_NOTES_RESTRICTION", "Restreindre par défaut les annotations à votre entité");
-}
-
 if (!defined("_NOTE")) {
     define("_NOTE", "Annotation");
 }
diff --git a/modules/notes/lang/nl.php b/modules/notes/lang/nl.php
index faaac99380fe176520728d74d0017f4f82dab10c..d43551d4d0e29f345caf3062b9451a7f946928d2 100755
--- a/modules/notes/lang/nl.php
+++ b/modules/notes/lang/nl.php
@@ -55,9 +55,6 @@ if (!defined('_NOTE_TEMPLATE')) {
 if (!defined('_SELECT_NOTE_TEMPLATE')) {
     define('_SELECT_NOTE_TEMPLATE', 'Een aantekeningmodel selecteren');
 }
-if (!defined('_NOTES_RESTRICTION')) {
-    define('_NOTES_RESTRICTION', 'De aantekeningen standaard tot uw eenheid beperken');
-}
 if (!defined('_RESTRICTED_SERVICES')) {
     define('_RESTRICTED_SERVICES', 'Beperkt tot de eenheid (eenheden)');
 }
@@ -100,9 +97,6 @@ if (!defined('_NOTE_TEMPLATE')) {
 if (!defined('_SELECT_NOTE_TEMPLATE')) {
     define('_SELECT_NOTE_TEMPLATE', 'Een opmerkingsmodel selecteren');
 }
-if (!defined('_NOTES_RESTRICTION')) {
-    define('_NOTES_RESTRICTION', 'De standaardopmerkingen tot uw eenheid beperken');
-}
 if (!defined('_NOTE')) {
     define('_NOTE', 'Opmerking');
 }
diff --git a/modules/notes/notes_ajax_content.php b/modules/notes/notes_ajax_content.php
index c05adb07809f37aa87d623a36e56bed0dec3c213..4750096086fe1795139472ac06ab18c3e28d5bd0 100755
--- a/modules/notes/notes_ajax_content.php
+++ b/modules/notes/notes_ajax_content.php
@@ -164,16 +164,14 @@ switch ($mode) {
             $content .= '<select name="entitieslist[]" id="entitieslist" size="7" style="width: 206px" ';
             $content .= 'ondblclick=\'moveclick($(entitieslist), $(entities_chosen));\' multiple="multiple">';
             $entitiesForRestriction = null;
-            if ($core_tools->test_service('notes_restriction', 'notes', false)) {
-                if (!empty($_SESSION['user']['entities'])) {
-                    foreach ($_SESSION['user']['entities'] as $tmpEntity) {
-                        //if($tmpEntity['ENTITY_ID'] == $_SESSION['user']['primaryentity']['id']){
-                            $entitiesForRestriction[] = $tmpEntity['ENTITY_ID'];
-                        //}
-                    }
+            if (!empty($_SESSION['user']['entities'])) {
+                foreach ($_SESSION['user']['entities'] as $tmpEntity) {
+                    //if($tmpEntity['ENTITY_ID'] == $_SESSION['user']['primaryentity']['id']){
+                        $entitiesForRestriction[] = $tmpEntity['ENTITY_ID'];
+                    //}
                 }
-                $entitiesForRestriction[] = $destination;
             }
+            $entitiesForRestriction[] = $destination;
             for ($i=0;$i<count($entitiesList);$i++) {
                 if ($entitiesForRestriction && in_array($entitiesList[$i]->entity_id, $entitiesForRestriction)) {
                     $state_entity = true;
diff --git a/modules/notes/xml/services.xml b/modules/notes/xml/services.xml
index 96a8284eadd7535eb0fb4d32f64b305d39f7ab04..d15cc8033fce6abb48b9de486ec5ffba3204a7d5 100755
--- a/modules/notes/xml/services.xml
+++ b/modules/notes/xml/services.xml
@@ -1,51 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-<SERVICE>
-   <id>manage_notes_doc</id>
-   <name>_MANAGE_NOTES</name>
-   <comment>_MANAGE_NOTES</comment>
-   <servicepage>notes_doc.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-   <!--<WHEREAMIUSED>
-     <page>details_documents.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>-->
-    <WHEREAMIUSED>
-     <page>details_invoices.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>
-  <!--  <WHEREAMIUSED>
-     <page>res_type.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>
-   <WHEREAMIUSED>
-     <page>process_frame.php</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>-->
- </SERVICE>
-<SERVICE>
-    <id>notes_restriction</id>
-    <name>_NOTES_RESTRICTION</name>
-    <comment>_NOTES_RESTRICTION</comment>
-    <servicetype>use</servicetype>
-    <system_service>false</system_service>
-    <enabled>true</enabled>
-</SERVICE>
-<!--<SERVICE>
-	Beta!!
-   <id>show_notes_list</id>
-   <name>_SHOW_NOTES_LIST</name>
-   <comment>_SHOW_NOTES_LIST</comment>
-   <servicepage>show_notes_list.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-    <WHEREAMIUSED>
-     <page>welcome</page>
-     <nature>include</nature>
-   </WHEREAMIUSED>
- </SERVICE>
- -->
 </root>
diff --git a/modules/reports/reports_frame.php b/modules/reports/reports_frame.php
deleted file mode 100755
index 83ab89fa1fe336fb97adcd7e2b1c09a7b77e3572..0000000000000000000000000000000000000000
--- a/modules/reports/reports_frame.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/*
-*
-*    Copyright 2008,2009 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*
-/**
-* @brief  Reports frame : show reports in frame (include type))
-*
-* @file
-* @author Claire Yves Christian KPAKPO <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup reports
-*/
-$core_tools = new core_tools();
-$core_tools->load_lang();
-$core_tools->test_service('reports', 'reports');
-echo '';
-?>
-<br>
-<iframe src="<?php echo $_SESSION['config']['businessappurl'];?>index.php?display=true&module=reports&page=user_reports" name="user_reports" id="user_reports" frameborder="0" width="100%" height="560" scrolling="no"></iframe>
-
-
diff --git a/modules/reports/xml/services.xml b/modules/reports/xml/services.xml
index 8091271ea47419ed2f7739a47dc9e127f17988da..f787dc4d886d1ffb3244a51a3afbfdbe0e9fb6d1 100755
--- a/modules/reports/xml/services.xml
+++ b/modules/reports/xml/services.xml
@@ -27,25 +27,4 @@
 		<style>fa fa-chart-area</style>
 		<angular>false</angular>
 	</SERVICE>
-	<SERVICE>
-		<id>graphics_reports</id>
-		<name>_GRAPHICS_REPORTS</name>
-		<comment>_GRAPHICS_REPORTS_DESC</comment>
-		<servicetype>use</servicetype>
-		<system_service>false</system_service>
-		<enabled>true</enabled>
-	</SERVICE>
-	<SERVICE>
-		<id>show_reports</id>
-		<name>_REPORTS</name>
-		<comment>_REPORTS_DESC</comment>
-		<servicepage>reports_frame.php</servicepage>
-		<servicetype>use</servicetype>
-		<system_service>true</system_service>
-		<enabled>true</enabled>
-		<WHEREAMIUSED>
-			<page>details_invoices.php</page>
-			<nature>include</nature>
-		</WHEREAMIUSED>
-	</SERVICE>
 </root>
diff --git a/modules/templates/doctype_template_use.php b/modules/templates/doctype_template_use.php
deleted file mode 100755
index eeb7a5016fa4fcde94e25e981073353c11219aa6..0000000000000000000000000000000000000000
--- a/modules/templates/doctype_template_use.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-$db = new Database();
-$core = new core_tools();
-$core->load_lang();
-
-if(empty($_SESSION['indexing_type_id']) || !isset($_SESSION['indexing_type_id']))
-{
-	// ERREUR
-	exit();
-}
- 
-$stmt = $db->query("select is_generated, template_id from ".$_SESSION['tablename']['temp_templates_doctype_ext']." where type_id = ? ", 
-					array($_SESSION['indexing_type_id'])
-		);
-$is_generated = 'N';
-$template = '';
-if($stmt->rowCount() > 0)
-{
-	$res = $stmt->fetchObject();
-	$is_generated = $res->is_generated;
-	$template = $res->template_id;
-}
-if($_SESSION['origin'] == "scan")
-{
-	$otherArg = "&#navpanes=0";
-}
-else
-{
-	$otherArg = "";
-}
-
-array_push($_SESSION['indexing_services'], array('script' => 'modules/templates/js/change_doctype.js', 'function_to_execute' => 'doctype_template', 'arguments' => array(
-array('id' => 'is_generated' , 'value' =>$is_generated),
-array('id'=> 'template_id', 'value' => $template),
-array('id'=> 'doc_frame', 'value' => $_SESSION['config']['businessappurl'].'index.php?display=true&dir=indexing_searching&page=file_iframe'.$otherArg),
-array('id'=> 'model_frame', 'value' =>$_SESSION['config']['businessappurl'].'index.php?display=true&module=templates&page=file_iframe&model_id='.$template))));
-?>
diff --git a/modules/templates/param_templates_doctypes.php b/modules/templates/param_templates_doctypes.php
deleted file mode 100755
index 2f9932b0036fd9592913e6bf23a1b53d39edf0e3..0000000000000000000000000000000000000000
--- a/modules/templates/param_templates_doctypes.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2015 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-if ($_SESSION['service_tag'] == 'doctype_up') {
-    $db = new Database();
-    $stmt = $db->query("select * from ".$_SESSION['tablename']['temp_templates_doctype_ext']." where type_id = ? ",
-				array($_SESSION['m_admin']['doctypes']['TYPE_ID'])
-			);
-			
-    //$db->show();
-    if ($stmt->rowCount() == 0) {
-        $_SESSION['m_admin']['doctypes']['is_generated'] = 'N';
-        $_SESSION['m_admin']['doctypes']['template_id'] = '';
-    } else {
-        $line = $stmt->fetchObject();
-        $_SESSION['m_admin']['doctypes']['is_generated'] = $line->is_generated;
-        $_SESSION['m_admin']['doctypes']['template_id'] = $line->template_id;
-    }
-} elseif ($_SESSION['service_tag'] == 'doctype_add') {
-    $_SESSION['m_admin']['doctypes']['is_generated'] = 'N';
-    $_SESSION['m_admin']['doctypes']['template_id'] = '';
-} elseif ($_SESSION['service_tag'] == 'frm_doctype') {
-    $db = new Database();
-    $stmt = $db->query("select template_id, template_label from "
-        . $_SESSION['tablename']['temp_templates'] . " where template_type = 'HTML' and (template_target = 'doctypes' or template_target = '')"
-    );
-    $templates = array();
-    while ($res = $stmt->fetchObject()) {
-        array_push($templates, array('id' => $res->template_id, 'label' => $res->template_label));
-    }
-    ?>
-    <p>
-        <span><input type="radio"  class="check" onclick="javascript:show_templates(false);" name="e_file" id="load_file" value="N"  <?php  if ($_SESSION['m_admin']['doctypes']['is_generated'] == 'N') { echo 'checked="checked"';} ?>/><?php echo _LOADED_FILE;?></span>
-        <span><input type="radio" class="check" onclick="javascript:show_templates(true);" name="e_file" id="gen_file" value="Y"  <?php  if ($_SESSION['m_admin']['doctypes']['is_generated'] == 'Y') { echo 'checked="checked"';} ?> /><?php echo _GENERATED_FILE;?></span>
-    </p>
-    <div id="templates_div" style="display:<?php if($_SESSION['m_admin']['doctypes']['is_generated'] == 'Y'){ echo "block";}else{ echo "none";}?>">
-        <span><?php echo _CHOOSE_TEMPLATE;?> :</span>
-        <select name="templates" id="templates" >
-            <option value=""><?php echo _CHOOSE_TEMPLATE;?></option>
-            <?php
-                for ($i=0;$i<count($templates);$i++) {
-                    echo '<option value="'.$templates[$i]['id'].'" ';
-                    if ($_SESSION['m_admin']['doctypes']['template_id'] == $templates[$i]['id'] ) {
-                        echo 'selected="selected"';
-                    }
-                    echo '>'.$templates[$i]['label'].'</option>';
-                }
-            ?>
-        </select><span class="red_asterisk"><i class="fa fa-star"></i></span>
-    </div>
-    <?php
-} elseif ($_SESSION['service_tag'] == "doctype_info") {
-    if ($_REQUEST['e_file'] == "Y" && (empty($_REQUEST['templates']) || !isset($_REQUEST['templates']))) {
-        $_SESSION['error'] .= _MUST_CHOOSE_TEMPLATE;
-    } else if((empty($_REQUEST['templates']) || !isset($_REQUEST['templates']))) {
-        $_SESSION['m_admin']['doctypes']['template_id'] = '';
-    }
-    $_SESSION['m_admin']['doctypes']['is_generated'] = $_REQUEST['e_file'];
-    $_SESSION['m_admin']['doctypes']['template_id'] = $_REQUEST['templates'];
-
-} elseif ($_SESSION['service_tag'] == "doctype_updatedb") {
-    $db = new Database();
-    $stmt = $db->query("delete from ".$_SESSION['tablename']['temp_templates_doctype_ext']." where type_id = ? ",
-				array($_SESSION['m_admin']['doctypes']['TYPE_ID'])
-				);
-				
-    if (!empty($_SESSION['m_admin']['doctypes']['template_id']) && isset($_SESSION['m_admin']['doctypes']['template_id'])) {
-        $stmt = $db->query("insert into ".$_SESSION['tablename']['temp_templates_doctype_ext']." (type_id, is_generated, template_id) values (?, ?, ?) ",
-					array($_SESSION['m_admin']['doctypes']['TYPE_ID'], $_SESSION['m_admin']['doctypes']['is_generated'], $_SESSION['m_admin']['doctypes']['template_id'])
-				);
-    } else {
-        $stmt = $db->query("insert into ".$_SESSION['tablename']['temp_templates_doctype_ext']." (type_id, is_generated) values (?, ?) ",
-					array($_SESSION['m_admin']['doctypes']['TYPE_ID'], $_SESSION['m_admin']['doctypes']['is_generated'])
-				);
-    }
-    //$db->show();
-    //exit();
-} elseif ($_SESSION['service_tag'] == "doctype_insertdb") {
-    $db = new Database();
-    if (!empty($_SESSION['m_admin']['doctypes']['template_id']) && isset($_SESSION['m_admin']['doctypes']['template_id'])) {
-        $stmt = $db->query("insert into ".$_SESSION['tablename']['temp_templates_doctype_ext']." (type_id, is_generated, template_id) values (?, ?, ?) ",
-					array($_SESSION['m_admin']['doctypes']['TYPE_ID'], $_SESSION['m_admin']['doctypes']['is_generated'], $_SESSION['m_admin']['doctypes']['template_id'])
-				);
-    } else {
-        $stmt = $db->query("insert into ".$_SESSION['tablename']['temp_templates_doctype_ext']." (type_id, is_generated) values (?, ?) ",
-					array($_SESSION['m_admin']['doctypes']['TYPE_ID'], $_SESSION['m_admin']['doctypes']['is_generated'])
-				);
-    }
-} elseif ($_SESSION['service_tag'] == "doctype_delete") {
-    $db = new Database();
-    $stmt = $db->query("delete from ".$_SESSION['tablename']['temp_templates_doctype_ext']." where type_id = ? ",
-				 array($_SESSION['m_admin']['doctypes']['TYPE_ID'])
-			);
-}
diff --git a/modules/templates/xml/IVS/requests_definitions.xml b/modules/templates/xml/IVS/requests_definitions.xml
index 6ddb1460cb7f5e4626ecca39f4ef2386370a241e..27d986bbc0fb64a178d767c9de42480db7afd00e 100755
--- a/modules/templates/xml/IVS/requests_definitions.xml
+++ b/modules/templates/xml/IVS/requests_definitions.xml
@@ -32,11 +32,6 @@
         <parameter name="module" value="templates"/>
         <parameter name="display" value="true"/>
     </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="param_templates_doctypes" >
-        <parameter name="page" value="param_templates_doctypes"/>
-        <parameter name="module" value="templates"/>
-        <parameter name="display" value="false"/>
-    </requestDefinition>
     <requestDefinition method="GET" path="/apps/maarch_entreprise/index.php" validationRule="file_iframe" >
         <parameter name="page" value="file_iframe"/>
         <parameter name="module" value="templates"/>
diff --git a/modules/templates/xml/IVS/validation_rules.xml b/modules/templates/xml/IVS/validation_rules.xml
index 583ab9f78e5b50b60728b2856da4c8e3f4e8026a..397c173e75ef1e3913a58f82819dd8875fb03d28 100755
--- a/modules/templates/xml/IVS/validation_rules.xml
+++ b/modules/templates/xml/IVS/validation_rules.xml
@@ -49,12 +49,7 @@
     	<parameter name="template_id" type="document_id" />
     	<parameter name="module" type="identifier" />
     </validationRule>
-	<validationRule name="param_templates_doctypes" extends="standardForm" mode="error">
-    	<parameter name="templates" type="identifier" />
-    	<parameter name="e_file" type="YN" />
-    	<parameter name="module" type="identifier" />
-    </validationRule>
-    
+
     <validationRule name="file_iframe" extends="standardForm" mode="error">
     	<parameter name="model_id" type="integer" />
     	<parameter name="module" type="identifier" />
diff --git a/modules/templates/xml/services.xml b/modules/templates/xml/services.xml
index a390577b4461b144d6c186f9bbcb6f1ef0c12bcb..1931a482c9b31a753fe7f7e5aa517e3363e3fad0 100755
--- a/modules/templates/xml/services.xml
+++ b/modules/templates/xml/services.xml
@@ -16,42 +16,4 @@
      <nature>listelement</nature>
    </WHEREAMIUSED>
  </SERVICE>
- <SERVICE>
-   <id>param_templates_doctypes</id>
-   <name>_PARAM_TEMPLATES_DOCTYPES</name>
-   <comment>_PARAM_TEMPLATES_DOCTYPES_DESC</comment>
-   <servicepage>param_templates_doctypes.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-   <WHEREAMIUSED>
-        <page>doctype_up</page>
-        <nature>include</nature>
-    </WHEREAMIUSED>
-   <WHEREAMIUSED>
-        <page>doctype_info</page>
-        <nature>include</nature>
-    </WHEREAMIUSED>
-   <WHEREAMIUSED>
-        <page>doctype_load_db</page>
-        <nature>include</nature>
-    </WHEREAMIUSED>
-     <WHEREAMIUSED>
-        <page>doctype_del</page>
-        <nature>include</nature>
-    </WHEREAMIUSED>
- </SERVICE>
-  <SERVICE>
-   <id>doctype_template_use</id>
-   <name>_DOCTYPE_TEMPLATE_USE</name>
-   <comment>_DOCTYPE_TEMPLATE_USE_DESC</comment>
-   <servicepage>doctype_template_use.php</servicepage>
-   <servicetype>use</servicetype>
-   <system_service>true</system_service>
-   <enabled>true</enabled>
-    <WHEREAMIUSED>
-        <page>change_doctype.php</page>
-        <nature>include</nature>
-    </WHEREAMIUSED>
-   </SERVICE>
 </root>
diff --git a/sql/data_en.sql b/sql/data_en.sql
index 4f06f6ebdc46f6d4b7c93e604a32cf98e6ea33a0..5b4556490d31585fd8b2dcccca547642bbbbd045 100644
--- a/sql/data_en.sql
+++ b/sql/data_en.sql
@@ -44,13 +44,11 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'my_c
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'my_contacts_menu');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'create_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'update_contacts');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'reopen_mail');
+INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'update_status_mail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'view_technical_infos');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'view_full_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'edit_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'entities_print_sep_mlb');
@@ -71,7 +69,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'priv
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'tag_view');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', '_print_sep');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'physical_archive_print_sep_mlb');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'save_numeric_package');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'search_contacts');
@@ -80,8 +77,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'my_cont
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'update_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'update_list_diff_in_details');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'sendmail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'use_mail_services');
@@ -100,7 +95,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'config_
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'add_tag_to_res');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'private_tag');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'search_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'my_contacts');
@@ -109,8 +103,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER',
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'view_full_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'edit_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'edit_recipient_outside_process');
@@ -124,7 +116,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER',
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'add_tag_to_res');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'private_tag');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'search_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'my_contacts');
@@ -132,8 +123,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'm
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'update_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'edit_recipient_outside_process');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'update_list_diff_in_details');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'sendmail');
@@ -156,7 +145,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'a
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'add_tag_to_res');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'private_tag');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'search_contacts');
@@ -172,15 +160,13 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'my_contacts_menu');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'create_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'update_contacts');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'reopen_mail');
+INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'update_status_mail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'view_technical_infos');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'view_full_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'add_links');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_parameters');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_priorities');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'edit_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_baskets');
@@ -194,7 +180,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'use_mail_services');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'reports');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_reports');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'graphics_reports');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'edit_attachments_from_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'modify_attachments');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'delete_attachments');
@@ -215,7 +200,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'physical_archive_print_sep_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'physical_archive_batch_manage');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_life_cycle');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N2', 'admin');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N2', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N2', 'view_full_history');
@@ -230,7 +214,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'vi
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'sendmail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'avis_documents');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'export_seda_view');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('MAARCHTOGEC', 'save_numeric_package');
 
 -- Create DOCTYPES
diff --git a/sql/data_fr.sql b/sql/data_fr.sql
index a2c78b1add334c95e1d77349add40ec12078f489..039f367b177accb43000b827ea6e7501aebf90cd 100755
--- a/sql/data_fr.sql
+++ b/sql/data_fr.sql
@@ -47,13 +47,11 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'my_c
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'my_contacts_menu');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'create_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'update_contacts');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'reopen_mail');
+INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'update_status_mail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'view_technical_infos');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'view_full_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'edit_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'update_diffusion_indexing');
@@ -75,7 +73,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'priv
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'tag_view');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', '_print_sep');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'physical_archive_print_sep_mlb');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('COURRIER', 'save_numeric_package');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'search_contacts');
@@ -84,8 +81,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'my_cont
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'update_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'update_diffusion_indexing');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'update_diffusion_details');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'sendmail');
@@ -104,7 +99,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'config_
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'add_tag_to_res');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'private_tag');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('AGENT', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'search_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'my_contacts');
@@ -113,8 +107,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER',
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'view_full_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'edit_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'update_diffusion_indexing');
@@ -129,7 +121,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER',
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'add_tag_to_res');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'private_tag');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESP_COURRIER', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'search_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'my_contacts');
@@ -137,8 +128,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'm
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'update_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'add_links');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'update_diffusion_indexing');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'update_diffusion_details');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'sendmail');
@@ -162,7 +151,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'a
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'add_tag_to_res');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'private_tag');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('RESPONSABLE', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'adv_search_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'search_contacts');
@@ -178,15 +166,13 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'my_contacts_menu');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'create_contacts');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'update_contacts');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'reopen_mail');
+INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'update_status_mail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'view_technical_infos');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'view_full_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'add_links');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_parameters');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_priorities');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'print_details');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'print_doc_details_from_list');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'delete_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'edit_document_in_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_email_server');
@@ -202,7 +188,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'use_mail_services');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'reports');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_reports');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'graphics_reports');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'edit_attachments_from_detail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'modify_attachments');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'delete_attachments');
@@ -224,7 +209,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'physical_archive_print_sep_mlb');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'physical_archive_batch_manage');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'admin_life_cycle');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N1', 'notes_restriction');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N2', 'admin');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N2', 'view_doc_history');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ADMINISTRATEUR_N2', 'view_full_history');
@@ -239,7 +223,6 @@ INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'vi
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'sendmail');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'avis_documents');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'tag_view');
-INSERT INTO usergroups_services (group_id, service_id) VALUES ('ARCHIVISTE', 'export_seda_view');
 INSERT INTO usergroups_services (group_id, service_id) VALUES ('MAARCHTOGEC', 'save_numeric_package');
 
 -- Create DOCTYPES
diff --git a/src/app/resource/controllers/ResourceListController.php b/src/app/resource/controllers/ResourceListController.php
index 6f83a313706e823351de6a9cf995c7c65a22ff1a..18495d2bc3454d78fa5bb22c205a868dd502d8d4 100644
--- a/src/app/resource/controllers/ResourceListController.php
+++ b/src/app/resource/controllers/ResourceListController.php
@@ -1093,12 +1093,14 @@ class ResourceListController
             'groupBy'   => ['status']
         ]);
         foreach ($rawStatuses as $key => $value) {
-            $status = StatusModel::getById(['select' => ['label_status'], 'id' => $value['status']]);
-            $statuses[] = [
-                'id'        => $value['status'],
-                'label'     => empty($status['label_status']) ? '_UNDEFINED' : $status['label_status'],
-                'count'     => $value['count']
-            ];
+            if (!empty($value['status'])) {
+                $status = StatusModel::getById(['select' => ['label_status'], 'id' => $value['status']]);
+                $statuses[] = [
+                    'id'        => $value['status'],
+                    'label'     => empty($status['label_status']) ? '_UNDEFINED' : $status['label_status'],
+                    'count'     => $value['count']
+                ];
+            }
         }
 
         $entities = [];
diff --git a/src/core/lang/lang-en.php b/src/core/lang/lang-en.php
index 022ba8a35902f9bc6de388e32dfbecbe28be1397..2bb5072b104f29856b7c4f9baa49b2fa095815fc 100755
--- a/src/core/lang/lang-en.php
+++ b/src/core/lang/lang-en.php
@@ -207,7 +207,6 @@ define('_ADV_SEARCH_MLB', 'Search');
 define('_INDEXING_MLB', 'Save a mail/document');
 define('_SEARCH_CONTACTS', 'Search a contact');
 define('_WELCOME_TEXT_LOAD', 'Text loading of the home page');
-define('_QUICKLAUNCH', 'Short cut');
 define('_MY_CONTACTS', 'Create contacts from indexation/title');
 define('_MY_CONTACTS_MENU', 'My contacts');
 define('_CREATE_CONTACTS', 'All the contacts');
@@ -220,12 +219,9 @@ define('_VIEW_FULL_HISTORY_DESC', 'Read the full events history linked to the ut
 define('_DELETE_DOCUMENT_IN_DETAIL', 'Delete a document in detail page');
 define('_EDIT_DOCUMENT_IN_DETAIL', 'Edit a document in detail page');
 define('_EDIT_DOCUMENT_IN_DETAIL_DESC', 'Edit a document in detail page. Il will also depend on status setting (Index modification)');
-define('_PUT_DOC_ON_VALIDATION_FROM_DETAILS', 'Send the document for validation from the detailed page');
 define('_LOAD_STATUSES_SESSION', 'Load Status session');
 define('_PARAM_AVAILABLE_STATUS_ON_GROUP_BASKETS', 'Indexation status configuration');
 define('_ADD_LINKS', 'Add connection');
-define('_PRINT_DETAILS_SERVICE', 'Print the liaison sheet from the detail sheet');
-define('_PRINT_DOC_DETAILS_FROM_SEARCH', 'Print the liaison sheets from the search');
 define('_ATTACHMENTS_COMMENT', 'Attachments management');
 define('_BASKETS_COMMENT', 'Baskets');
 define('_ENTITIES_COMMENT', 'Departments');
@@ -254,11 +250,7 @@ define("_ATTACH_DOC_TO_FOLDER", "Attach a mail to a folder");
 define("_DELETE_FOLDER", "Delete a folder");
 define("_FREEZE_FOLDER", "Freeze the folder");
 define("_CLOSE_FOLDER", "Close the folder");
-define("_NOTES_RESTRICTION", "By default, limit the notes to your department");
-define('_MANAGE_NOTES', 'Manage notes');
 define('_REPORTS_DESC', 'States editions');
-define('_GRAPHICS_REPORTS', 'Graphics mode enabled');
-define('_GRAPHICS_REPORTS_DESC', 'Display graphical mode in reports');
 define("_USE_MAIL_SERVICES", "Use emails services as sender");
 define("_USE_MAIL_SERVICES_DESC", "Use emails services as sender");
 define("_TAG_DEFAULT", "Tag");
@@ -327,11 +319,6 @@ define('_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT', 'Send to the contact with a
 define('_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT_DESC', 'Open sendmail modal with email of contact linked to document in recipient, attachment is MANDATORY.');
 define('_SEND_ATTACHMENTS_TO_CONTACT', 'Send to the contact');
 define('_SEND_ATTACHMENTS_TO_CONTACT_DESC', 'Open sendmail modal with email of contact linked to document in recipient.');
-define("_VIEW_ATTACHMENTS", "View attachments");
-define("_VIEW_ATTACHMENTS_DESC", "View attachments");
-define("_MANAGE_ATTACHMENTS", "Manage the attachments");
-define("_INDEX_ATTACHMENT", "Index an attachment");
-define("_INDEX_ATTACHMENT_DESC", "Index an attachment");
 define("_CREATE_ATTACHMENTS_FROM_DETAILS", "Create attachments from details card");
 define("_MODIFY_ATTACHMENTS", "Modify attachments");
 define("_DELETE_ATTACHMENTS", "Delete attachments");
@@ -342,9 +329,7 @@ define("_CONFIG_AVIS_WORKFLOW_IN_DETAIL_DESC", "Allows to define the workflow di
 define("_AVIS_ANSWERS", "Give oneself's opinion");
 define("_AVIS_ANSWERS_DESC", "Allows to this group to appear in the counsellor's list (recommendation workflow)");
 define("_VIEW_BASKETS_DESC", "My baskets");
-define('_CHOOSE_ENTITY', 'Choose a department');
 define('_ENTITIES_PRINT_SEP_MLB', 'Print limiters by department/services');
-define("_EXPORT_SEDA_VIEW", "See message export");
 define("_SEND_DOCS_TO_RECOMMENDATION", "Sent a recommendation request (parallel)");
 define("_SEND_DOCS_TO_RECOMMENDATION_DESC", "Opens a modal to add or remove people to the opinion diffusion list.");
 define("_VALIDATE_RECOMMENDATION", 'Validate the recommendation request (parallel)');
diff --git a/src/core/lang/lang-fr.php b/src/core/lang/lang-fr.php
index 5323360354878020f44dcd9b1dc4cbe9022aef34..3fb06be477c4ee646dc6169e2d2e95e5b335c389 100755
--- a/src/core/lang/lang-fr.php
+++ b/src/core/lang/lang-fr.php
@@ -207,7 +207,6 @@ define('_ADV_SEARCH_MLB', 'Rechercher');
 define('_INDEXING_MLB', 'Enregistrer un courrier');
 define('_SEARCH_CONTACTS', 'Rechercher un contact');
 define('_WELCOME_TEXT_LOAD', "Chargement texte page d'accueil");
-define('_QUICKLAUNCH', 'Raccourcis');
 define('_MY_CONTACTS', 'Créer des contacts depuis indexation/qualification');
 define('_MY_CONTACTS_MENU', 'Mes contacts');
 define('_CREATE_CONTACTS', 'Tous les contacts');
@@ -220,12 +219,9 @@ define('_VIEW_FULL_HISTORY_DESC', "Consulter l'historique complet des événemen
 define('_DELETE_DOCUMENT_IN_DETAIL', 'Supprimer un document dans la fiche détaillée');
 define('_EDIT_DOCUMENT_IN_DETAIL', 'Modifier un document dans la fiche détaillée');
 define('_EDIT_DOCUMENT_IN_DETAIL_DESC', 'Modifier un document dans la fiche détaillée. Cela dépendra aussi du paramétrage du statut (Modification des index)');
-define('_PUT_DOC_ON_VALIDATION_FROM_DETAILS', 'Envoyer le document en validation depuis la page détails');
 define('_LOAD_STATUSES_SESSION', 'Chargement des status en session');
 define('_PARAM_AVAILABLE_STATUS_ON_GROUP_BASKETS', "Paramétrage des status d'indexation");
 define('_ADD_LINKS', 'Ajouter des liaisons');
-define('_PRINT_DETAILS_SERVICE', 'Imprimer la fiche de liaison depuis la fiche détail');
-define('_PRINT_DOC_DETAILS_FROM_SEARCH', 'Imprimer les fiches de liaison depuis la recherche');
 define('_ATTACHMENTS_COMMENT', 'Gestion des pièces jointes');
 define('_BASKETS_COMMENT', 'Bannettes');
 define('_ENTITIES_COMMENT', 'Entités');
@@ -254,11 +250,7 @@ define("_ATTACH_DOC_TO_FOLDER", "Rattacher un courrier à un dossier");
 define("_DELETE_FOLDER", "Supprimer un dossier");
 define("_FREEZE_FOLDER", "Geler le dossier");
 define("_CLOSE_FOLDER", "Clôturer le dossier");
-define("_NOTES_RESTRICTION", "Restreindre par défaut les annotations à votre entité");
-define("_MANAGE_NOTES", "Gérer les annotations");
 define('_REPORTS_DESC', 'Editions des états');
-define('_GRAPHICS_REPORTS', 'Activer l\'affichage graphique');
-define('_GRAPHICS_REPORTS_DESC', 'Voir le graphique sur l\'écran de statistique');
 define("_USE_MAIL_SERVICES", "Utiliser les courriels de ses services en tant qu'expéditeur");
 define("_USE_MAIL_SERVICES_DESC", "Utiliser les courriels de ses services en tant qu'expéditeur");
 define("_TAG_DEFAULT", "Mot-clé");
@@ -327,11 +319,6 @@ define('_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT', 'Envoyer au contact avec un
 define('_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT_DESC', "Ouvre une modal d'envoi de mail avec l'email du contact associé au courrier en tant que destinataire, présence OBLIGATOIRE de pièce(s) jointe(s) à l'envoi.");
 define('_SEND_ATTACHMENTS_TO_CONTACT', 'Envoyer au contact avec accusé de réception');
 define('_SEND_ATTACHMENTS_TO_CONTACT_DESC', "Ouvre une modal d'envoi de mail avec l'email du contact associé au courrier en tant que destinataire.");
-define("_VIEW_ATTACHMENTS", "Voir les pièces jointes");
-define("_VIEW_ATTACHMENTS_DESC", "Voir les pièces jointes");
-define("_MANAGE_ATTACHMENTS", "Gérer les pièces jointes");
-define("_INDEX_ATTACHMENT", "Indexer une pièce jointe");
-define("_INDEX_ATTACHMENT_DESC", "Indexer une pièce jointe");
 define("_CREATE_ATTACHMENTS_FROM_DETAILS", "Créer des pièces jointes depuis la fiche détail");
 define("_MODIFY_ATTACHMENTS", "Modifier les pièces jointes");
 define("_DELETE_ATTACHMENTS", "Supprimer les pièces jointes");
@@ -342,9 +329,7 @@ define("_CONFIG_AVIS_WORKFLOW_IN_DETAIL_DESC", "Permet de définir le circuit di
 define("_AVIS_ANSWERS", "Donner son avis");
 define("_AVIS_ANSWERS_DESC", "Permet à ce groupe d'apparaître dans la liste des personnes Conseillers (circuit d'avis)");
 define("_VIEW_BASKETS_DESC", "Mes bannettes");
-define('_CHOOSE_ENTITY', 'Choisissez une entité');
 define('_ENTITIES_PRINT_SEP_MLB', 'Impression des séparateurs');
-define('_EXPORT_SEDA_VIEW', 'Voir le bordereau');
 define('_SEND_DOCS_TO_RECOMMENDATION', 'Envoyer une demande d\'avis (parallèle)');
 define('_SEND_DOCS_TO_RECOMMENDATION_DESC', 'Ouvre une modal permettant d\'ajouter ou de supprimer des personnes en avis dans la liste de diffusion.');
 define('_VALIDATE_RECOMMENDATION', 'Valider la demande d\'avis (parallèle)');
diff --git a/src/core/lang/lang-nl.php b/src/core/lang/lang-nl.php
index 79dea8710dc8a2a2c5689fbcd41c38d2f2f6913b..48a82099710a1b10563c0c20b6ce8fb52018a089 100755
--- a/src/core/lang/lang-nl.php
+++ b/src/core/lang/lang-nl.php
@@ -206,7 +206,6 @@ define('_ADV_SEARCH_MLB', 'Opzoeken');
 define('_INDEXING_MLB', 'Een brief/doc bewaren');
 define('_SEARCH_CONTACTS', 'Een contact zoeken');
 define('_WELCOME_TEXT_LOAD', 'Laden van tekst homepage');
-define('_QUICKLAUNCH', 'Sneltoetsen');
 define('_MY_CONTACTS', 'Contacten aanmaken vanuit indexering/kwalificering');
 define('_MY_CONTACTS_MENU', 'Mijn contacten');
 define('_CREATE_CONTACTS', 'Alle contacten');
@@ -219,12 +218,9 @@ define('_VIEW_FULL_HISTORY_DESC', 'De volledige geschiedenis van de evenementen
 define('_DELETE_DOCUMENT_IN_DETAIL', 'Een document in de gedetailleerde fiche verwijderen');
 define('_EDIT_DOCUMENT_IN_DETAIL', 'Een document in de gedetailleerde fiche wijzigen');
 define('_EDIT_DOCUMENT_IN_DETAIL_DESC', 'Een document in de gedetailleerde fiche wijzigen Dat zal ook van de instelling van de status afhangen (Wijziging van de indexen)');
-define('_PUT_DOC_ON_VALIDATION_FROM_DETAILS', 'Het te bevestigen document vanuit de detailpagina verzenden');
 define('_LOAD_STATUSES_SESSION', 'Laden van statussen in sessie');
 define('_PARAM_AVAILABLE_STATUS_ON_GROUP_BASKETS', 'Instelling van de indexeringsstatussen');
 define('_ADD_LINKS', 'Verbindingen toevoegen');
-define('_PRINT_DETAILS_SERVICE', 'De verbindingsfiche vanuit de detailfiche afdrukken');
-define('_PRINT_DOC_DETAILS_FROM_SEARCH', 'De verbindingsfiche vanuit de zoekopdracht afdrukken');
 define('_ATTACHMENTS_COMMENT', 'Beheer van de bijlagen');
 define('_BASKETS_COMMENT', 'Bakjes');
 define('_ENTITIES_COMMENT', 'Eenheden');
@@ -253,11 +249,7 @@ define('_ATTACH_DOC_TO_FOLDER', 'Een mail aan een map koppelen');
 define('_DELETE_FOLDER', 'Een map verwijderen');
 define('_FREEZE_FOLDER', 'De map blokkeren');
 define('_CLOSE_FOLDER', 'De map afsluiten');
-define('_NOTES_RESTRICTION', 'De standaardopmerkingen tot uw eenheid beperken');
-define('_MANAGE_NOTES', 'De opmerkingen beheren');
 define('_REPORTS_DESC', 'Bewerkingen van de statussen');
-define('_GRAPHICS_REPORTS', 'De grafische weergave activeren');
-define('_GRAPHICS_REPORTS_DESC', 'De grafiek op het statistiekscherm bekijken');
 define('_USE_MAIL_SERVICES', 'De e-mails van zijn diensten gebruiken als verzender');
 define('_USE_MAIL_SERVICES_DESC', 'De e-mails van zijn diensten gebruiken als verzender');
 define('_TAG_DEFAULT', 'Sleutelwoord');
@@ -325,11 +317,6 @@ define('_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT', 'Verzenden naar het contact
 define('_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT_DESC', 'Opent een mailverzendingsmodaliteit met de e-mail van het aan het document gekoppelde contact als bestemmeling, VERPLICHTE aanwezigheid van bijlage(n) aan de verzending.');
 define('_SEND_ATTACHMENTS_TO_CONTACT', 'Verzenden aan het contact');
 define('_SEND_ATTACHMENTS_TO_CONTACT_DESC', 'Opent een mailverzendingsmodaliteit met de e-mail van het aan het document gekoppelde contact als bestemmeling.');
-define('_VIEW_ATTACHMENTS', 'De bijlagen bekijken');
-define('_VIEW_ATTACHMENTS_DESC', 'De bijlagen bekijken');
-define('_MANAGE_ATTACHMENTS', 'De bijlagen beheren');
-define('_INDEX_ATTACHMENT', 'Een bijlage indexeren');
-define('_INDEX_ATTACHMENT_DESC', 'Een bijlage indexeren');
 define('_CREATE_ATTACHMENTS_FROM_DETAILS', 'Bijlagen vanuit de detailfiche aanmaken');
 define('_MODIFY_ATTACHMENTS', 'De bijlagen wijzigen');
 define('_DELETE_ATTACHMENTS', 'De bijlagen verwijderen');
@@ -340,9 +327,7 @@ define('_CONFIG_AVIS_WORKFLOW_IN_DETAIL_DESC', 'Om het circuit rechtstreeks vanu
 define('_AVIS_ANSWERS', 'Zijn mening geven');
 define('_AVIS_ANSWERS_DESC', 'Laat deze groep verschijnen in de lijst van de Consultants (berichtencircuit)');
 define('_VIEW_BASKETS_DESC', 'Mijn bakjes');
-define('_CHOOSE_ENTITY', 'Kies een eenheid');
 define('_ENTITIES_PRINT_SEP_MLB', 'De separatoren per dienst afdrukken');
-define('_EXPORT_SEDA_VIEW', 'Zie het borderel');
 define('_SEND_DOCS_TO_RECOMMENDATION', 'Een (parallelle) berichtenvraag verzenden');
 define('_SEND_DOCS_TO_RECOMMENDATION_DESC', 'Opent een modaliteit die toelaat personen in het bericht, in de verdelingslijst toe te voegen of te verwijderen.');
 define('_VALIDATE_RECOMMENDATION', 'Een (parallelle) berichtenvraag bevestigen');
diff --git a/src/frontend/app/administration/privilege/privileges.ts b/src/frontend/app/administration/privilege/privileges.ts
new file mode 100644
index 0000000000000000000000000000000000000000..94bfd4d34c2fd94a881bce01f0e8cd2937e13079
--- /dev/null
+++ b/src/frontend/app/administration/privilege/privileges.ts
@@ -0,0 +1,438 @@
+export const PRIVILEGES = [
+    //MENU
+    {
+        "id"        : "admin",
+        "label"     : "_ADMIN",
+        "comment"   : "_ADMIN",
+        "route"     : "/administration",
+        "type"      : "menu",
+        "style"     : "fa fa-cogs",
+        "angular"   : true
+    },
+    {
+        "id"        : "adv_search_mlb",
+        "label"     : "_ADV_SEARCH_MLB",
+        "comment"   : "_ADV_SEARCH_MLB",
+        "route"     : "index.php?page=search_adv&amp;dir=indexing_searching",
+        "type"      : "menu",
+        "style"     : "fa fa-search",
+        "angular"   : false
+    },
+    {
+        "id"        : "entities_print_sep_mlb",
+        "label"     : "_ENTITIES_PRINT_SEP_MLB",
+        "comment"   : "_ENTITIES_PRINT_SEP_MLB",
+        "route"     : "/separators/print",
+        "type"      : "menu",
+        "style"     : "fa fa-print",
+        "angular"   : true
+    },
+    {
+        "id"        : "reports",
+        "label"     : "_REPORTS",
+        "comment"   : "_REPORTS_DESC",
+        "route"     : "index.php?page=reports&amp;module=reports",
+        "type"      : "menu",
+        "style"     : "fa fa-chart-area",
+        "angular"   : false
+    },
+    {
+        "id"        : "save_numeric_package",
+        "label"     : "_SAVE_NUMERIC_PACKAGE",
+        "comment"   : "_SAVE_NUMERIC_PACKAGE",
+        "route"     : "/saveNumericPackage",
+        "type"      : "menu",
+        "style"     : "fa fa-file-archive",
+        "angular"   : true
+    },
+    //ADMINISTRATION
+    {
+        "id"        : "admin_users",
+        "label"     : "_USERS",
+        "comment"   : "_ADMIN_USERS_DESC",
+        "route"     : "/administration/users",
+        "type"      : "admin",
+        "unit"      : "organisation",
+        "style"     : "fa fa-user",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_groups",
+        "label"     : "_GROUPS",
+        "comment"   : "_ADMIN_GROUPS_DESC",
+        "route"     : "/administration/groups",
+        "type"      : "admin",
+        "unit"      : "organisation",
+        "style"     : "fa fa-users",
+        "angular"   : true
+    },
+    {
+        "id"        : "manage_entities",
+        "label"     : "_ENTITIES",
+        "comment"   : "_MANAGE_ENTITIES_DESC",
+        "route"     : "/administration/entities",
+        "type"      : "admin",
+        "unit"      : "organisation",
+        "style"     : "fa fa-sitemap",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_listmodels",
+        "label"     : "_LISTMODELS_WORKFLOW",
+        "comment"   : "_MANAGE_LISTMODELS_WORKFLOW_DESC",
+        "route"     : "/administration/diffusionModels",
+        "type"      : "admin",
+        "unit"      : "organisation",
+        "style"     : "fa fa-th-list",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_architecture",
+        "label"     : "_DOCTYPES",
+        "comment"   : "_ADMIN_DOCTYPES_DESC",
+        "route"     : "/administration/doctypes",
+        "type"      : "admin",
+        "unit"      : "classement",
+        "style"     : "fa fa-suitcase",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_tag",
+        "label"     : "_TAGS",
+        "comment"   : "_ADMIN_TAGS_DESC",
+        "route"     : "index.php?page=manage_tag_list_controller&amp;module=tags",
+        "type"      : "admin",
+        "unit"      : "classement",
+        "style"     : "fa fa-tags",
+        "angular"   : false
+    },
+    {
+        "id"        : "admin_baskets",
+        "label"     : "_BASKETS",
+        "comment"   : "_ADMIN_BASKETS_DESC",
+        "route"     : "/administration/baskets",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-inbox",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_status",
+        "label"     : "_STATUSES",
+        "comment"   : "_ADMIN_STATUSES_DESC",
+        "route"     : "/administration/statuses",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-check-circle",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_actions",
+        "label"     : "_ACTIONS",
+        "comment"   : "_ADMIN_ACTIONS_DESC",
+        "route"     : "/administration/actions",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-exchange-alt",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_contacts",
+        "label"     : "_CONTACTS",
+        "comment"   : "_ADMIN_CONTACTS_DESC",
+        "route"     : "index.php?page=admin_contacts&amp;admin=contacts",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-book",
+        "angular"   : false
+    },
+    {
+        "id"        : "admin_priorities",
+        "label"     : "_PRIORITIES",
+        "comment"   : "_PRIORITIES",
+        "route"     : "/administration/priorities",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-clock",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_templates",
+        "label"     : "_TEMPLATES",
+        "comment"   : "_ADMIN_TEMPLATES_DESC",
+        "route"     : "/administration/templates",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-file-alt",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_indexing_models",
+        "label"     : "_ADMIN_INDEXING_MODELS",
+        "comment"   : "_ADMIN_INDEXING_MODELS",
+        "route"     : "/administration/indexingModels",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-wpforms",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_custom_fields",
+        "label"     : "_ADMIN_CUSTOM_FIELDS",
+        "comment"   : "_ADMIN_CUSTOM_FIELDS",
+        "route"     : "/administration/customFields",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-code",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_notif",
+        "label"     : "_NOTIFICATIONS",
+        "comment"   : "_ADMIN_NOTIFICATIONS_DESC",
+        "route"     : "/administration/notifications",
+        "type"      : "admin",
+        "unit"      : "production",
+        "style"     : "fa fa-bell",
+        "angular"   : true
+    },
+    {
+        "id"        : "update_status_mail",
+        "label"     : "_UPDATE_STATUS_MAIL",
+        "comment"   : "_UPDATE_STATUS_MAIL",
+        "route"     : "/administration/update-status",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-envelope-square",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_docservers",
+        "label"     : "_DOCSERVERS",
+        "comment"   : "_ADMIN_DOCSERVERS_DESC",
+        "route"     : "/administration/docservers",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-hdd",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_parameters",
+        "label"     : "_PARAMETERS",
+        "comment"   : "_PARAMETERS",
+        "route"     : "/administration/parameters",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-wrench",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_password_rules",
+        "label"     : "_SECURITIES",
+        "comment"   : "_SECURITIES",
+        "route"     : "/administration/securities",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-lock",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_email_server",
+        "label"     : "_EMAILSERVER_PARAM",
+        "comment"   : "_EMAILSERVER_PARAM_DESC",
+        "route"     : "/administration/sendmail",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-mail-bulk",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_shippings",
+        "label"     : "_MAILEVA_ADMIN",
+        "comment"   : "_MAILEVA_ADMIN_DESC",
+        "route"     : "/administration/shippings",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-shipping-fast",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_reports",
+        "label"     : "_REPORTS",
+        "comment"   : "_ADMIN_REPORTS_DESC",
+        "route"     : "/administration/reports",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-chart-area",
+        "angular"   : true
+    },
+    {
+        "id"        : "view_history",
+        "label"     : "_HISTORY",
+        "comment"   : "_ADMIN_HISTORY_DESC",
+        "route"     : "/administration/history",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-history",
+        "angular"   : true
+    },
+    {
+        "id"        : "view_history_batch",
+        "label"     : "_HISTORY_BATCH",
+        "comment"   : "_ADMIN_HISTORY_BATCH_DESC",
+        "route"     : "/administration/history",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-history",
+        "angular"   : true
+    },
+    {
+        "id"        : "admin_update_control",
+        "label"     : "_UPDATE_CONTROL",
+        "comment"   : "_ADMIN_UPDATE_CONTROL_DESC",
+        "route"     : "/administration/versions-update",
+        "type"      : "admin",
+        "unit"      : "supervision",
+        "style"     : "fa fa-sync",
+        "angular"   : true
+    },
+    //USE
+    {
+        "id"        : "view_doc_history",
+        "label"     : "_VIEW_DOC_HISTORY",
+        "comment"   : "_VIEW_HISTORY_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "view_full_history",
+        "label"     : "_VIEW_FULL_HISTORY",
+        "comment"   : "_VIEW_FULL_HISTORY_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "edit_document_in_detail",
+        "label"     : "_EDIT_DOCUMENT_IN_DETAIL",
+        "comment"   : "_EDIT_DOCUMENT_IN_DETAIL_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "delete_document_in_detail",
+        "label"     : "_DELETE_DOCUMENT_IN_DETAIL",
+        "comment"   : "_DELETE_DOCUMENT_IN_DETAIL",
+        "type"      : "use"
+    },
+    {
+        "id"        : "manage_tags_application",
+        "label"     : "_MANAGE_TAGS_IN_APPLICATION",
+        "comment"   : "_MANAGE_TAGS_IN_APPLICATION_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "update_diffusion_indexing",
+        "label"     : "_UPDATE_DIFFUSION_WHILE_INDEXING",
+        "comment"   : "_UPDATE_DIFFUSION_WHILE_INDEXING",
+        "type"      : "use"
+    },
+    {
+        "id"        : "update_diffusion_except_recipient_indexing",
+        "label"     : "_UPDATE_DIFFUSION_EXCEPT_RECIPIENT_WHILE_INDEXING",
+        "comment"   : "_UPDATE_DIFFUSION_EXCEPT_RECIPIENT_WHILE_INDEXING",
+        "type"      : "use"
+    },
+    {
+        "id"        : "update_diffusion_details",
+        "label"     : "_UPDATE_DIFFUSION_WHILE_DETAILS",
+        "comment"   : "_UPDATE_DIFFUSION_WHILE_DETAILS",
+        "type"      : "use"
+    },
+    {
+        "id"        : "update_diffusion_except_recipient_details",
+        "label"     : "_UPDATE_DIFFUSION_EXCEPT_RECIPIENT_WHILE_DETAILS",
+        "comment"   : "_UPDATE_DIFFUSION_EXCEPT_RECIPIENT_WHILE_DETAILS",
+        "type"      : "use"
+    },
+    {
+        "id"        : "sendmail",
+        "label"     : "_SENDMAIL_COMMENT",
+        "comment"   : "_SENDMAIL_COMMENT",
+        "type"      : "use"
+    },
+    {
+        "id"        : "use_mail_services",
+        "label"     : "_USE_MAIL_SERVICES",
+        "comment"   : "_USE_MAIL_SERVICES_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "view_documents_with_notes",
+        "label"     : "_VIEW_DOCUMENTS_WITH_NOTES",
+        "comment"   : "_VIEW_DOCUMENTS_WITH_NOTES_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "view_technical_infos",
+        "label"     : "_VIEW_TECHNICAL_INFORMATIONS",
+        "comment"   : "_VIEW_TECHNICAL_INFORMATIONS",
+        "type"      : "use"
+    },
+    {
+        "id"        : "config_avis_workflow",
+        "label"     : "_CONFIG_AVIS_WORKFLOW",
+        "comment"   : "_CONFIG_AVIS_WORKFLOW_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "config_avis_workflow_in_detail",
+        "label"     : "_CONFIG_AVIS_WORKFLOW_IN_DETAIL",
+        "comment"   : "_CONFIG_AVIS_WORKFLOW_IN_DETAIL_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "avis_documents",
+        "label"     : "_AVIS_ANSWERS",
+        "comment"   : "_AVIS_ANSWERS_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "config_visa_workflow",
+        "label"     : "_CONFIG_VISA_WORKFLOW",
+        "comment"   : "_CONFIG_VISA_WORKFLOW_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "config_visa_workflow_in_detail",
+        "label"     : "_CONFIG_VISA_WORKFLOW_IN_DETAIL",
+        "comment"   : "_CONFIG_VISA_WORKFLOW_IN_DETAIL_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "visa_documents",
+        "label"     : "_VISA_ANSWERS",
+        "comment"   : "_VISA_ANSWERS_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "sign_document",
+        "label"     : "_SIGN_DOCS",
+        "comment"   : "_SIGN_DOCS",
+        "type"      : "use"
+    },
+    {
+        "id"        : "modify_visa_in_signatureBook",
+        "label"     : "_MODIFY_VISA_IN_SIGNATUREBOOK",
+        "comment"   : "_MODIFY_VISA_IN_SIGNATUREBOOK_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "use_date_in_signBlock",
+        "label"     : "_USE_DATE_IN_SIGNBLOCK",
+        "comment"   : "_USE_DATE_IN_SIGNBLOCK_DESC",
+        "type"      : "use"
+    },
+    {
+        "id"        : "print_folder_doc",
+        "label"     : "_PRINT_FOLDER_DOC",
+        "comment"   : "_PRINT_FOLDER_DOC",
+        "type"      : "use"
+    }
+];