diff --git a/module/forms/anc_parametrage/anc_parametrage_anc_entreprise.json b/module/forms/anc_parametrage/anc_parametrage_anc_entreprise.json
index 27f8a47c00c14ad16617f92841e2317d1af2b5da..c09edf1e1eff68046dae39dca4db31a3b77ae811 100755
--- a/module/forms/anc_parametrage/anc_parametrage_anc_entreprise.json
+++ b/module/forms/anc_parametrage/anc_parametrage_anc_entreprise.json
@@ -23,12 +23,12 @@
                 "fields":[
                     {
                         "type":"label",
-                        "name":"id_com",
+                        "name":"commune",
                         "label":"Commune",
                         "disabled":false,
                         "required":false,
                         "nb_cols":6,
-                        "id":"id_com_2_1"
+                        "id":"commune_2_1"
                     },
                     {
                         "type":"label",
@@ -343,7 +343,7 @@
                     "label":"Tab 0",
                     "elements":[
                         "id_parametre_entreprises",
-                        "id_com",
+                        "commune",
                         "siret",
                         "raison_sociale",
                         "nom_entreprise",
@@ -382,8 +382,8 @@
             {
                 "fields":[
                     {
-                        "type":"select",
-                        "name":"id_com",
+                        "type":"editable_select",
+                        "name":"commune",
                         "label":"Commune",
                         "required":false,
                         "nb_cols":4,
@@ -395,8 +395,8 @@
                             "distinct":"true",
                             "label_key":"nom",
                             "order_by":"nom",
-                            "id_key":"id_com",
-                            "attributs":"id_com|nom"
+                            "id_key":"nom",
+                            "attributs":"nom"
                         }
                     },
                     {
@@ -454,7 +454,7 @@
                     "label":"Tab 0",
                     "elements":[
                         "search_button",
-                        "id_com",
+                        "commune",
                         "raison_sociale",
                         "nom_entreprise"
                     ]
@@ -472,22 +472,22 @@
             {
                 "fields":[
                     {
-                        "type":"select",
-                        "name":"id_com",
+                        "type":"editable_select",
+                        "name":"commune",
                         "label":"Commune",
                         "required":true,
                         "nb_cols":6,
-                        "id":"id_com_2_1",
+                        "id":"commune_2_1",
                         "datasource":{
                             "datasource_id":"datasource_1",
                             "sort_order":"ASC",
                             "distinct":"true",
                             "label_key":"nom",
                             "order_by":"nom",
-                            "id_key":"id_com",
-                            "attributs":"id_com|nom"
+                            "id_key":"nom",
+                            "attributs":"nom"
                         },
-                        "id_from":"id_com_2_1_from"
+                        "id_from":"commune_2_1_from"
                     },
                     {
                         "type":"text",
@@ -830,7 +830,7 @@
                 {
                     "label":"Tab 0",
                     "elements":[
-                        "id_com",
+                        "commune",
                         "siret",
                         "raison_sociale",
                         "nom_entreprise",
@@ -876,22 +876,22 @@
             {
                 "fields":[
                     {
-                        "type":"select",
-                        "name":"id_com",
+                        "type":"editable_select",
+                        "name":"commune",
                         "label":"Commune",
                         "required":true,
                         "nb_cols":6,
-                        "id":"id_com_2_1",
+                        "id":"commune_2_1",
                         "datasource":{
                             "datasource_id":"datasource_1",
                             "sort_order":"ASC",
                             "distinct":"true",
                             "label_key":"nom",
                             "order_by":"nom",
-                            "id_key":"id_com",
-                            "attributs":"id_com|nom"
+                            "id_key":"nom",
+                            "attributs":"nom"
                         },
-                        "id_from":"id_com_2_1_from"
+                        "id_from":"commune_2_1_from"
                     },
                     {
                         "type":"text",
@@ -1283,7 +1283,7 @@
                     "label":"Tab 0",
                     "elements":[
                         "id_parametre_entreprises",
-                        "id_com",
+                        "commune",
                         "siret",
                         "raison_sociale",
                         "nom_entreprise",
@@ -1316,7 +1316,7 @@
         "datasource_1":{
             "type":"web_service",
             "dataType":"tableValue",
-            "name":"id_com",
+            "name":"commune",
             "description":"",
             "parameters":{
                 "schema":"s_cadastre",
@@ -1326,4 +1326,4 @@
             "id":"datasource_1"
         }
     }
-}
\ No newline at end of file
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_controle.json b/module/forms/anc_saisie/anc_saisie_anc_controle.json
index 6f4fa16695ddb530d05b96b0afd051e90ff578b7..ca3dfbd509fe2e45eb39b93950522b3ccdbabf70 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_controle.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_controle.json
@@ -1379,7 +1379,7 @@
                         "name":"car_prof_app",
                         "label":"Profondeur d’apparition en cm",
                         "disabled":false,
-                        "required":true,
+                        "required":false,
                         "nb_cols":6,
                         "id":"car_prof_app_25_1",
                         "visible": false
@@ -2413,7 +2413,7 @@
                         "name":"car_prof_app",
                         "label":"Profondeur d’apparition en cm",
                         "disabled":false,
-                        "required":true,
+                        "required":false,
                         "nb_cols":6,
                         "id":"car_prof_app_25_1",
                         "visible": false
diff --git a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json
index fcfab0b96824f32f560ca514b8bdac606ca9fe9d..063c5402c4ad172a2c5780b7e44497a5dfc14588 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json
@@ -521,7 +521,7 @@
         "nb_cols":12,
         "javascript":false,
         "rows":[
-            
+
         ]
     },
     "insert":{
@@ -816,24 +816,19 @@
             {
                 "fields":[
                     {
-                        "type":"radio",
+                        "type":"select",
                         "name":"evac_is_type_effl",
                         "label":"Type d'effluent",
                         "nb_cols":4,
                         "id":"evac_is_type_effl_16_1",
-                        "options":{
-                            "choices":[
-                                {
-                                    "label":"Oui",
-                                    "value":true,
-                                    "$$hashKey":"object:39384"
-                                },
-                                {
-                                    "label":"Non",
-                                    "value":false,
-                                    "$$hashKey":"object:39385"
-                                }
-                            ]
+                        "datasource":{
+                            "datasource_id":"datasource_12",
+                            "sort_order":"ASC",
+                            "distinct":"true",
+                            "label_key":"alias",
+                            "order_by":"alias",
+                            "id_key":"valeur",
+                            "attributs":"valeur|alias"
                         }
                     },
                     {
@@ -1636,24 +1631,19 @@
             {
                 "fields":[
                     {
-                        "type":"radio",
+                        "type":"select",
                         "name":"evac_is_type_effl",
                         "label":"Type d'effluent",
                         "nb_cols":4,
                         "id":"evac_is_type_effl_16_1",
-                        "options":{
-                            "choices":[
-                                {
-                                    "label":"Oui",
-                                    "value":true,
-                                    "$$hashKey":"object:35340"
-                                },
-                                {
-                                    "label":"Non",
-                                    "value":false,
-                                    "$$hashKey":"object:35341"
-                                }
-                            ]
+                        "datasource":{
+                            "datasource_id":"datasource_12",
+                            "sort_order":"ASC",
+                            "distinct":"true",
+                            "label_key":"alias",
+                            "order_by":"alias",
+                            "id_key":"valeur",
+                            "attributs":"valeur|alias"
                         }
                     },
                     {
@@ -2358,6 +2348,19 @@
             },
             "ressource_id":"vitis/genericquerys",
             "id":"datasource_11"
+        },
+        "datasource_12":{
+            "type":"web_service",
+            "dataType":"tableValue",
+            "name":"evac_is_type_effl",
+            "description":"",
+            "parameters":{
+                "schema":"s_anc",
+                "table":"param_liste",
+                "filter": {"id_nom_table": "evacuation_eaux", "nom_liste": "evac_is_type_effl"}
+            },
+            "ressource_id":"vitis/genericquerys",
+            "id":"datasource_12"
         }
     }
-}
\ No newline at end of file
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_rapport.js b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_rapport.js
new file mode 100644
index 0000000000000000000000000000000000000000..3b66a04d1f5b8996a3fa96db090cd9c3c10b19a8
--- /dev/null
+++ b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_rapport.js
@@ -0,0 +1,149 @@
+
+var $q = angular.element(vitisApp.appMainDrtv).injector().get(['$q']);
+var $log = angular.element(vitisApp.appMainDrtv).injector().get(['$log']);
+var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(['envSrvc']);
+var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(['propertiesSrvc']);
+
+/**
+ * constructor_form
+ * Function called by form init only if javascript boolean is Equal true
+ * @param {type} scope Scope who contain the formreader
+ * @param {type} s_url URL of file for destructor
+ * @returns {undefined}
+ */
+var constructor_form = function (scope, s_url) {
+    console.log("Constructor Rapports");
+
+    var sBoId;
+    console.log("propertiesSrvc: ", propertiesSrvc);
+    if (angular.isDefined(propertiesSrvc)) {
+        if (angular.isDefined(propertiesSrvc['anc'])) {
+            if (angular.isDefined(propertiesSrvc['anc']['controle'])) {
+                if (angular.isDefined(propertiesSrvc['anc']['controle']['business_object_id'])) {
+                    sBoId = propertiesSrvc['anc']['controle']['business_object_id'];
+                }
+            }
+        }
+    }
+
+    getReportsArray(sBoId).then(function(aPrintReports){
+        console.log("aPrintReports: ", aPrintReports);
+
+        if (typeof aPrintReports !== 'object') {
+            aPrintReports = [];
+        }
+
+        var sHTMLList = getReportsListAsHTML(aPrintReports);
+        $('#anc_saisie_controle_rapports_list_container').parent().html(sHTMLList);
+    });
+};
+
+/**
+ * destructor_form
+ * Function called before constructor_form of a new form to remove all the watchers, variables, and others objects useless for others forms
+ * @returns {undefined}
+ */
+var destructor_form = function () {
+    console.log("Destructor Rapports");
+};
+
+/**
+ * Download the BO reports list
+ * @param  {string} business_object_id
+ * @return {promise}
+ */
+var getReportsArray = function(sBoId) {
+    $log.info('getReportsArray');
+
+    var deferred = $q.defer();
+
+    if (!angular.isDefined(sBoId) || sBoId == '') {
+        console.error('Objet métier non configuré');
+        deferred.resolve([]);
+    } else {
+
+        // Récupère la liste des rapports disponibles
+        ajaxRequest({
+            'method': 'GET',
+            'url': propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + '/vmap/printreports',
+            'headers': {
+                'Accept': 'application/x-vm-json'
+            },
+            'params': {
+                'attributs': 'name|printreport_id|business_object_id|business_object_id_field|multiobject',
+                'filter': {
+                    "column": "business_object_id",
+                    "compare_operator": "=",
+                    "value": sBoId
+                }
+            },
+            'success': function (response) {
+                if (!angular.isDefined(response['data'])) {
+                    console.error('response.data undefined: ', response);
+                    deferred.resolve([]);
+                    return 0;
+                }
+                if (!angular.isDefined(response['data']['data'])) {
+                    console.error('Aucun rapport disponible pour ' + sBoId);
+                    deferred.resolve([]);
+                    return 0;
+                }
+                var avaliablePrintReports = response['data']['data'];
+                deferred.resolve(avaliablePrintReports);
+            }
+        });
+    }
+
+    return deferred.promise;
+}
+
+/**
+ * Retourne une liste HTML contenant les rapports
+ * @param  {array} aPrintReports liste des rapports
+ * @return {dom} Liste au format HTML
+ */
+var getReportsListAsHTML = function(aPrintReports) {
+
+    if (!aPrintReports.length > 0) {
+        return 'Aucun rapport disponible';
+    }
+
+    var domLi;
+    var sHTMLLi;
+    var domUl = $(document.createElement('ul')).addClass('anc_saisie_controle_rapports_list');
+    for (var i = 0; i < aPrintReports.length; i++) {
+
+        sHTMLLi = '<li>';
+        sHTMLLi += '<a href="javascript:void(0)" class="padding-sides-10">';
+        sHTMLLi += '<span class="glyphicon glyphicon-download-alt margin-sides-5"></span>';
+        sHTMLLi += aPrintReports[i]['name'];
+        sHTMLLi += '<span class="margin-sides-5 icon-files-o"></span>';
+        sHTMLLi += '</a>';
+        sHTMLLi += '</li>';
+        domLi = $(sHTMLLi);
+
+        $(domLi).click(angular.bind(this, generateReport, aPrintReports[i]));
+        $(domUl).append($(domLi));
+    }
+
+    return domUl;
+}
+
+/**
+ * Génère le rapport vMap correspondant
+ *
+ * @param  {object} oPrintReport Définition du rapport
+ */
+var generateReport = function(oPrintReport) {
+
+    if (angular.isDefined(oVmap.generatePrintReport)) {
+        oVmap.generatePrintReport({
+            'printReportId': oPrintReport['printreport_id'],
+            'ids': [envSrvc['sId']]
+        });
+    } else {
+        var sMessage = 'Module vMap requis pour effectuer cette opération';
+        console.error(sMessage);
+        $.notify(sMessage, 'error');
+    }
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_rapport.json b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_rapport.json
new file mode 100644
index 0000000000000000000000000000000000000000..c8a5758c3e64da694c2019ad12a307e74a5e4f7d
--- /dev/null
+++ b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_rapport.json
@@ -0,0 +1,73 @@
+{
+    "display": {
+        "name": "anc_saisie_anc_controle_controle_schema-form",
+        "title": "ANC_SAISIE_ANC_CONTROLE_CONTROLE_SCHEMA_TITLE",
+        "input_size": "xxs",
+        "nb_cols": 12,
+        "javascript": false,
+        "rows": [
+            {
+                "fields": [
+                    {
+                        "type": "button",
+                        "class": "btn-ungroup btn-group-sm",
+                        "nb_cols": 12,
+                        "name": "display_button",
+                        "id": "display_button",
+                        "buttons": [
+                            {
+                                "type": "button",
+                                "name": "return_list",
+                                "label": "FORM_RETURN_LIST",
+                                "class": "btn-primary",
+                                "event": "setMode(\"search\")"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    },
+    "search": {
+        "name": "anc_saisie_anc_controle_controle_schema-form",
+        "title": "ANC_SAISIE_ANC_CONTROLE_CONTROLE_SCHEMA_TITLE",
+        "input_size": "xxs",
+        "nb_cols": 12,
+        "javascript": false,
+        "rows": [
+
+        ]
+    },
+    "insert": {
+        "name": "anc_saisie_anc_controle_controle_schema-form",
+        "title": "ANC_SAISIE_ANC_CONTROLE_CONTROLE_SCHEMA_TITLE_INSERT",
+        "input_size": "xxs",
+        "nb_cols": 12,
+        "javascript": false,
+        "rows": [
+
+        ],
+        "event": "sendSimpleForm()"
+    },
+    "update": {
+        "name": "anc_saisie_anc_controle_controle_rapport-form",
+        "title": "ANC_SAISIE_ANC_CONTROLE_CONTROLE_RAPPORT_TITLE",
+        "input_size": "xxs",
+        "nb_cols": 12,
+        "javascript": true,
+        "rows": [
+            {
+                "fields": [
+                    {
+                        "type": "label",
+                        "name": "raports",
+                        "label": "Rapports",
+                        "id": "anc_saisie_controle_rapports_list_container",
+                        "nb_cols": 12
+                    }
+                ]
+            }
+        ],
+        "event": "sendSimpleForm()"
+    }
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json
index 6b4ecd01b65da0e454d662f0ea067911c83a6e97..45642a3929dd6073831ede459b1149145b68e4d4 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json
@@ -64,13 +64,13 @@
                         "label": "",
                         "required": false,
                         "nb_cols": 12,
-                        "id": "Element_0_1_1",
+                        "id":"anc_saisie_anc_controle_schema_map",
                         "style": {
                             "height": "350px"
                         },
                         "grid_height": "150px",
                         "map_options": {
-                            "proj": "EPSG:3857",
+                            "proj": "EPSG:2154",
                             "base_proj": "EPSG:4326",
                             "output_format": "geojson",
                             "type": "OSM",
@@ -111,11 +111,11 @@
                         "attributes_def": [{
                                 "label": "Type",
                                 "name": "composant_type"
-                            }, 
+                            },
                             {
                                 "label": "Nom",
                                 "name": "label"
-                            }, 
+                            },
                             {
                                 "label": "Observations",
                                 "name": "observations"
@@ -216,27 +216,36 @@
                                         {
                                             "fields": [
                                                 {
-                                                    "type": "number",
-                                                    "label": "Taille",
+                                                    "type": "slider",
                                                     "name": "size",
-                                                    "required": false,
-                                                    "default_value": 50,
-                                                    "nb_cols": 12
+                                                    "label": "Taille",
+                                                    "nb_cols": 12,
+                                                    "options": {
+                                                        "min": 0,
+                                                        "max": 300,
+                                                        "precision": 1,
+                                                        "step": 1
+                                                    },
+                                                    "default_value": 50
                                                 }
                                             ]
-                                        }, 
+                                        },
                                         {
                                             "fields": [
                                                 {
-                                                    "type": "text",
-                                                    "label": "Angle",
+                                                    "type": "slider",
                                                     "name": "rotation",
-                                                    "required": false,
-                                                    "default_value": 0,
-                                                    "nb_cols": 12
+                                                    "label": "Angle",
+                                                    "nb_cols": 12,
+                                                    "options": {
+                                                        "min": 0,
+                                                        "max": 360,
+                                                        "precision": 1,
+                                                        "step": 1
+                                                    }
                                                 }
                                             ]
-                                        }, 
+                                        },
                                         {
                                             "fields": [
                                                 {
@@ -298,6 +307,7 @@
                 ]
             }
         ],
+        "initEvent": "initAncControleSchemaFormMap()",
         "event": "sendSimpleForm()"
     }
-}
\ No newline at end of file
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json
index d1969097d8a6bddaa0a62ee9b85a1cd0b1486eb5..9c06715511f0dc1829fb151d5d609b1d473a7b31 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json
@@ -423,6 +423,19 @@
                     }
                 ]
             },
+            {
+                "fields":[
+                    {
+                        "type":"tinymce",
+                        "name":"tra_commentaire",
+                        "label":"Commentaires",
+                        "disabled":false,
+                        "required":false,
+                        "nb_cols":12,
+                        "id":"tra_commentaire_17_1"
+                    }
+                ]
+            },
             {
                 "fields":[
                     {
@@ -616,7 +629,8 @@
                         "tra_vm_tuy_perf",
                         "tra_vm_sab_qual",
                         "tra_vm_sab_ep",
-                        "tra_vm_geomembrane"
+                        "tra_vm_geomembrane",
+                        "tra_commentaire"
                     ]
                 }
             ]
@@ -1569,6 +1583,18 @@
                     }
                 ]
             },
+            {
+                "fields":[
+                    {
+                        "type":"tinymce",
+                        "name":"tra_commentaire",
+                        "label":"Commentaires",
+                        "nb_cols":12,
+                        "id":"tra_commentaire_17_1",
+                        "nb_rows":10
+                    }
+                ]
+            },
             {
                 "fields":[
                     {
@@ -1716,7 +1742,8 @@
                         "tra_vm_tuy_perf",
                         "tra_vm_sab_qual",
                         "tra_vm_sab_ep",
-                        "tra_vm_geomembrane"
+                        "tra_vm_geomembrane",
+                        "tra_commentaire"
                     ]
                 }
             ]
@@ -2666,6 +2693,18 @@
                     }
                 ]
             },
+            {
+                "fields":[
+                    {
+                        "type":"tinymce",
+                        "name":"tra_commentaire",
+                        "label":"Commentaires",
+                        "nb_cols":12,
+                        "id":"tra_commentaire_17_1",
+                        "nb_rows":10
+                    }
+                ]
+            },
             {
                 "fields":[
                     {
@@ -2866,7 +2905,8 @@
                         "tra_vm_tuy_perf",
                         "tra_vm_sab_qual",
                         "tra_vm_sab_ep",
-                        "tra_vm_geomembrane"
+                        "tra_vm_geomembrane",
+                        "tra_commentaire"
                     ]
                 }
             ]
@@ -3404,4 +3444,4 @@
             "id":"datasource_41"
         }
     }
-}
\ No newline at end of file
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json b/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json
index 2df0cd8ed078333a7c55f8c73c9328c1d54f1a7b..25479c2aa2b94308fbd1e324c88df5afbc195f1e 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json
@@ -908,24 +908,19 @@
             {
                 "fields":[
                     {
-                        "type":"radio",
+                        "type":"select",
                         "name":"evac_is_type_effl",
                         "label":"Type d'effluent",
                         "nb_cols":4,
                         "id":"evac_is_type_effl_16_1",
-                        "options":{
-                            "choices":[
-                                {
-                                    "label":"Oui",
-                                    "value":true,
-                                    "$$hashKey":"object:39384"
-                                },
-                                {
-                                    "label":"Non",
-                                    "value":false,
-                                    "$$hashKey":"object:39385"
-                                }
-                            ]
+                        "datasource":{
+                            "datasource_id":"datasource_12",
+                            "sort_order":"ASC",
+                            "distinct":"true",
+                            "label_key":"alias",
+                            "order_by":"alias",
+                            "id_key":"valeur",
+                            "attributs":"valeur|alias"
                         }
                     },
                     {
@@ -1734,24 +1729,19 @@
             {
                 "fields":[
                     {
-                        "type":"radio",
+                        "type":"select",
                         "name":"evac_is_type_effl",
                         "label":"Type d'effluent",
                         "nb_cols":4,
                         "id":"evac_is_type_effl_16_1",
-                        "options":{
-                            "choices":[
-                                {
-                                    "label":"Oui",
-                                    "value":true,
-                                    "$$hashKey":"object:35340"
-                                },
-                                {
-                                    "label":"Non",
-                                    "value":false,
-                                    "$$hashKey":"object:35341"
-                                }
-                            ]
+                        "datasource":{
+                            "datasource_id":"datasource_12",
+                            "sort_order":"ASC",
+                            "distinct":"true",
+                            "label_key":"alias",
+                            "order_by":"alias",
+                            "id_key":"valeur",
+                            "attributs":"valeur|alias"
                         }
                     },
                     {
@@ -2457,6 +2447,19 @@
             },
             "ressource_id":"vitis/genericquerys",
             "id":"datasource_11"
+        },
+        "datasource_12":{
+            "type":"web_service",
+            "dataType":"tableValue",
+            "name":"evac_is_type_effl",
+            "description":"",
+            "parameters":{
+                "schema":"s_anc",
+                "table":"param_liste",
+                "filter": {"id_nom_table": "evacuation_eaux", "nom_liste": "evac_is_type_effl"}
+            },
+            "ressource_id":"vitis/genericquerys",
+            "id":"datasource_12"
         }
     }
-}
\ No newline at end of file
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_installation.json b/module/forms/anc_saisie/anc_saisie_anc_installation.json
index 53408c465e814843b03e29f9445cc0f5ff29cdd3..9fb7f5ed2d7d323698590236ea6c5d94100e70e6 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_installation.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_installation.json
@@ -698,14 +698,13 @@
                         "id":"Element_0_5_1"
                     },
                     {
-                        "type":"integer",
+                        "type":"text",
                         "name":"prop_code_postal",
                         "label":"Code postal",
                         "required":false,
                         "pattern":"",
                         "nb_cols":2,
-                        "id":"Element_1_5_2",
-                        "max_length": 5
+                        "id":"Element_1_5_2"
                     },
                     {
                         "type":"text",
@@ -928,14 +927,13 @@
                         "id":"parc_adresse_6_1"
                     },
                     {
-                        "type":"integer",
+                        "type":"text",
                         "name":"code_postal",
                         "label":"Code Postal",
                         "disabled":false,
                         "required":false,
                         "nb_cols":2,
-                        "id":"code_postal_7_1",
-                        "max_length": 5
+                        "id":"code_postal_7_1"
                     },
                     {
                         "type":"text",
@@ -1038,14 +1036,13 @@
                         "id":"prop_adresse_11_1"
                     },
                     {
-                        "type":"integer",
+                        "type":"text",
                         "name":"prop_code_postal",
                         "label":"Code postal",
                         "disabled":false,
                         "required":false,
                         "nb_cols":2,
-                        "id":"prop_code_postal_12_1",
-                        "max_length": 5
+                        "id":"prop_code_postal_12_1"
                     },
                     {
                         "type":"text",
@@ -1656,14 +1653,13 @@
                         "id":"parc_adresse_6_1"
                     },
                     {
-                        "type":"integer",
+                        "type":"text",
                         "name":"code_postal",
                         "label":"Code postal",
                         "disabled":false,
                         "required":false,
                         "nb_cols":4,
-                        "id":"code_postal_7_1",
-                        "max_length": 5
+                        "id":"code_postal_7_1"
                     },
                     {
                         "type":"text",
@@ -1766,14 +1762,13 @@
                         "id":"prop_adresse_11_1"
                     },
                     {
-                        "type":"integer",
+                        "type":"text",
                         "name":"prop_code_postal",
                         "label":"Code postal",
                         "disabled":false,
                         "required":false,
                         "nb_cols":4,
-                        "id":"prop_code_postal_12_1",
-                        "max_length": 5
+                        "id":"prop_code_postal_12_1"
                     },
                     {
                         "type":"text",
diff --git a/module/forms/anc_saisie/anc_saisie_anc_installation_installation_suivi.json b/module/forms/anc_saisie/anc_saisie_anc_installation_installation_suivi.json
index 3fa7403c885eecb9b18e8be300315c8146467e3d..76476b275a6405f3ee3e1e5b78fd88a04150ef50 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_installation_installation_suivi.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_installation_installation_suivi.json
@@ -307,7 +307,7 @@
                         "label":"Emplacement",
                         "required":false,
                         "nb_cols":12,
-                        "id":"geom_7_1",
+                        "id":"anc_saisie_anc_installation_suivi_map",
                         "style":{
                             "height":"350px"
                         },
@@ -411,4 +411,4 @@
     "datasources":{
 
     }
-}
\ No newline at end of file
+}
diff --git a/module/forms/anc_saisie/anc_saisie_anc_traitement.json b/module/forms/anc_saisie/anc_saisie_anc_traitement.json
index 6475ffa6e35a671620ceb874b23ed116aa6e7f0c..ca350ea373b0755fcf51918f2e54ef586a8e1a28 100755
--- a/module/forms/anc_saisie/anc_saisie_anc_traitement.json
+++ b/module/forms/anc_saisie/anc_saisie_anc_traitement.json
@@ -430,6 +430,19 @@
                     }
                 ]
             },
+            {
+                "fields":[
+                    {
+                        "type":"tinymce",
+                        "name":"tra_commentaire",
+                        "label":"Commentaires",
+                        "disabled":false,
+                        "required":false,
+                        "nb_cols":12,
+                        "id":"tra_commentaire_17_1"
+                    }
+                ]
+            },
             {
                 "fields":[
                     {
@@ -635,7 +648,8 @@
                         "schema_f",
                         "documents_f",
                         "plan_f",
-                        "tra_vm_geomembrane"
+                        "tra_vm_geomembrane",
+                        "tra_commentaire"
                     ]
                 }
             ]
@@ -1804,6 +1818,18 @@
                     }
                 ]
             },
+            {
+                "fields":[
+                    {
+                        "type":"tinymce",
+                        "name":"tra_commentaire",
+                        "label":"Commentaires",
+                        "nb_cols":12,
+                        "id":"tra_commentaire_17_1",
+                        "nb_rows":10
+                    }
+                ]
+            },
             {
                 "fields":[
                     {
@@ -1961,7 +1987,8 @@
                         "id_installation",
                         "Element_0",
                         "Element_7",
-                        "tra_vm_geomembrane"
+                        "tra_vm_geomembrane",
+                        "tra_commentaire"
                     ]
                 }
             ]
@@ -3022,6 +3049,18 @@
                     }
                 ]
             },
+            {
+                "fields":[
+                    {
+                        "type":"tinymce",
+                        "name":"tra_commentaire",
+                        "label":"Commentaires",
+                        "nb_cols":12,
+                        "id":"tra_commentaire_17_1",
+                        "nb_rows":10
+                    }
+                ]
+            },
             {
                 "fields":[
                     {
@@ -3235,7 +3274,8 @@
                         "schema_f",
                         "documents_f",
                         "plan_f",
-                        "tra_vm_geomembrane"
+                        "tra_vm_geomembrane",
+                        "tra_commentaire"
                     ]
                 }
             ]
@@ -3773,4 +3813,4 @@
             "id":"datasource_41"
         }
     }
-}
\ No newline at end of file
+}
diff --git a/module/javascript/anc_saisie_map.js b/module/javascript/anc_saisie_map.js
new file mode 100644
index 0000000000000000000000000000000000000000..cc2dd7179de3dfbef3b25f0b5092077d1737dd38
--- /dev/null
+++ b/module/javascript/anc_saisie_map.js
@@ -0,0 +1,396 @@
+/* global vitisApp, goog, angular, bootbox, oVFB */
+
+'use strict';
+goog.provide('vmap.anc.anc_saisie_map');
+vitisApp.on('appMainDrtvLoaded', function () {
+
+    var $q = angular.element(vitisApp.appMainDrtv).injector().get(['$q']);
+    var $log = angular.element(vitisApp.appMainDrtv).injector().get(['$log']);
+    var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(['envSrvc']);
+    var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]);
+    var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(['propertiesSrvc']);
+
+    /**
+     * Initialise la carte du menu installation > suivi
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['initAncInstallationSuiviFormMap'] = function () {
+        $log.info("initAncInstallationSuiviFormMap");
+
+        var this_ = this;
+        var scope = this;
+
+        // Remplace si besoin l'identifiant et le type de carte à utiliser
+        var sMapId = this['getAncFormMapId']('installation');
+        this['setFormMapTreeByMapId'](sMapId);
+
+        // Résultat de la propertie anc.installation.zoom_on_parcelle
+        var bZoomOnParcelle = this['getAncZoomOnParcellePropertie'](propertiesSrvc, 'installation');
+
+        // Récupère l'identifiant de la parcelle correspondante
+        var sIdPar = this['getAncInstallSuiviIdPar'](scope);
+
+        // Récupère la géométrie de l'installation
+        var sGeom = this['ancMapGetFormGeom'](scope, 'installation');
+
+        if (!goog.isDefAndNotNull(sGeom)) {
+            // Zoom la carte sur la parcelle
+            if (goog.isDefAndNotNull(sIdPar) && bZoomOnParcelle === true) {
+                this['ancMapZoomOnParcelle'](sIdPar, 'installation');
+            }
+        }
+    }
+
+    /**
+     * Initialise la carte du menu controle > schema
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['initAncControleSchemaFormMap'] = function () {
+        $log.info("initAncInstallationSuiviFormMap");
+
+        var this_ = this;
+        var scope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"]).scope();
+
+        // Remplace si besoin l'identifiant et le type de carte à utiliser
+        var sMapId = this['getAncFormMapId']('controle');
+        this['setFormMapTreeByMapId'](sMapId);
+
+        // Résultat de la propertie anc.installation.zoom_on_parcelle
+        var bZoomOnParcelle = this['getAncZoomOnParcellePropertie'](propertiesSrvc, 'controle');
+
+        // Récupère la géométrie de l'installation
+        var sGeom = this['ancMapGetFormGeom'](scope, 'controle');
+
+        // Récupère l'identifiant de la parcelle correspondante
+        var sIdPar = this['getAncControleSchemaIdPar'](scope).then(function(sIdPar){
+
+            // Zoom la carte sur la parcelle
+            if (!goog.isDefAndNotNull(sGeom)) {
+                if (goog.isDefAndNotNull(sIdPar) && bZoomOnParcelle === true) {
+                    this_['ancMapZoomOnParcelle'](sIdPar, 'controle');
+                }
+            }
+        });
+    }
+
+    /**
+     * Remplace la carte OSM si une carte est fournie sur properties.anc.installation..map_id
+     * @param  {string} sMapId map id
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['setFormMapTreeByMapId'] = function (sMapId) {
+        $log.info("initAncInstallationSuiviFormMapTree");
+
+        var formScope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"]).scope();
+
+        var oForm;
+        if (goog.isDefAndNotNull(formScope)) {
+            if (goog.isDefAndNotNull(formScope['oFormDefinition'])) {
+                if (goog.isDefAndNotNull(formScope['oFormDefinition'][envSrvc["sFormDefinitionName"]])) {
+                    oForm = formScope['oFormDefinition'][envSrvc["sFormDefinitionName"]];
+                }
+            }
+        }
+        if (goog.isDefAndNotNull(oForm) && goog.isDefAndNotNull(sMapId)) {
+            if (goog.isArray(oForm['rows'])) {
+                for (var i = 0; i < oForm['rows'].length; i++) {
+                    if (goog.isArray(oForm['rows'][i]['fields'])) {
+                        for (var ii = 0; ii < oForm['rows'][i]['fields'].length; ii++) {
+                            if (goog.isObject(oForm['rows'][i]['fields'][ii]['map_options'])) {
+                                if(oForm['rows'][i]['fields'][ii]['type'] === 'map_osm'){
+                                    oForm['rows'][i]['fields'][ii]['type'] = 'map_vmap';
+                                }
+                                oForm['rows'][i]['fields'][ii]['map_options']['type'] = 'vmap';
+                                oForm['rows'][i]['fields'][ii]['map_options']['map_id'] = sMapId;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Récupère l'identifiant de la cate fourni sur properties.anc.installation.map_id
+     *
+     * @return {string|undefined}  map_id
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['getAncFormMapId'] = function (sObject) {
+
+        var sMapId;
+        if (goog.isDefAndNotNull(propertiesSrvc)) {
+            if (goog.isDefAndNotNull(propertiesSrvc["anc"])) {
+                if (goog.isDefAndNotNull(propertiesSrvc["anc"][sObject])) {
+                    if (goog.isDefAndNotNull(propertiesSrvc["anc"][sObject]["map_id"])) {
+                        if (propertiesSrvc["anc"][sObject]["map_id"] !== false) {
+                            sMapId = propertiesSrvc["anc"][sObject]["map_id"];
+                        }
+                    }
+                }
+            }
+        }
+        return sMapId;
+    }
+
+    /**
+     * Get propertie anc.installation.zoom_on_parcelle
+     *
+     * @param  {object} oProperties Properties
+     * @return {boolean} anc.installation.zoom_on_parcelle value
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['getAncZoomOnParcellePropertie'] = function(oProperties, sObject){
+        $log.info('getAncZoomOnParcellePropertie');
+
+        var bZoomOnParcelle = false;
+        if (goog.isDefAndNotNull(oProperties)) {
+            if (goog.isDefAndNotNull(oProperties["anc"])) {
+                if (goog.isDefAndNotNull(oProperties["anc"][sObject])) {
+                    if (goog.isDefAndNotNull(oProperties["anc"][sObject]["zoom_on_parcelle"])) {
+                        if (oProperties["anc"][sObject]["zoom_on_parcelle"] === true) {
+                            bZoomOnParcelle = true;
+                        }
+                    }
+                }
+            }
+        }
+        return bZoomOnParcelle;
+    }
+
+    /**
+     * Récupère l'id_par correspondant à l'installation
+     *
+     * @param  {object} scope description
+     * @return {string|undefined} id_par de la parcelle correspondante
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['getAncInstallSuiviIdPar'] = function(scope){
+        $log.info('getAncInstallSuiviIdPar');
+
+        var sParcelle;
+        if (goog.isDefAndNotNull(scope['oFormValues'])) {
+            if (goog.isDefAndNotNull(scope['sFormDefinitionName'])) {
+                if (goog.isDefAndNotNull(scope['oFormValues'][scope['sFormDefinitionName']])) {
+                    if (goog.isDefAndNotNull(scope['oFormValues'][scope['sFormDefinitionName']]['id_parc'])) {
+                        sParcelle = scope['oFormValues'][scope['sFormDefinitionName']]['id_parc'];
+                    }
+                }
+            }
+        }
+
+        return sParcelle;
+    }
+
+    /**
+     * Récupère l'id_par correspondant à l'installation dans une promesse
+     *
+     * @param  {object} scope description
+     * @return {promise}
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['getAncControleSchemaIdPar'] = function(scope){
+        $log.info('getAncControleSchemaIdPar');
+
+        var deferred = $q.defer();
+
+        var sInstall = this['getAncControleSchemaIdInstall'](scope);
+
+        // Requête Ajax pour récupérer la définition complète de l'install
+        if (!goog.isDefAndNotNull(sInstall) || sInstall == '') {
+            console.error('id_installation non valide');
+            deferred.reject();
+        } else {
+            // Récupère la liste des rapports disponibles
+            ajaxRequest({
+                'method': 'GET',
+                'url': propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + '/anc/installations/' + sInstall,
+                'headers': {
+                    'Accept': 'application/x-vm-json'
+                },
+                'success': function (response) {
+                    if (!goog.isDefAndNotNull(response['data'])) {
+                        console.error('response.data undefined: ', response);
+                        deferred.reject();
+                        return 0;
+                    }
+                    if (!goog.isDefAndNotNull(response['data']['data'])) {
+                        console.error('Aucune installation disponible pour ' + sInstall);
+                        deferred.reject();
+                        return 0;
+                    }
+                    if (!goog.isDefAndNotNull(response['data']['data'][0])) {
+                        console.error('Aucune installation disponible pour ' + sInstall);
+                        deferred.reject();
+                        return 0;
+                    }
+                    if (!goog.isDefAndNotNull(response['data']['data'][0]['id_parc'])) {
+                        console.error('Aucune parcelle disponible pour ' + sInstall);
+                        deferred.reject();
+                        return 0;
+                    }
+                    var sParcelle = response['data']['data'][0]['id_parc'];
+                    deferred.resolve(sParcelle);
+                }
+            });
+        }
+
+        return deferred.promise;
+    }
+
+    /**
+     * Récupère l'id_install correspondant au contrôle
+     *
+     * @param  {object} scope description
+     * @return {string|undefined} id_install de la parcelle correspondante
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['getAncControleSchemaIdInstall'] = function(scope){
+        $log.info('getAncControleSchemaIdInstall');
+
+        var sInstall;
+        if (goog.isDefAndNotNull(scope['oFormValues'])) {
+            if (goog.isDefAndNotNull(scope['sFormDefinitionName'])) {
+                if (goog.isDefAndNotNull(scope['oFormValues'][scope['sFormDefinitionName']])) {
+                    if (goog.isDefAndNotNull(scope['oFormValues'][scope['sFormDefinitionName']]['id_installation'])) {
+                        sInstall = scope['oFormValues'][scope['sFormDefinitionName']]['id_installation'];
+                    }
+                }
+            }
+        }
+
+        return sInstall;
+    }
+
+    /**
+     * Récupère la geom correspondant à l'installation
+     *
+     * @param  {object} scope description
+     * @return {string|undefined}
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['ancMapGetFormGeom'] = function(scope, sObject){
+        $log.info('ancMapGetFormGeom');
+
+        var sGeom, sField;
+
+        if (sObject === 'installation') {
+            sField = 'geom';
+        }
+        if (sObject === 'controle') {
+            sField = 'composants';
+        }
+
+        if (goog.isDefAndNotNull(sField)) {
+            if (goog.isDefAndNotNull(scope['oFormValues'])) {
+                if (goog.isDefAndNotNull(scope['sFormDefinitionName'])) {
+                    if (goog.isDefAndNotNull(scope['oFormValues'][scope['sFormDefinitionName']])) {
+                        if (goog.isDefAndNotNull(scope['oFormValues'][scope['sFormDefinitionName']][sField])) {
+                            sGeom = scope['oFormValues'][scope['sFormDefinitionName']][sField];
+                        }
+                    }
+                }
+            }
+        }
+
+        return sGeom;
+    }
+
+    /**
+     * Requeête Ajax pour récupérer la définition de la parcelle
+     *
+     * @param  {string} sIdPar id_par de la parcelle
+     * @return {promise}
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['ancMapGetParcelleDef'] = function(sIdPar){
+        $log.info('ancMapGetParcelleDef');
+
+        var deferred = $q.defer();
+
+        if (!goog.isDefAndNotNull(sIdPar) || sIdPar == '') {
+            console.error('id_par non valide');
+            deferred.reject();
+        } else {
+
+            // Récupère la liste des rapports disponibles
+            ajaxRequest({
+                'method': 'GET',
+                'url': propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + '/cadastreV2/parcelles/' + sIdPar,
+                'headers': {
+                    'Accept': 'application/x-vm-json'
+                },
+                'success': function (response) {
+                    if (!goog.isDefAndNotNull(response['data'])) {
+                        console.error('response.data undefined: ', response);
+                        deferred.reject();
+                        return 0;
+                    }
+                    if (!goog.isDefAndNotNull(response['data']['data'])) {
+                        console.error('Aucune parcelle disponible pour ' + sIdPar);
+                        deferred.reject();
+                        return 0;
+                    }
+                    if (!goog.isDefAndNotNull(response['data']['data'][0])) {
+                        console.error('Aucune parcelle disponible pour ' + sIdPar);
+                        deferred.reject();
+                        return 0;
+                    }
+                    if (!goog.isDefAndNotNull(response['data']['data'][0]['id_par'])) {
+                        console.error('Aucune parcelle disponible pour ' + sIdPar);
+                        deferred.reject();
+                        return 0;
+                    }
+                    var oParcelle = response['data']['data'][0];
+                    deferred.resolve(oParcelle);
+                }
+            });
+        }
+
+        return deferred.promise;
+    }
+
+    /**
+     * Met à jour l'étendue de la carte sur des features
+     *
+     * @param  {object} oMap carte
+     * @param  {array} aFeatures features
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['ancMapUpdateOlMapExtent'] = function(oMap, aFeatures){
+        $log.info('ancMapUpdateOlMapExtent');
+
+        if (goog.isDefAndNotNull(aFeatures[0])) {
+            var featureExtent = aFeatures[0].getGeometry().getExtent();
+            oMap.MapObject.getView().fit(featureExtent);
+            if (aFeatures[0].getGeometry().getType() === 'Point') {
+                oMap.MapObject.getView().setZoom(15);
+            }
+        }
+    }
+
+    /**
+     * Zoom la carte sur la parcelle correspondante
+     *
+     * @param  {string} sIdPar id_par de la parcelle
+     * @return {promise}
+     */
+    angular.element(vitisApp.appMainDrtv).scope()['ancMapZoomOnParcelle'] = function(sIdPar, sObject){
+        $log.info('ancMapZoomOnParcelle : ' + sIdPar);
+
+        var this_ = this;
+        var sMapElemId;
+
+        if (sObject === 'installation') {
+            sMapElemId = 'anc_saisie_anc_installation_suivi_map';
+        } else if (sObject === 'controle') {
+            sMapElemId = 'anc_saisie_anc_controle_schema_map';
+        }
+
+        if (goog.isDefAndNotNull(sIdPar) || sIdPar == '') {
+            this['ancMapGetParcelleDef'](sIdPar).then(function(oParcelle){
+                setTimeout(function () {
+                    var oMap = angular.element($('#' + sMapElemId)).scope()['oMap'];
+                    var sGeom = oParcelle['geom'];
+                    if (!goog.isDefAndNotNull(sGeom) || sGeom == '') {
+                        console.error('parcelle ' + sIdPar + ' non valide');
+                        return null;
+                    }
+                    var aFeatures = oMap.getFeaturesByString(oParcelle['geom'], 'ewkt');
+                    this_['ancMapUpdateOlMapExtent'](oMap, aFeatures);
+                }, 1000);
+            });
+        } else {
+            console.error('parcelle ' + sIdPar + ' non valide');
+        }
+    }
+});
diff --git a/module/javascript/script_module.js b/module/javascript/script_module.js
index 7d639dfe35c9936fdd5640a7ef12929b90c2702c..c086d26a4da4bb7ebcef2c4495b8aad525c74c67 100755
--- a/module/javascript/script_module.js
+++ b/module/javascript/script_module.js
@@ -2,7 +2,9 @@
 
 'use strict';
 goog.provide('vmap.anc.script_module');
+goog.require('vmap.anc.anc_saisie_map');
 vitisApp.on('appMainDrtvLoaded', function () {
+
     /**
      * initAncControlForm function.
      * Traitements avant l'affichage du formulaire de la section "Dossier" de l'onglet "Contrôle".
@@ -337,9 +339,13 @@ vitisApp.on('appMainDrtvLoaded', function () {
         var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]);
         var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]);
         var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]);
-        //
+
         $log.info("initAncInstallationSuiviForm");
-        // Attends la fin du chargement de tous les champs du formulaire.
+
+        // Initialise la carte
+        this['initAncInstallationSuiviFormMap']();
+
+        // Attend la fin du chargement de tous les champs du formulaire.
         var clearListener = $rootScope.$on('formExtracted', function (event, sFormDefinitionName) {
             // Supprime le "listener".
             clearListener();
@@ -621,9 +627,9 @@ vitisApp.on('appMainDrtvLoaded', function () {
                  */
             } else {
                 oFormFieldsToDisplay = {
-                    "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6"],
-                    "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6"],
-                    "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", "tra_dist_hab", "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane"]
+                    "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6", "tra_commentaire"],
+                    "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6", "tra_commentaire"],
+                    "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", "tra_dist_hab", "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane", "tra_commentaire"]
                 };
                 //
                 var setTypeTraitement = function (event) {
@@ -938,9 +944,9 @@ vitisApp.on('appMainDrtvLoaded', function () {
             var aFormFieldsToConcat = [envSrvc["sMode"] + "_button", "id_eva", "id_installation", "id_controle"];
             var oFormFieldsToDisplay, aFormFieldsToDisplay = [];
             oFormFieldsToDisplay = {
-                "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"],
-                "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm"],
-                "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_rp_grav", "evac_rp_tamp", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"]
+                "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_is_type_effl", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"],
+                "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm", "evac_hs_type_eff"],
+                "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_type_effl", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"]
             };
             if (envSrvc["sMode"] == "insert")
                 $rootScope["displayFormFields"](aFormFieldsToConcat);
@@ -1135,9 +1141,9 @@ vitisApp.on('appMainDrtvLoaded', function () {
             var aFormFieldsToConcat = [envSrvc["sMode"] + "_button", "id_traitement", "id_controle", "tra_type", "id_installation"];
             var oFormFieldsToDisplay, aFormFieldsToDisplay = [];
             oFormFieldsToDisplay = {
-                "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6"],
-                "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6"],
-                "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", , "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane"]
+                "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6","tra_commentaire"],
+                "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6","tra_commentaire"],
+                "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", , "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane","tra_commentaire"]
             };
             //
             var setTypeTraitement = function (event) {
@@ -1305,9 +1311,9 @@ vitisApp.on('appMainDrtvLoaded', function () {
             var aFormFieldsToConcat = [envSrvc["sMode"] + "_button", "id_eva", "id_installation", "id_controle"];
             var oFormFieldsToDisplay, aFormFieldsToDisplay = [];
             oFormFieldsToDisplay = {
-                "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"],
-                "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm"],
-                "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_rp_grav", "evac_rp_tamp", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"]
+                "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul", "evac_is_type_effl"],
+                "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm", "evac_hs_type_eff"],
+                "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_rp_grav", "evac_rp_tamp", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul", "evac_is_type_effl", "evac_rp_type_eff"]
             };
             if (typeof (oParentFormValues["controle_type"]) == "string")
                 var sControleType = oParentFormValues["controle_type"];
diff --git a/module/lang/lang-en.json b/module/lang/lang-en.json
index 9c458e29aced1e4ba66d568140a802113f7931bf..1487e6a0045603c213cd191d9f05ee99c01562a1 100644
--- a/module/lang/lang-en.json
+++ b/module/lang/lang-en.json
@@ -427,6 +427,7 @@
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_PRETRAITEMENT_TITLE_UPDATE" : "Pretreatment n°{{sId}}",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_PRETRAITEMENT_TITLE_DISPLAY" : "Pretreatment n°{{sId}}",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_SCHEMA_TITLE" : "",
+                "ANC_SAISIE_ANC_CONTROLE_CONTROLE_RAPPORT_TITLE" : "Reports",
                 "GRID_TITLE_ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT" : "Liste des traitements du contrôle",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT_TITLE_INSERT" : "Treatement",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT_TITLE_UPDATE" : "Treatement n°{{sId}}",
diff --git a/module/lang/lang-fr.json b/module/lang/lang-fr.json
index 42e7f1224d3048de063b209203a858a81a7e75a0..b2fd7288a32cc36971715c24ac4c18e04739dc44 100644
--- a/module/lang/lang-fr.json
+++ b/module/lang/lang-fr.json
@@ -428,6 +428,7 @@
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_PRETRAITEMENT_TITLE_UPDATE" : "Prétraitement n°{{sId}}",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_PRETRAITEMENT_TITLE_DISPLAY" : "Prétraitement n°{{sId}}",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_SCHEMA_TITLE" : "",
+                "ANC_SAISIE_ANC_CONTROLE_CONTROLE_RAPPORT_TITLE" : "Rapports",
                 "GRID_TITLE_ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT" : "Liste des traitements du contrôle",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT_TITLE_INSERT" : "Traitement",
                 "ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT_TITLE_UPDATE" : "Traitement n°{{sId}}",
diff --git a/module/less/controle.less b/module/less/controle.less
new file mode 100644
index 0000000000000000000000000000000000000000..58349156f8a25029e8ebf618f3663700b2e0b4e4
--- /dev/null
+++ b/module/less/controle.less
@@ -0,0 +1,29 @@
+
+
+ul.anc_saisie_controle_rapports_list {
+    float: left;
+    min-width: 50%;
+    padding: 5px 0;
+    margin: 2px 0 0;
+    font-size: 14px;
+    text-align: left;
+    list-style: none;
+    background-color: #fff;
+    -webkit-background-clip: padding-box;
+    background-clip: padding-box;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.15);
+    border-radius: 4px;
+    -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+}
+
+ul.anc_saisie_controle_rapports_list > li > a {
+    display: block;
+    padding: 3px 20px;
+    clear: both;
+    font-weight: 400;
+    line-height: 1.42857143;
+    color: #333;
+    white-space: nowrap;
+}
diff --git a/module/less/installation.less b/module/less/installation.less
new file mode 100644
index 0000000000000000000000000000000000000000..e38d8f784d3187ee36503dd58890da72e2b6b8fe
--- /dev/null
+++ b/module/less/installation.less
@@ -0,0 +1,13 @@
+// Bouton "supprimer les installations".
+button[name="anc_saisie_anc_installation_deleteFlexigrid"] {
+    color: #fff;
+    background-color: #d9534f;
+    border-color: #d43f3a;
+}
+// Bouton "Ajouter une installation".
+button[name="anc_saisie_anc_installation_add_smallFlexigrid"] {
+    color: #fff;
+    background-color: #5cb85c;
+    border-color: #4cae4c;
+    margin-right: 100px;
+}
\ No newline at end of file
diff --git a/module/less/main.less b/module/less/main.less
new file mode 100644
index 0000000000000000000000000000000000000000..527f89c953f796ab8027de8bab8048ac2e37e216
--- /dev/null
+++ b/module/less/main.less
@@ -0,0 +1,6 @@
+// LESS
+@ui-grid-bg-image: "../images/ui-grid/wbg.gif";
+@font-color-purple: #6d1a67;
+@test-color: black;
+@import 'installation.less';
+@import 'controle.less';
diff --git a/web_service/conf/properties.inc b/web_service/conf/properties.inc
index a9031e78ca538fae970a6fb1226362541fc3d0b2..8ac9596648d42b3d4bbf8f11d1902d18a386d30b 100755
--- a/web_service/conf/properties.inc
+++ b/web_service/conf/properties.inc
@@ -1,5 +1,6 @@
 <?php
     $properties["schema_anc"] = 's_anc';
+    $properties["anc"]["files_container"] = 'anc';
     $properties["anc"]["cont_zone_urba"]["intersect"]["schema"] = '';
     $properties["anc"]["cont_zone_urba"]["intersect"]["table"] = '';
     $properties["anc"]["cont_zone_urba"]["intersect"]["column"] = '';
@@ -7,4 +8,9 @@
     $properties["anc"]["code_postal"]["schema"] = '';
     $properties["anc"]["code_postal"]["table"] = '';
     $properties["anc"]["code_postal"]["column"] = '';
-?>
\ No newline at end of file
+    $properties["anc"]["controle"]["business_object_id"] = '';
+    $properties["anc"]["controle"]["map_id"] = false;
+    $properties["anc"]["controle"]["zoom_on_parcelle"] = true;
+    $properties["anc"]["installation"]["map_id"] = false;
+    $properties["anc"]["installation"]["zoom_on_parcelle"] = true;
+?>
diff --git a/web_service/sql/sqlQueries.xml b/web_service/sql/sqlQueries.xml
index 2cac10d2514ed43b687b4cbb469f796fe2d06fb3..c3d9f5e91d0fa278d75cac91ec07ee441e599b86 100644
--- a/web_service/sql/sqlQueries.xml
+++ b/web_service/sql/sqlQueries.xml
@@ -3114,5 +3114,59 @@
 				]]>
 			</code>
 		</query>
+		<query>
+			<type>init</type>
+			<version>2019.01.00</version>
+			<code>
+				<![CDATA[
+					-- Frédéric le 16/01/2019 10:15
+					UPDATE s_vitis.vm_table_field SET name = 'commune', width = 200 WHERE tab_id = (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_entreprise') AND name = 'id_com';
+					DELETE FROM s_vitis.vm_table_button WHERE tab_id = (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_installation') AND label_id IN ('anc_13', 'anc_14');
+					INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'anc_14', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_installation'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_installation'));
+					INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'anc_13', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_installation'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_installation'));
+					UPDATE s_vitis.vm_tab SET sorted_dir = 'DESC' WHERE name = 'anc_installation';
+					-- Armand 16/01/2019 15h01
+					INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('section rapport', 'anc_135');
+					INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('anc_135', 'en', 'Reports');
+					INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('anc_135', 'fr', 'Rapports');
+					INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('anc_135', 'controle_rapport', 12, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_controle'), 'simpleFormTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'anc_controle'), 'anc');
+					-- Frédéric le 16/01/2019 15:52
+					ALTER TABLE s_anc.param_entreprise ADD COLUMN commune character varying(50);
+					UPDATE s_anc.param_entreprise SET commune = id_com;
+					UPDATE s_anc.param_entreprise as "pe" SET commune = (SELECT texte FROM s_cadastre.commune WHERE id_com = "pe".id_com) WHERE (SELECT texte FROM s_cadastre.commune WHERE id_com = "pe".id_com) is not null;
+					ALTER TABLE s_anc.param_entreprise ALTER COLUMN commune SET NOT NULL;
+					-- Frédéric 17/01/2019 09:20
+					DROP RULE insert_v_controle ON s_anc.v_controle;
+					DROP VIEW s_anc.v_installation;
+					ALTER TABLE s_anc.installation ALTER COLUMN parc_adresse TYPE character varying(254);
+					ALTER TABLE s_anc.installation ALTER COLUMN code_postal TYPE character varying(254);
+					ALTER TABLE s_anc.installation ALTER COLUMN parc_commune TYPE character varying(254);
+					ALTER TABLE s_anc.installation ALTER COLUMN prop_adresse TYPE character varying(254);
+					ALTER TABLE s_anc.installation ALTER COLUMN prop_code_postal TYPE character varying(254);
+					ALTER TABLE s_anc.installation ALTER COLUMN prop_commune TYPE character varying(254);
+					CREATE OR REPLACE VIEW s_anc.v_installation AS SELECT installation.id_installation,installation.id_com,installation.id_parc,installation.parc_sup,installation.parc_parcelle_associees,installation.parc_adresse,installation.code_postal,installation.parc_commune,installation.prop_titre,installation.prop_nom_prenom,installation.prop_adresse,installation.prop_code_postal,installation.prop_commune,installation.prop_tel,installation.prop_mail,installation.bati_type,installation.bati_ca_nb_pp,installation.bati_ca_nb_eh,installation.bati_ca_nb_chambres,installation.bati_ca_nb_autres_pieces,installation.bati_ca_nb_occupant,installation.bati_nb_a_control,installation.bati_date_achat,installation.bati_date_mutation,installation.cont_zone_enjeu,installation.cont_zone_sage,installation.cont_zone_autre,installation.cont_zone_urba,installation.cont_zone_anc,installation.cont_alim_eau_potable,installation.cont_puits_usage,installation.cont_puits_declaration,installation.cont_puits_situation,installation.cont_puits_terrain_mitoyen,installation.observations,installation.maj,installation.maj_date,installation."create",installation.create_date,installation.archivage,installation.geom,installation.photo_f,installation.document_f,(installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier,v_commune.nom AS commune,v_vmap_parcelle_all_geom.section,v_vmap_parcelle_all_geom.parcelle,count(controle_1.*) AS nb_controle,controle_2.last_date_control,controle_2.cl_avis,controle_3.next_control,controle_4.cl_classe_cbf AS classement_installation	FROM s_anc.installation LEFT JOIN s_anc.controle controle_1 ON installation.id_installation = controle_1.id_installation LEFT JOIN ( SELECT b.last_date_control, b.id_installation,controle.cl_avis FROM ( SELECT max(a.des_date_control) AS last_date_control,a.id_installation FROM ( SELECT controle_a.des_date_control,controle_a.id_installation FROM s_anc.controle controle_a WHERE controle_a.des_date_control < now()) a GROUP BY a.id_installation ORDER BY a.id_installation) b LEFT JOIN s_anc.controle ON b.id_installation = controle.id_installation AND b.last_date_control = controle.des_date_control) controle_2 ON installation.id_installation = controle_2.id_installation LEFT JOIN ( SELECT b.next_control,b.id_installation FROM ( SELECT min(a.next_control) AS next_control,a.id_installation FROM ( SELECT controle_b.id_installation,controle_b.des_date_control + '1 year'::interval * controle_b.des_interval_control::double precision AS next_control FROM s_anc.controle controle_b WHERE controle_b.des_interval_control > 0 AND (controle_b.des_date_control + '1 year'::interval * controle_b.des_interval_control::double precision) > now()) a GROUP BY a.id_installation ORDER BY a.id_installation) b) controle_3 ON installation.id_installation = controle_3.id_installation LEFT JOIN ( SELECT controle.cl_classe_cbf,b.id_installation FROM ( SELECT max(a.des_date_control) AS last_date_controle,a.id_installation FROM ( SELECT controle_c.des_date_control,controle_c.id_installation FROM s_anc.controle controle_c WHERE controle_c.des_date_control < now() AND controle_c.controle_type::text <> 'CONCEPTION'::text) a GROUP BY a.id_installation ORDER BY a.id_installation) b LEFT JOIN s_anc.controle ON b.id_installation = controle.id_installation AND b.last_date_controle = controle.des_date_control) controle_4 ON installation.id_installation = controle_4.id_installation LEFT JOIN s_cadastre.v_commune ON installation.id_com::bpchar = v_commune.id_com LEFT JOIN s_cadastre.v_vmap_parcelle_all_geom ON installation.id_parc::bpchar = v_vmap_parcelle_all_geom.id_par WHERE installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text) GROUP BY installation.id_installation, v_commune.nom, v_vmap_parcelle_all_geom.section, v_vmap_parcelle_all_geom.parcelle, controle_2.cl_avis, controle_2.last_date_control, controle_3.next_control, controle_4.cl_classe_cbf;
+					ALTER TABLE s_anc.v_installation OWNER TO postgres;
+					GRANT ALL ON TABLE s_anc.v_installation TO postgres;
+					GRANT ALL ON TABLE s_anc.v_installation TO u_vitis;
+					GRANT ALL ON TABLE s_anc.v_installation TO anc_admin;
+					GRANT ALL ON TABLE s_anc.v_installation TO anc_user;
+					CREATE OR REPLACE RULE delete_v_installation AS ON DELETE TO s_anc.v_installation DO INSTEAD  DELETE FROM s_anc.installation WHERE installation.id_installation = old.id_installation;
+					CREATE OR REPLACE RULE insert_v_installation AS ON INSERT TO s_anc.v_installation DO INSTEAD  INSERT INTO s_anc.installation (id_installation, id_com, id_parc, parc_sup, parc_parcelle_associees, parc_adresse, code_postal, parc_commune, prop_titre, prop_nom_prenom, prop_adresse, prop_code_postal, prop_commune, prop_tel, prop_mail, bati_type, bati_ca_nb_pp, bati_ca_nb_eh, bati_ca_nb_chambres, bati_ca_nb_autres_pieces, bati_ca_nb_occupant, bati_nb_a_control, bati_date_achat, bati_date_mutation, cont_zone_enjeu, cont_zone_sage, cont_zone_autre, cont_zone_urba, cont_zone_anc, cont_alim_eau_potable, cont_puits_usage, cont_puits_declaration, cont_puits_situation, cont_puits_terrain_mitoyen, observations, maj, maj_date, "create", create_date, archivage, geom, photo_f, document_f) VALUES (new.id_installation, new.id_com, new.id_parc, new.parc_sup, new.parc_parcelle_associees, new.parc_adresse, new.code_postal, new.parc_commune, new.prop_titre, new.prop_nom_prenom, new.prop_adresse, new.prop_code_postal, new.prop_commune, new.prop_tel, new.prop_mail, new.bati_type, new.bati_ca_nb_pp, new.bati_ca_nb_eh, new.bati_ca_nb_chambres, new.bati_ca_nb_autres_pieces, new.bati_ca_nb_occupant, new.bati_nb_a_control, new.bati_date_achat, new.bati_date_mutation, new.cont_zone_enjeu, new.cont_zone_sage, new.cont_zone_autre, new.cont_zone_urba, new.cont_zone_anc, new.cont_alim_eau_potable, new.cont_puits_usage, new.cont_puits_declaration, new.cont_puits_situation, new.cont_puits_terrain_mitoyen, new.observations, new.maj, new.maj_date, new."create", new.create_date, new.archivage, new.geom, new.photo_f, new.document_f) RETURNING installation.id_installation,installation.id_com,installation.id_parc,installation.parc_sup,installation.parc_parcelle_associees,installation.parc_adresse,installation.code_postal,installation.parc_commune,installation.prop_titre,installation.prop_nom_prenom,installation.prop_adresse,installation.prop_code_postal,installation.prop_commune,installation.prop_tel,installation.prop_mail,installation.bati_type,installation.bati_ca_nb_pp,installation.bati_ca_nb_eh,installation.bati_ca_nb_chambres,installation.bati_ca_nb_autres_pieces,installation.bati_ca_nb_occupant,installation.bati_nb_a_control,installation.bati_date_achat,installation.bati_date_mutation,installation.cont_zone_enjeu,installation.cont_zone_sage,installation.cont_zone_autre,installation.cont_zone_urba,installation.cont_zone_anc,installation.cont_alim_eau_potable,installation.cont_puits_usage,installation.cont_puits_declaration,installation.cont_puits_situation,installation.cont_puits_terrain_mitoyen,installation.observations,installation.maj,installation.maj_date,installation."create",installation.create_date,installation.archivage,installation.geom,installation.photo_f,installation.document_f,(installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier,( SELECT commune.texte AS commune FROM s_cadastre.commune WHERE commune.id_com = installation.id_com::bpchar) AS commune,( SELECT parcelle.section FROM s_cadastre.parcelle WHERE parcelle.id_par = installation.id_parc::bpchar) AS section,( SELECT parcelle.parcelle FROM s_cadastre.parcelle WHERE parcelle.id_par = installation.id_parc::bpchar) AS parcelle,( SELECT count(*) AS nb_controle FROM s_anc.controle WHERE controle.id_installation = installation.id_installation) AS nb_controle,( SELECT controle.des_date_control FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation ORDER BY controle.des_date_control DESC LIMIT 1) AS last_date_control,( SELECT controle.cl_avis FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation ORDER BY controle.des_date_control DESC LIMIT 1) AS cl_avis,( SELECT controle.des_date_control + '1 year'::interval * controle.des_interval_control::double precision AS next_control FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation ORDER BY controle.des_date_control LIMIT 1) AS next_control,( SELECT controle.cl_classe_cbf FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation AND controle.controle_type::text <> 'CONCEPTION'::text ORDER BY controle.des_date_control DESC LIMIT 1) AS classement_installation;
+					CREATE OR REPLACE RULE update_v_installation AS ON UPDATE TO s_anc.v_installation DO INSTEAD  UPDATE s_anc.installation SET id_com = new.id_com, id_parc = new.id_parc, parc_sup = new.parc_sup, parc_parcelle_associees = new.parc_parcelle_associees, parc_adresse = new.parc_adresse, code_postal = new.code_postal, parc_commune = new.parc_commune, prop_titre = new.prop_titre, prop_nom_prenom = new.prop_nom_prenom, prop_adresse = new.prop_adresse, prop_code_postal = new.prop_code_postal, prop_commune = new.prop_commune, prop_tel = new.prop_tel, prop_mail = new.prop_mail, bati_type = new.bati_type, bati_ca_nb_pp = new.bati_ca_nb_pp, bati_ca_nb_eh = new.bati_ca_nb_eh, bati_ca_nb_chambres = new.bati_ca_nb_chambres, bati_ca_nb_autres_pieces = new.bati_ca_nb_autres_pieces, bati_ca_nb_occupant = new.bati_ca_nb_occupant, bati_nb_a_control = new.bati_nb_a_control, bati_date_achat = new.bati_date_achat, bati_date_mutation = new.bati_date_mutation, cont_zone_enjeu = new.cont_zone_enjeu, cont_zone_sage = new.cont_zone_sage, cont_zone_autre = new.cont_zone_autre, cont_zone_urba = new.cont_zone_urba, cont_zone_anc = new.cont_zone_anc, cont_alim_eau_potable = new.cont_alim_eau_potable, cont_puits_usage = new.cont_puits_usage, cont_puits_declaration = new.cont_puits_declaration, cont_puits_situation = new.cont_puits_situation, cont_puits_terrain_mitoyen = new.cont_puits_terrain_mitoyen, observations = new.observations, maj = new.maj, maj_date = new.maj_date, "create" = new."create", create_date = new.create_date, archivage = new.archivage, geom = new.geom, photo_f = new.photo_f, document_f = new.document_f WHERE installation.id_installation = new.id_installation;
+					CREATE OR REPLACE RULE insert_v_controle AS ON INSERT TO s_anc.v_controle DO INSTEAD  INSERT INTO s_anc.controle (id_controle, id_installation, controle_type, controle_ss_type, des_date_control, des_interval_control, des_pers_control, des_agent_control, des_installateur, des_refus_visite, des_date_installation, des_date_recommande, des_numero_recommande, dep_date_depot, dep_liste_piece, dep_dossier_complet, dep_date_envoi_incomplet, des_nature_projet, des_concepteur, des_ancien_disp, car_surface_dispo_m2, car_permea, car_valeur_permea, car_hydromorphie, car_prof_app, car_nappe_fond, car_terrain_innondable, car_roche_sol, car_dist_hab, car_dist_lim_par, car_dist_veget, car_dist_puit, des_reamenage_terrain, des_reamenage_immeuble, des_real_trvx, des_anc_ss_accord, des_collecte_ep, des_sep_ep_eu, des_eu_nb_sortie, des_eu_tes_regards, des_eu_pente_ecoul, des_eu_regars_acces, des_eu_alteration, des_eu_ecoulement, des_eu_depot_regard, des_commentaire, ts_conforme, ts_type_effluent, ts_capacite_bac, ts_nb_bac, ts_coher_taille_util, ts_aire_etanche, ts_aire_abri, ts_ventilation, ts_cuve_etanche, ts_val_comp, ts_ruissel_ep, ts_absence_nuisance, ts_respect_regles, ts_commentaires, vt_primaire, vt_secondaire, vt_prim_loc, vt_prim_ht, vt_prim_diam, vt_prim_type_extract, vt_second_loc, vt_second_ht, vt_second_diam, vt_second_type_extract, da_chasse_acces, da_chasse_auto, da_chasse_pr_nat_eau, da_chasse_ok, da_chasse_dysfonctionnement, da_chasse_degradation, da_chasse_entretien, da_pr_loc_pompe, da_pr_acces, da_pr_nb_pompe, da_pr_nat_eau, da_pr_ventilatio, da_pr_ok, da_pr_alarme, da_pr_clapet, da_pr_etanche, da_pr_branchement, da_pr_dysfonctionnement, da_pr_degradation, da_pr_entretien, da_commentaires, cl_avis, cl_classe_cbf, cl_commentaires, cl_date_avis, cl_auteur_avis, cl_date_prochain_control, cl_montant, cl_facture, cl_facture_le, maj, maj_date, "create", create_date, cloturer, photos_f, fiche_f, rapport_f, schema_f, documents_f, plan_f, cl_constat, cl_travaux, vt_commentaire, tra_vm_geomembrane, emplacement_vt_secondaire, vt_prim_type_materiau, vt_second_type_materiau) VALUES (new.id_controle, new.id_installation, new.controle_type, new.controle_ss_type, new.des_date_control, new.des_interval_control, new.des_pers_control, new.des_agent_control, new.des_installateur, new.des_refus_visite, new.des_date_installation, new.des_date_recommande, new.des_numero_recommande, new.dep_date_depot, new.dep_liste_piece, new.dep_dossier_complet, new.dep_date_envoi_incomplet, new.des_nature_projet, new.des_concepteur, new.des_ancien_disp, new.car_surface_dispo_m2, new.car_permea, new.car_valeur_permea, new.car_hydromorphie, new.car_prof_app, new.car_nappe_fond, new.car_terrain_innondable, new.car_roche_sol, new.car_dist_hab, new.car_dist_lim_par, new.car_dist_veget, new.car_dist_puit, new.des_reamenage_terrain, new.des_reamenage_immeuble, new.des_real_trvx, new.des_anc_ss_accord, new.des_collecte_ep, new.des_sep_ep_eu, new.des_eu_nb_sortie, new.des_eu_tes_regards, new.des_eu_pente_ecoul, new.des_eu_regars_acces, new.des_eu_alteration, new.des_eu_ecoulement, new.des_eu_depot_regard, new.des_commentaire, new.ts_conforme, new.ts_type_effluent, new.ts_capacite_bac, new.ts_nb_bac, new.ts_coher_taille_util, new.ts_aire_etanche, new.ts_aire_abri, new.ts_ventilation, new.ts_cuve_etanche, new.ts_val_comp, new.ts_ruissel_ep, new.ts_absence_nuisance, new.ts_respect_regles, new.ts_commentaires, new.vt_primaire, new.vt_secondaire, new.vt_prim_loc, new.vt_prim_ht, new.vt_prim_diam, new.vt_prim_type_extract, new.vt_second_loc, new.vt_second_ht, new.vt_second_diam, new.vt_second_type_extract, new.da_chasse_acces, new.da_chasse_auto, new.da_chasse_pr_nat_eau, new.da_chasse_ok, new.da_chasse_dysfonctionnement, new.da_chasse_degradation, new.da_chasse_entretien, new.da_pr_loc_pompe, new.da_pr_acces, new.da_pr_nb_pompe, new.da_pr_nat_eau, new.da_pr_ventilatio, new.da_pr_ok, new.da_pr_alarme, new.da_pr_clapet, new.da_pr_etanche, new.da_pr_branchement, new.da_pr_dysfonctionnement, new.da_pr_degradation, new.da_pr_entretien, new.da_commentaires, new.cl_avis, new.cl_classe_cbf, new.cl_commentaires, new.cl_date_avis, new.cl_auteur_avis, new.cl_date_prochain_control, new.cl_montant, new.cl_facture, new.cl_facture_le, new.maj, new.maj_date, new."create", new.create_date, new.cloturer, new.photos_f, new.fiche_f, new.rapport_f, new.schema_f, new.documents_f, new.plan_f, new.cl_constat, new.cl_travaux, new.vt_commentaire, new.tra_vm_geomembrane, new.emplacement_vt_secondaire, new.vt_prim_type_materiau, new.vt_second_type_materiau) RETURNING controle.id_controle,controle.id_installation,( SELECT (v_installation.id_com::text || '_anc_'::text) || v_installation.id_installation AS num_dossier FROM s_anc.v_installation WHERE v_installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text) AND controle.id_installation = v_installation.id_installation) AS num_dossier,controle.controle_type,controle.controle_ss_type,controle.des_date_control,controle.des_interval_control,controle.des_pers_control,controle.des_agent_control,controle.des_installateur,controle.des_refus_visite,controle.des_date_installation,controle.des_date_recommande,controle.des_numero_recommande,controle.dep_date_depot,controle.dep_liste_piece,controle.dep_dossier_complet,controle.dep_date_envoi_incomplet,controle.des_nature_projet,controle.des_concepteur,controle.des_ancien_disp,controle.car_surface_dispo_m2,controle.car_permea,controle.car_valeur_permea,controle.car_hydromorphie,controle.car_prof_app,controle.car_nappe_fond,controle.car_terrain_innondable,controle.car_roche_sol,controle.car_dist_hab,controle.car_dist_lim_par,controle.car_dist_veget,controle.car_dist_puit,controle.des_reamenage_terrain,controle.des_reamenage_immeuble,controle.des_real_trvx,controle.des_anc_ss_accord,controle.des_collecte_ep,controle.des_sep_ep_eu,controle.des_eu_nb_sortie,controle.des_eu_tes_regards,controle.des_eu_pente_ecoul,controle.des_eu_regars_acces,controle.des_eu_alteration,controle.des_eu_ecoulement,controle.des_eu_depot_regard,controle.des_commentaire,controle.ts_conforme,controle.ts_type_effluent,controle.ts_capacite_bac,controle.ts_nb_bac,controle.ts_coher_taille_util,controle.ts_aire_etanche,controle.ts_aire_abri,controle.ts_ventilation,controle.ts_cuve_etanche,controle.ts_val_comp,controle.ts_ruissel_ep,controle.ts_absence_nuisance,controle.ts_respect_regles,controle.ts_commentaires,controle.vt_primaire,controle.vt_secondaire,controle.vt_prim_loc,controle.vt_prim_ht,controle.vt_prim_diam,controle.vt_prim_type_extract,controle.vt_second_loc,controle.vt_second_ht,controle.vt_second_diam,controle.vt_second_type_extract,controle.da_chasse_acces,controle.da_chasse_auto,controle.da_chasse_pr_nat_eau,controle.da_chasse_ok,controle.da_chasse_dysfonctionnement,controle.da_chasse_degradation,controle.da_chasse_entretien,controle.da_pr_loc_pompe,controle.da_pr_acces,controle.da_pr_nb_pompe,controle.da_pr_nat_eau,controle.da_pr_ventilatio,controle.da_pr_ok,controle.da_pr_alarme,controle.da_pr_clapet,controle.da_pr_etanche,controle.da_pr_branchement,controle.da_pr_dysfonctionnement,controle.da_pr_degradation,controle.da_pr_entretien,controle.da_commentaires,controle.cl_avis,controle.cl_classe_cbf,controle.cl_commentaires,controle.cl_date_avis,controle.cl_auteur_avis,controle.cl_date_prochain_control,controle.cl_montant,controle.cl_facture,controle.cl_facture_le,controle.maj,controle.maj_date,controle."create",controle.create_date,controle.cloturer,controle.photos_f,controle.fiche_f,controle.rapport_f,controle.schema_f,controle.documents_f,controle.plan_f,controle.cl_constat,controle.cl_travaux,controle.vt_commentaire,controle.tra_vm_geomembrane,controle.emplacement_vt_secondaire,controle.vt_prim_type_materiau,controle.vt_second_type_materiau;
+					-- Frédéric 17/01/2019 12:04
+					ALTER TABLE s_anc.traitement ADD COLUMN tra_commentaire text;
+					DROP VIEW s_anc.v_traitement;
+					CREATE OR REPLACE VIEW s_anc.v_traitement AS SELECT traitement.id_traitement,traitement.id_controle,traitement.tra_type,traitement.tra_nb,traitement.tra_long,traitement.tra_larg,traitement.tra_tot_lin,traitement.tra_surf,traitement.tra_largeur,traitement.tra_hauteur,traitement.tra_profondeur,traitement.tra_dist_hab,traitement.tra_dist_lim_parc,traitement.tra_dist_veget,traitement.tra_dist_puit,traitement.tra_vm_racine,traitement.tra_vm_humidite,traitement.tra_vm_imper,traitement.tra_vm_geogrille,traitement.tra_vm_grav_qual,traitement.tra_vm_grav_ep,traitement.tra_vm_geo_text,traitement.tra_vm_ht_terre_veget,traitement.tra_vm_tuy_perf,traitement.tra_vm_bon_mat,traitement.tra_vm_sab_ep,traitement.tra_vm_sab_qual,traitement.tra_regrep_mat,traitement.tra_regrep_affl,traitement.tra_regrep_equi,traitement.tra_regrep_perf,traitement.tra_regbl_mat,traitement.tra_regbl_affl,traitement.tra_regbl_hz,traitement.tra_regbl_epand,traitement.tra_regbl_perf,traitement.tra_regcol_mat,traitement.tra_regcol_affl,traitement.tra_regcol_hz,traitement.maj,traitement.maj_date,traitement."create",traitement.create_date,traitement.photos_f,traitement.fiche_f,traitement.schema_f,traitement.documents_f,traitement.plan_f,controle.id_installation,controle.controle_type,(installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier,traitement.tra_longueur,traitement.tra_profond,traitement.tra_commentaire FROM s_anc.traitement LEFT JOIN s_anc.controle ON traitement.id_controle = controle.id_controle LEFT JOIN s_anc.installation ON controle.id_installation = installation.id_installation WHERE installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text);
+					ALTER TABLE s_anc.v_traitement OWNER TO u_vitis;
+					GRANT ALL ON TABLE s_anc.v_traitement TO u_vitis;
+					GRANT ALL ON TABLE s_anc.v_traitement TO anc_admin;
+					GRANT ALL ON TABLE s_anc.v_traitement TO anc_user;
+					CREATE OR REPLACE RULE delete_v_traitement AS ON DELETE TO s_anc.v_traitement DO INSTEAD  DELETE FROM s_anc.traitement WHERE traitement.id_traitement = old.id_traitement;
+					CREATE OR REPLACE RULE insert_v_traitement AS ON INSERT TO s_anc.v_traitement DO INSTEAD  INSERT INTO s_anc.traitement (id_traitement, id_controle, tra_type, tra_nb, tra_long, tra_larg, tra_tot_lin, tra_surf, tra_largeur, tra_hauteur, tra_profondeur, tra_dist_hab, tra_dist_lim_parc, tra_dist_veget, tra_dist_puit, tra_vm_racine, tra_vm_humidite, tra_vm_imper, tra_vm_geogrille, tra_vm_grav_qual, tra_vm_grav_ep, tra_vm_geo_text, tra_vm_ht_terre_veget, tra_vm_tuy_perf, tra_vm_bon_mat, tra_vm_sab_ep, tra_vm_sab_qual, tra_regrep_mat, tra_regrep_affl, tra_regrep_equi, tra_regrep_perf, tra_regbl_mat, tra_regbl_affl, tra_regbl_hz, tra_regbl_epand, tra_regbl_perf, tra_regcol_mat, tra_regcol_affl, tra_regcol_hz, maj, maj_date, "create", create_date, photos_f, fiche_f, schema_f, documents_f, plan_f, tra_longueur, tra_profond, tra_commentaire) VALUES (new.id_traitement, new.id_controle, new.tra_type, new.tra_nb, new.tra_long, new.tra_larg, new.tra_tot_lin, new.tra_surf, new.tra_largeur, new.tra_hauteur, new.tra_profondeur, new.tra_dist_hab, new.tra_dist_lim_parc, new.tra_dist_veget, new.tra_dist_puit, new.tra_vm_racine, new.tra_vm_humidite, new.tra_vm_imper, new.tra_vm_geogrille, new.tra_vm_grav_qual, new.tra_vm_grav_ep, new.tra_vm_geo_text, new.tra_vm_ht_terre_veget, new.tra_vm_tuy_perf, new.tra_vm_bon_mat, new.tra_vm_sab_ep, new.tra_vm_sab_qual, new.tra_regrep_mat, new.tra_regrep_affl, new.tra_regrep_equi, new.tra_regrep_perf, new.tra_regbl_mat, new.tra_regbl_affl, new.tra_regbl_hz, new.tra_regbl_epand, new.tra_regbl_perf, new.tra_regcol_mat, new.tra_regcol_affl, new.tra_regcol_hz, new.maj, new.maj_date, new."create", new.create_date, new.photos_f, new.fiche_f, new.schema_f, new.documents_f, new.plan_f, new.tra_longueur, new.tra_profond, new.tra_commentaire) RETURNING traitement.id_traitement,traitement.id_controle,traitement.tra_type,traitement.tra_nb,traitement.tra_long,traitement.tra_larg,traitement.tra_tot_lin,traitement.tra_surf,traitement.tra_largeur,traitement.tra_hauteur,traitement.tra_profondeur,traitement.tra_dist_hab,traitement.tra_dist_lim_parc,traitement.tra_dist_veget,traitement.tra_dist_puit,traitement.tra_vm_racine,traitement.tra_vm_humidite,traitement.tra_vm_imper,traitement.tra_vm_geogrille,traitement.tra_vm_grav_qual,traitement.tra_vm_grav_ep,traitement.tra_vm_geo_text,traitement.tra_vm_ht_terre_veget,traitement.tra_vm_tuy_perf,traitement.tra_vm_bon_mat,traitement.tra_vm_sab_ep,traitement.tra_vm_sab_qual,traitement.tra_regrep_mat,traitement.tra_regrep_affl,traitement.tra_regrep_equi,traitement.tra_regrep_perf,traitement.tra_regbl_mat,traitement.tra_regbl_affl,traitement.tra_regbl_hz,traitement.tra_regbl_epand,traitement.tra_regbl_perf,traitement.tra_regcol_mat,traitement.tra_regcol_affl,traitement.tra_regcol_hz,traitement.maj,traitement.maj_date,traitement."create",traitement.create_date,traitement.photos_f,traitement.fiche_f,traitement.schema_f,traitement.documents_f,traitement.plan_f, ( SELECT controle.id_installation FROM s_anc.controle WHERE traitement.id_controle = controle.id_controle) AS id_installation, ( SELECT controle.controle_type FROM s_anc.controle WHERE traitement.id_controle = controle.id_controle) AS controle_type, ( SELECT (installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier FROM s_anc.installation WHERE installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text) AND installation.id_installation = installation.id_installation) AS num_dossier,traitement.tra_longueur,traitement.tra_profond,traitement.tra_commentaire;
+					CREATE OR REPLACE RULE update_v_traitement AS ON UPDATE TO s_anc.v_traitement DO INSTEAD  UPDATE s_anc.traitement SET id_traitement = new.id_traitement, id_controle = new.id_controle, tra_type = new.tra_type, tra_nb = new.tra_nb, tra_long = new.tra_long, tra_larg = new.tra_larg, tra_tot_lin = new.tra_tot_lin, tra_surf = new.tra_surf, tra_largeur = new.tra_largeur, tra_hauteur = new.tra_hauteur, tra_profondeur = new.tra_profondeur, tra_dist_hab = new.tra_dist_hab, tra_dist_lim_parc = new.tra_dist_lim_parc, tra_dist_veget = new.tra_dist_veget, tra_dist_puit = new.tra_dist_puit, tra_vm_racine = new.tra_vm_racine, tra_vm_humidite = new.tra_vm_humidite, tra_vm_imper = new.tra_vm_imper, tra_vm_geogrille = new.tra_vm_geogrille, tra_vm_grav_qual = new.tra_vm_grav_qual, tra_vm_grav_ep = new.tra_vm_grav_ep, tra_vm_geo_text = new.tra_vm_geo_text, tra_vm_ht_terre_veget = new.tra_vm_ht_terre_veget, tra_vm_tuy_perf = new.tra_vm_tuy_perf, tra_vm_bon_mat = new.tra_vm_bon_mat, tra_vm_sab_ep = new.tra_vm_sab_ep, tra_vm_sab_qual = new.tra_vm_sab_qual, tra_regrep_mat = new.tra_regrep_mat, tra_regrep_affl = new.tra_regrep_affl, tra_regrep_equi = new.tra_regrep_equi, tra_regrep_perf = new.tra_regrep_perf, tra_regbl_mat = new.tra_regbl_mat, tra_regbl_affl = new.tra_regbl_affl, tra_regbl_hz = new.tra_regbl_hz, tra_regbl_epand = new.tra_regbl_epand, tra_regbl_perf = new.tra_regbl_perf, tra_regcol_mat = new.tra_regcol_mat, tra_regcol_affl = new.tra_regcol_affl, tra_regcol_hz = new.tra_regcol_hz, maj = new.maj, maj_date = new.maj_date, "create" = new."create", create_date = new.create_date, photos_f = new.photos_f, fiche_f = new.fiche_f, schema_f = new.schema_f, documents_f = new.documents_f, plan_f = new.plan_f, tra_longueur = new.tra_longueur, tra_profond = new.tra_profond, tra_commentaire = new.tra_commentaire WHERE traitement.id_traitement = new.id_traitement;
+				]]>
+			</code>
+		</query>
 	</queriesCollection>
 </sqlQueries>
diff --git a/web_service/ws/Anc.class.inc b/web_service/ws/Anc.class.inc
index 02e930b9b1167af55d50459475a0d9fd1e4e18c0..b101f7e20a08b8d068f7871356deb92fec1779c8 100755
--- a/web_service/ws/Anc.class.inc
+++ b/web_service/ws/Anc.class.inc
@@ -8,8 +8,9 @@ class Anc extends Vitis {
 
     //Chemin du fichier de ressources contenant les requêtes SQL
     var $sRessourcesFile = 'ws/anc/Anc.class.sql.inc';
-    
+
     /**
+     * DEPRECATED
      * Upload un document dans le ws_data du module Anc.
      * @param type $sIndex
      * @param type $sFolder
@@ -38,4 +39,4 @@ class Anc extends Vitis {
         }
     }
 }
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Controle.class.inc b/web_service/ws/Controle.class.inc
index 0aafbd8a8ccf6947a7c23f653647f727a2b8da3a..aa8ebe27980eca688b4b391d235a545eba457101 100755
--- a/web_service/ws/Controle.class.inc
+++ b/web_service/ws/Controle.class.inc
@@ -14,7 +14,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Controle php class
  *
  * This class defines operation for one Controle
- * 
+ *
  */
 class Controle extends Anc {
 
@@ -32,10 +32,11 @@ class Controle extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
-     * @SWG\Get(path="/controles/{id_controle}", 
+     * @SWG\Get(path="/controles/{id_controle}",
      *   tags={"Controles"},
      *   summary="Get Controle",
      *   description="Request to get Controle by id",
@@ -75,22 +76,7 @@ class Controle extends Anc {
      * get informations about mode
      */
     function GET() {
-        $this->aFields = $this->getFields($this->aProperties['schema_anc'], "v_controle", "id_controle");
-        // Url des fichiers.
-        $sWsDataUrl = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_controle/documents/' . $this->aValues["my_vitis_id"];
-        if (!empty($this->aFields['photos_f']))
-            $this->aFields['photos_f'] = $sWsDataUrl . '/photos_f/' . $this->aFields['photos_f'];
-        if (!empty($this->aFields['fiche_f']))
-            $this->aFields['fiche_f'] = $sWsDataUrl . '/fiche_f/' . $this->aFields['fiche_f'];
-        if (!empty($this->aFields['rapport_f']))
-            $this->aFields['rapport_f'] = $sWsDataUrl . '/rapport_f/' . $this->aFields['rapport_f'];
-        if (!empty($this->aFields['schema_f']))
-            $this->aFields['schema_f'] = $sWsDataUrl . '/schema_f/' . $this->aFields['schema_f'];
-        if (!empty($this->aFields['documents_f']))
-            $this->aFields['documents_f'] = $sWsDataUrl . '/documents_f/' . $this->aFields['documents_f'];
-        if (!empty($this->aFields['plan_f']))
-            $this->aFields['plan_f'] = $sWsDataUrl . '/plan_f/' . $this->aFields['plan_f'];
-
+        $this->aFields = $this->getFields($this->aProperties['schema_anc'], 'v_controle', 'id_controle', 'anc_saisie_anc_controle', $this->aProperties['anc']['files_container']);
         // Champ sur lequel sera fait le typage pour changer les styles etc..
         $this->sTyleField = 'composant_type';
         // custom_form du controle pour map_workbench
@@ -208,7 +194,7 @@ class Controle extends Anc {
         if (!empty($aStyle['image'])) {
             $aGeoJSONStyle['draw']['image'] = $aStyle['image'];
         }
-        // Text    
+        // Text
         if (!empty($aStyle['text_font'])) {
             $aGeoJSONStyle['text']['font'] = $aStyle['text_font'];
         }
@@ -260,4 +246,4 @@ class Controle extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Controles.class.inc b/web_service/ws/Controles.class.inc
index 51f0e88c7d2abcd385131fe9cdd8219279b9d7b8..74b669c39827087d60d115f2f656d895b168f86d 100755
--- a/web_service/ws/Controles.class.inc
+++ b/web_service/ws/Controles.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Controles php class
  *
  * This class defines Rest Api to Vitis Controles
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Controle.class.inc';
@@ -44,6 +44,7 @@ class Controles extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
@@ -162,19 +163,7 @@ class Controles extends Anc {
             //$this->aValues['des_date_control'] = date('Y-m-d');
         if (empty($this->aValues['des_interval_control']))
             $this->aValues['des_interval_control'] = 0;
-        // Sauve le nom des fichiers.
-        if (!empty($_FILES['photos_f']))
-            $this->aValues['photos_f'] = $_FILES['photos_f']["name"];
-        if (!empty($_FILES['fiche_f']))
-            $this->aValues['fiche_f'] = $_FILES['fiche_f']["name"];
-        if (!empty($_FILES['rapport_f']))
-            $this->aValues['rapport_f'] = $_FILES['rapport_f']["name"];
-        if (!empty($_FILES['schema_f']))
-            $this->aValues['schema_f'] = $_FILES['schema_f']["name"];
-        if (!empty($_FILES['documents_f']))
-            $this->aValues['documents_f'] = $_FILES['documents_f']["name"];
-        if (!empty($_FILES['plan_f']))
-            $this->aValues['plan_f'] = $_FILES['plan_f']["name"];
+
         // Conversion des dates
         $aDates = array('cl_date_avis', 'cl_facture_le', 'des_date_installation', 'des_date_recommande', 'dep_date_depot', 'dep_date_envoi_incomplet', 'des_date_control');
         foreach ($aDates as $sDate) {
@@ -185,16 +174,20 @@ class Controles extends Anc {
                     $this->aValues[$sDate] = date_format(date_create_from_format('d/m/Y', $this->aValues[$sDate]), 'Y-m-d');
             }
         }
-        //
-        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_controle', $this->aProperties['schema_anc'] . '.controle_id_controle_seq', 'id_controle');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('rapport_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_controle');
-        //
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'rapport_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Post
+        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_controle', $this->aProperties['schema_anc'] . '.controle_id_controle_seq', 'id_controle', $aUploadFiles, 'anc_saisie_anc_controle', $this->aProperties['anc']['files_container']);
+
         return $aReturn['sMessage'];
     }
 
@@ -237,13 +230,6 @@ class Controles extends Anc {
             $this->aValues['maj'] = $_SESSION["ses_Login"];
         if (empty($this->aValues['maj_date']))
             $this->aValues['maj_date'] = date('Y-m-d');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('rapport_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_controle');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_controle');
 
         // Si il y a des composants à ajouter/supprimer/mettre à jour
         if (!empty($this->aValues['composants'])) {
@@ -267,8 +253,19 @@ class Controles extends Anc {
                     $this->aValues[$sDate] = date_format(date_create_from_format('d/m/Y', $this->aValues[$sDate]), 'Y-m-d');
             }
         }
-        //
-        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_controle', 'id_controle');
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'rapport_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Mise à jour
+        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_controle', 'id_controle', $aUploadFiles, 'anc_saisie_anc_controle', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -411,14 +408,6 @@ class Controles extends Anc {
 
         // Supprime les objets dépendants
         $this->deleteControleDependencies($this->aValues['idList']);
-
-//        $aParams['idControle'] = array('value' => $this->aValues['id_controle'], 'type' => 'integer');
-//        $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getInstallationControls'], $aParams);
-//        if ($this->oConnection->oBd->enErreur()) {
-//            $aReturn = array('status' => 0, 'message' => $this->oConnection->oBd->getBDMessage(), 'error_code' => 1);
-//            return json_encode($aReturn);
-//        }
-
         $aReturn = $this->genericDelete($this->aProperties['schema_anc'], 'v_controle', 'id_controle');
         return $aReturn['sMessage'];
     }
@@ -440,7 +429,7 @@ class Controles extends Anc {
 
         // Suppression dpépendance s_anc.traitement
         $this->deleteControleTraitements($sIdControles);
-        
+
         // Suppression dpépendance s_anc.composant
         $this->deleteControleComposants($sIdControles);
     }
@@ -716,4 +705,4 @@ class Controles extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Entreprise.class.inc b/web_service/ws/Entreprise.class.inc
index 00bb4aece45baabc3d64902c330bfd6edabaa6fe..acb6df42df2a3bbae7edbe1b3aed0129c037ec94 100755
--- a/web_service/ws/Entreprise.class.inc
+++ b/web_service/ws/Entreprise.class.inc
@@ -12,7 +12,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Entreprise php class
  *
  * This class defines operation for one Entreprise
- * 
+ *
  */
 class Entreprise extends Anc {
 
@@ -30,11 +30,11 @@ class Entreprise extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
-        $this->aSelectedFields = Array("id_parametre_entreprises", "id_com", "siret", "raison_sociale", "nom_entreprise", "nom_contact", "telephone_fixe", "telephone_mobile", "web", "mail", "code_postal", "voie", "bureau_etude", "concepteur", "constructeur", "installateur", "vidangeur", "en_activite", "observations", "creat", "creat_date", "maj", "maj_date", "geom");
+        $this->aSelectedFields = Array("id_parametre_entreprises", "commune", "siret", "raison_sociale", "nom_entreprise", "nom_contact", "telephone_fixe", "telephone_mobile", "web", "mail", "code_postal", "voie", "bureau_etude", "concepteur", "constructeur", "installateur", "vidangeur", "en_activite", "observations", "creat", "creat_date", "maj", "maj_date", "geom");
     }
 
     /**
-     * @SWG\Get(path="/entreprises/{id_entreprise}", 
+     * @SWG\Get(path="/entreprises/{id_entreprise}",
      *   tags={"Entreprises"},
      *   summary="Get Entreprise",
      *   description="Request to get Entreprise by id",
@@ -91,4 +91,4 @@ class Entreprise extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Entreprises.class.inc b/web_service/ws/Entreprises.class.inc
index 625e00892081a0f50eb0fc4dbdfbf8f3b7b15e8e..25cdc54b0555421acf78651a5a4eac21c8e2dd83 100755
--- a/web_service/ws/Entreprises.class.inc
+++ b/web_service/ws/Entreprises.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Entreprises php class
  *
  * This class defines Rest Api to Vitis Entreprises
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Entreprise.class.inc';
@@ -40,7 +40,7 @@ class Entreprises extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
-        $this->aSelectedFields = Array("id_parametre_entreprises", "id_com", "siret", "raison_sociale", "nom_entreprise", "nom_contact", "telephone_fixe", "telephone_mobile", "web", "mail", "code_postal", "voie", "bureau_etude", "concepteur", "constructeur", "installateur", "vidangeur", "en_activite", "observations", "creat", "creat_date", "maj", "maj_date", "geom");
+        $this->aSelectedFields = Array("id_parametre_entreprises", "commune", "siret", "raison_sociale", "nom_entreprise", "nom_contact", "telephone_fixe", "telephone_mobile", "web", "mail", "code_postal", "voie", "bureau_etude", "concepteur", "constructeur", "installateur", "vidangeur", "en_activite", "observations", "creat", "creat_date", "maj", "maj_date", "geom");
     }
 
     /**
@@ -154,7 +154,7 @@ class Entreprises extends Anc {
      */
     function POST() {
         $this->aValues['creat'] = $_SESSION["ses_Login"];
-        $this->aValues['creat_date'] = date('Y-m-d');        
+        $this->aValues['creat_date'] = date('Y-m-d');
         $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'param_entreprise', $this->aProperties['schema_anc'].'.param_entreprise_id_parametre_entreprises_seq', 'id_parametre_entreprises');
         return $aReturn['sMessage'];
     }
@@ -269,4 +269,4 @@ class Entreprises extends Anc {
         return $aReturn['sMessage'];
     }
 }
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Evacuation_eaux.class.inc b/web_service/ws/Evacuation_eaux.class.inc
index 6021f86278c6e9665e92487dc22ea65966720923..47191074c3aaf4e75282a36dc643bfec8b897e80 100755
--- a/web_service/ws/Evacuation_eaux.class.inc
+++ b/web_service/ws/Evacuation_eaux.class.inc
@@ -12,7 +12,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Evacuation_eaux php class
  *
  * This class defines operation for one Evacuation_eaux
- * 
+ *
  */
 class Evacuation_eaux extends Anc {
 
@@ -30,10 +30,11 @@ class Evacuation_eaux extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
-     * @SWG\Get(path="/evacuation_eauxs/{id_evacuation_eaux}", 
+     * @SWG\Get(path="/evacuation_eauxs/{id_evacuation_eaux}",
      *   tags={"Evacuation_eauxs"},
      *   summary="Get Evacuation_eaux",
      *   description="Request to get Evacuation_eaux by id",
@@ -73,19 +74,7 @@ class Evacuation_eaux extends Anc {
      * get informations about mode
      */
     function GET() {
-        $this->aFields = $this->getFields($this->aProperties['schema_anc'], "v_evacuation_eaux", "id_eva");
-        // Url des fichiers.
-        $sWsDataUrl = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_evacuation_eaux/documents/' . $this->aValues["my_vitis_id"];
-        if (!empty($this->aFields['photos_f']))
-            $this->aFields['photos_f'] = $sWsDataUrl . '/photos_f/' . $this->aFields['photos_f'];
-        if (!empty($this->aFields['fiche_f']))
-            $this->aFields['fiche_f'] = $sWsDataUrl . '/fiche_f/' . $this->aFields['fiche_f'];
-        if (!empty($this->aFields['schema_f']))
-            $this->aFields['schema_f'] = $sWsDataUrl . '/schema_f/' . $this->aFields['schema_f'];
-        if (!empty($this->aFields['documents_f']))
-            $this->aFields['documents_f'] = $sWsDataUrl . '/documents_f/' . $this->aFields['documents_f'];
-        if (!empty($this->aFields['plan_f']))
-            $this->aFields['plan_f'] = $sWsDataUrl . '/plan_f/' . $this->aFields['plan_f'];
+        $this->aFields = $this->getFields($this->aProperties['schema_anc'], 'v_evacuation_eaux', 'id_eva', 'anc_saisie_anc_evacuation_eaux', $this->aProperties['anc']['files_container']);
     }
 
     /**
@@ -102,4 +91,4 @@ class Evacuation_eaux extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Evacuation_eauxs.class.inc b/web_service/ws/Evacuation_eauxs.class.inc
index e7bafb94f732b5ad60aaae77a4412bb8e8b3acc2..de866e5aa38af63cffe8eb050ba495993aa8b41f 100755
--- a/web_service/ws/Evacuation_eauxs.class.inc
+++ b/web_service/ws/Evacuation_eauxs.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Evacuation_eauxs php class
  *
  * This class defines Rest Api to Vitis Evacuation_eauxs
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Evacuation_eaux.class.inc';
@@ -40,6 +40,7 @@ class Evacuation_eauxs extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
@@ -154,26 +155,18 @@ class Evacuation_eauxs extends Anc {
     function POST() {
         $this->aValues['create'] = $_SESSION["ses_Login"];
         $this->aValues['create_date'] = date('Y-m-d');
-        // Sauve le nom des fichiers.
-        if (!empty($_FILES['photos_f']))
-            $this->aValues['photos_f'] = $_FILES['photos_f']["name"];
-        if (!empty($_FILES['fiche_f']))
-            $this->aValues['fiche_f'] = $_FILES['fiche_f']["name"];
-        if (!empty($_FILES['schema_f']))
-            $this->aValues['schema_f'] = $_FILES['schema_f']["name"];
-        if (!empty($_FILES['documents_f']))
-            $this->aValues['documents_f'] = $_FILES['documents_f']["name"];
-        if (!empty($_FILES['plan_f']))
-            $this->aValues['plan_f'] = $_FILES['plan_f']["name"];
-        //
-        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_evacuation_eaux', $this->aProperties['schema_anc'].'.evacuation_eaux_id_eva_seq', 'id_eva');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_evacuation_eaux');
-        //
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Post
+        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_evacuation_eaux', $this->aProperties['schema_anc'].'.evacuation_eaux_id_eva_seq', 'id_eva', $aUploadFiles, 'anc_saisie_anc_evacuation_eaux', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -216,14 +209,18 @@ class Evacuation_eauxs extends Anc {
             $this->aValues['maj'] = $_SESSION["ses_Login"];
         if (empty($this->aValues['maj_date']))
             $this->aValues['maj_date'] = date('Y-m-d');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_evacuation_eaux');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_evacuation_eaux');
-        //
-        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_evacuation_eaux', 'id_eva');
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Put
+        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_evacuation_eaux', 'id_eva', $aUploadFiles, 'anc_saisie_anc_evacuation_eaux', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -294,4 +291,4 @@ class Evacuation_eauxs extends Anc {
         return $aReturn['sMessage'];
     }
 }
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Filieres_agree.class.inc b/web_service/ws/Filieres_agree.class.inc
index 4630c33c038ea1a837f1dfc929a1cf947df132c8..a8af8ab19140cd31178184373302ed8b7152b0c7 100755
--- a/web_service/ws/Filieres_agree.class.inc
+++ b/web_service/ws/Filieres_agree.class.inc
@@ -12,7 +12,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Filieres_agree php class
  *
  * This class defines operation for one Filieres_agree
- * 
+ *
  */
 class Filieres_agree extends Anc {
 
@@ -30,10 +30,11 @@ class Filieres_agree extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
-     * @SWG\Get(path="/filieres_agrees/{id_filieres_agree}", 
+     * @SWG\Get(path="/filieres_agrees/{id_filieres_agree}",
      *   tags={"Filieres_agrees"},
      *   summary="Get Filieres_agree",
      *   description="Request to get Filieres_agree by id",
@@ -73,19 +74,7 @@ class Filieres_agree extends Anc {
      * get informations about mode
      */
     function GET() {
-        $this->aFields = $this->getFields($this->aProperties['schema_anc'], "v_filieres_agrees", "id_fag");
-        // Url des fichiers.
-        $sWsDataUrl = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_filieres_agree/documents/' . $this->aValues["my_vitis_id"];
-        if (!empty($this->aFields['photos_f']))
-            $this->aFields['photos_f'] = $sWsDataUrl . '/photos_f/' . $this->aFields['photos_f'];
-        if (!empty($this->aFields['fiche_f']))
-            $this->aFields['fiche_f'] = $sWsDataUrl . '/fiche_f/' . $this->aFields['fiche_f'];
-        if (!empty($this->aFields['schema_f']))
-            $this->aFields['schema_f'] = $sWsDataUrl . '/schema_f/' . $this->aFields['schema_f'];
-        if (!empty($this->aFields['documents_f']))
-            $this->aFields['documents_f'] = $sWsDataUrl . '/documents_f/' . $this->aFields['documents_f'];
-        if (!empty($this->aFields['plan_f']))
-            $this->aFields['plan_f'] = $sWsDataUrl . '/plan_f/' . $this->aFields['plan_f'];
+        $this->aFields = $this->getFields($this->aProperties['schema_anc'], 'v_filieres_agrees', 'id_fag', 'anc_saisie_anc_filieres_agree', $this->aProperties['anc']['files_container']);
     }
 
     /**
@@ -102,4 +91,4 @@ class Filieres_agree extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Filieres_agrees.class.inc b/web_service/ws/Filieres_agrees.class.inc
index f8480883e30010efa04cb9c20ad1db8747f33179..92aff066305f0f00934d7c52bea235d0cf5c2a55 100755
--- a/web_service/ws/Filieres_agrees.class.inc
+++ b/web_service/ws/Filieres_agrees.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Filieres_agrees php class
  *
  * This class defines Rest Api to Vitis Filieres_agrees
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Filieres_agree.class.inc';
@@ -40,6 +40,7 @@ class Filieres_agrees extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
@@ -154,17 +155,7 @@ class Filieres_agrees extends Anc {
     function POST() {
         $this->aValues['create'] = $_SESSION["ses_Login"];
         $this->aValues['create_date'] = date('Y-m-d');
-        // Sauve le nom des fichiers.
-        if (!empty($_FILES['photos_f']))
-            $this->aValues['photos_f'] = $_FILES['photos_f']["name"];
-        if (!empty($_FILES['fiche_f']))
-            $this->aValues['fiche_f'] = $_FILES['fiche_f']["name"];
-        if (!empty($_FILES['schema_f']))
-            $this->aValues['schema_f'] = $_FILES['schema_f']["name"];
-        if (!empty($_FILES['documents_f']))
-            $this->aValues['documents_f'] = $_FILES['documents_f']["name"];
-        if (!empty($_FILES['plan_f']))
-            $this->aValues['plan_f'] = $_FILES['plan_f']["name"];
+
         // Conversion des dates
         if (isset($this->aValues['fag_en_date'])) {
             if ($this->aValues['fag_en_date'] == '')
@@ -172,15 +163,18 @@ class Filieres_agrees extends Anc {
             else
                 $this->aValues['fag_en_date'] = date_format(date_create_from_format('d/m/Y', $this->aValues['fag_en_date']), 'Y-m-d');
         }
-        //
-        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_filieres_agrees', $this->aProperties['schema_anc'].'.filieres_agrees_id_fag_seq', 'id_fag');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_filieres_agree');
-        //
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Post
+        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_filieres_agrees', $this->aProperties['schema_anc'].'.filieres_agrees_id_fag_seq', 'id_fag', $aUploadFiles, 'anc_saisie_anc_filieres_agree', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -223,12 +217,7 @@ class Filieres_agrees extends Anc {
             $this->aValues['maj'] = $_SESSION["ses_Login"];
         if (empty($this->aValues['maj_date']))
             $this->aValues['maj_date'] = date('Y-m-d');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_filieres_agree');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_filieres_agree');
+
         // Conversion des dates
         if (isset($this->aValues['fag_en_date'])) {
             if ($this->aValues['fag_en_date'] == '')
@@ -236,8 +225,18 @@ class Filieres_agrees extends Anc {
             else
                 $this->aValues['fag_en_date'] = date_format(date_create_from_format('d/m/Y', $this->aValues['fag_en_date']), 'Y-m-d');
         }
-        //
-        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_filieres_agrees', 'id_fag');
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Put
+        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_filieres_agrees', 'id_fag', $aUploadFiles, 'anc_saisie_anc_filieres_agree', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -308,4 +307,4 @@ class Filieres_agrees extends Anc {
         return $aReturn['sMessage'];
     }
 }
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Installation.class.inc b/web_service/ws/Installation.class.inc
index cf00fc2d545cbfddc31961af275da2596c3c0d16..8608257f91bd6ec7a04f9e2b34ce0f5432933bd6 100755
--- a/web_service/ws/Installation.class.inc
+++ b/web_service/ws/Installation.class.inc
@@ -12,7 +12,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Installation php class
  *
  * This class defines operation for one Installation
- * 
+ *
  */
 class Installation extends Anc {
 
@@ -31,10 +31,11 @@ class Installation extends Anc {
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
         $this->aSelectedFields = Array("id_installation", "id_com", "id_parc", "parc_sup", "parc_parcelle_associees", "parc_adresse", "code_postal", "parc_commune", "prop_titre", "prop_nom_prenom", "prop_adresse", "prop_code_postal", "prop_commune", "prop_tel", "prop_mail", "bati_type", "bati_ca_nb_pp", "bati_ca_nb_eh", "bati_ca_nb_chambres", "bati_ca_nb_autres_pieces", "bati_ca_nb_occupant", "bati_nb_a_control", "bati_date_achat", "bati_date_mutation", "cont_zone_enjeu", "cont_zone_sage", "cont_zone_autre", "cont_zone_urba", "cont_zone_anc", "cont_alim_eau_potable", "cont_puits_usage", "cont_puits_declaration", "cont_puits_situation", "cont_puits_terrain_mitoyen", "observations", "maj", "maj_date", "create", "create_date", "archivage", "geom", "photo_f", "document_f", "num_dossier", "commune", "section", "parcelle", "nb_controle", "last_date_control", "cl_avis", "next_control", "classement_installation");
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
-     * @SWG\Get(path="/installations/{id_installation}", 
+     * @SWG\Get(path="/installations/{id_installation}",
      *   tags={"Installations"},
      *   summary="Get Installation",
      *   description="Request to get Installation by id",
@@ -74,12 +75,7 @@ class Installation extends Anc {
      * get informations about mode
      */
     function GET() {
-        $this->aFields = $this->getFields($this->aProperties['schema_anc'], "v_installation", "id_installation");
-        // Url des fichiers.
-        if (!empty($this->aFields['photo_f']))
-            $this->aFields['photo_f'] = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_installation/documents/' . $this->aValues["my_vitis_id"] . '/photo_f/' . $this->aFields['photo_f'];
-        if (!empty($this->aFields['document_f']))
-            $this->aFields['document_f'] = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_installation/documents/' . $this->aValues["my_vitis_id"] . '/document_f/' . $this->aFields['document_f'];
+        $this->aFields = $this->getFields($this->aProperties['schema_anc'], 'v_installation', 'id_installation', 'anc_saisie_anc_installation', $this->aProperties['anc']['files_container']);
     }
 
     /**
@@ -96,4 +92,4 @@ class Installation extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Installations.class.inc b/web_service/ws/Installations.class.inc
index 2993a37050e8bbad65512b1b436cfcd9a4d20279..c334b99d471a1811bb49cf6c5270fadf4ed31ee0 100755
--- a/web_service/ws/Installations.class.inc
+++ b/web_service/ws/Installations.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Installations php class
  *
  * This class defines Rest Api to Vitis Installations
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Installation.class.inc';
@@ -41,6 +41,7 @@ class Installations extends Anc {
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
         $this->aSelectedFields = Array("id_installation", "id_com", "id_parc", "parc_sup", "parc_parcelle_associees", "parc_adresse", "code_postal", "parc_commune", "prop_titre", "prop_nom_prenom", "prop_adresse", "prop_code_postal", "prop_commune", "prop_tel", "prop_mail", "bati_type", "bati_ca_nb_pp", "bati_ca_nb_eh", "bati_ca_nb_chambres", "bati_ca_nb_autres_pieces", "bati_ca_nb_occupant", "bati_nb_a_control", "bati_date_achat", "bati_date_mutation", "cont_zone_enjeu", "cont_zone_sage", "cont_zone_autre", "cont_zone_urba", "cont_zone_anc", "cont_alim_eau_potable", "cont_puits_usage", "cont_puits_declaration", "cont_puits_situation", "cont_puits_terrain_mitoyen", "observations", "maj", "maj_date", "create", "create_date", "archivage", "geom", "photo_f", "document_f", "num_dossier", "commune", "section", "parcelle", "nb_controle", "last_date_control", "cl_avis", "next_control", "classement_installation");
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
@@ -155,7 +156,15 @@ class Installations extends Anc {
     function POST() {
         $this->aValues['create'] = $_SESSION["ses_Login"];
         $this->aValues['create_date'] = date('Y-m-d');
-        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_installation', $this->aProperties['schema_anc'].'.installation_id_installation_seq', 'id_installation');
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photo_f' => [],
+            'document_f' => []
+        );
+
+        // Envoi Post
+        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_installation', $this->aProperties['schema_anc'].'.installation_id_installation_seq', 'id_installation', $aUploadFiles, 'anc_saisie_anc_installation', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -198,9 +207,7 @@ class Installations extends Anc {
             $this->aValues['maj'] = $_SESSION["ses_Login"];
         if (empty($this->aValues['maj_date']))
             $this->aValues['maj_date'] = date('Y-m-d');
-        // Upload les fichiers.
-        $this->uploadDocument('photo_f', 'anc_saisie_anc_installation');
-        $this->uploadDocument('document_f', 'anc_saisie_anc_installation');
+
         // Zone PLU.
         if (!empty($this->aValues['geom'])) {
             $sSchema = $this->aProperties["anc"]["cont_zone_urba"]["intersect"]["schema"];
@@ -221,7 +228,15 @@ class Installations extends Anc {
                 }
             }
         }
-        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_installation', 'id_installation');
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photo_f' => [],
+            'document_f' => []
+        );
+
+        // Envoi Put
+        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_installation', 'id_installation', $aUploadFiles, 'anc_saisie_anc_installation', $this->aProperties['anc']['files_container']);
         return $aReturn['sMessage'];
     }
 
@@ -309,4 +324,4 @@ class Installations extends Anc {
         }
     }
 }
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Pretraitement.class.inc b/web_service/ws/Pretraitement.class.inc
index 372fc829f7b0c57fe0cd99a5e61d063beea7a79a..f72fe963c9e4fb3c9e3bc2fda20b3a8983063b49 100755
--- a/web_service/ws/Pretraitement.class.inc
+++ b/web_service/ws/Pretraitement.class.inc
@@ -12,7 +12,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Pretraitement php class
  *
  * This class defines operation for one Pretraitement
- * 
+ *
  */
 class Pretraitement extends Anc {
 
@@ -30,10 +30,11 @@ class Pretraitement extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
-     * @SWG\Get(path="/pretraitements/{id_pretraitement}", 
+     * @SWG\Get(path="/pretraitements/{id_pretraitement}",
      *   tags={"Pretraitements"},
      *   summary="Get Pretraitement",
      *   description="Request to get Pretraitement by id",
@@ -73,19 +74,7 @@ class Pretraitement extends Anc {
      * get informations about mode
      */
     function GET() {
-        $this->aFields = $this->getFields($this->aProperties['schema_anc'], "v_pretraitement", "id_pretraitement");
-        // Url des fichiers.
-        $sWsDataUrl = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_pretraitement/documents/' . $this->aValues["my_vitis_id"];
-        if (!empty($this->aFields['photos_f']))
-            $this->aFields['photos_f'] = $sWsDataUrl . '/photos_f/' . $this->aFields['photos_f'];
-        if (!empty($this->aFields['fiche_f']))
-            $this->aFields['fiche_f'] = $sWsDataUrl . '/fiche_f/' . $this->aFields['fiche_f'];
-        if (!empty($this->aFields['schema_f']))
-            $this->aFields['schema_f'] = $sWsDataUrl . '/schema_f/' . $this->aFields['schema_f'];
-        if (!empty($this->aFields['documents_f']))
-            $this->aFields['documents_f'] = $sWsDataUrl . '/documents_f/' . $this->aFields['documents_f'];
-        if (!empty($this->aFields['plan_f']))
-            $this->aFields['plan_f'] = $sWsDataUrl . '/plan_f/' . $this->aFields['plan_f'];
+        $this->aFields = $this->getFields($this->aProperties['schema_anc'], 'v_pretraitement', 'id_pretraitement', 'anc_saisie_anc_pretraitement', 'anc');
     }
 
     /**
@@ -102,4 +91,4 @@ class Pretraitement extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Pretraitements.class.inc b/web_service/ws/Pretraitements.class.inc
index 49be91d57e8f6266528f64cb5de79bf641317e0e..06cdea6a2494dc36cd386a5931b4823048f9e9b7 100755
--- a/web_service/ws/Pretraitements.class.inc
+++ b/web_service/ws/Pretraitements.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Pretraitements php class
  *
  * This class defines Rest Api to Vitis Pretraitements
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Pretraitement.class.inc';
@@ -40,6 +40,7 @@ class Pretraitements extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
@@ -154,18 +155,7 @@ class Pretraitements extends Anc {
     function POST() {
         $this->aValues['create'] = $_SESSION["ses_Login"];
         $this->aValues['create_date'] = date('Y-m-d');
-        // Sauve le nom des fichiers.
-        if (!empty($_FILES['photos_f']))
-            $this->aValues['photos_f'] = $_FILES['photos_f']["name"];
-        if (!empty($_FILES['fiche_f']))
-            $this->aValues['fiche_f'] = $_FILES['fiche_f']["name"];
-        if (!empty($_FILES['schema_f']))
-            $this->aValues['schema_f'] = $_FILES['schema_f']["name"];
-        if (!empty($_FILES['documents_f']))
-            $this->aValues['documents_f'] = $_FILES['documents_f']["name"];
-        if (!empty($_FILES['plan_f']))
-            $this->aValues['plan_f'] = $_FILES['plan_f']["name"];
-        //
+
         $aDates = array('ptr_vi_date');
         foreach ($aDates as $sDate) {
             if (isset($this->aValues[$sDate])) {
@@ -174,16 +164,19 @@ class Pretraitements extends Anc {
                 else
                     $this->aValues[$sDate] = date_format(date_create_from_format('d/m/Y', $this->aValues[$sDate]), 'Y-m-d');
             }
-        }        
-        //
-        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_pretraitement', $this->aProperties['schema_anc'].'.pretraitement_id_pretraitement_seq', 'id_pretraitement');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_pretraitement');
-        //
+        }
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Post
+        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_pretraitement', $this->aProperties['schema_anc'].'.pretraitement_id_pretraitement_seq', 'id_pretraitement', $aUploadFiles, 'anc_saisie_anc_pretraitement', 'anc');
         return $aReturn['sMessage'];
     }
 
@@ -226,13 +219,7 @@ class Pretraitements extends Anc {
             $this->aValues['maj'] = $_SESSION["ses_Login"];
         if (empty($this->aValues['maj_date']))
             $this->aValues['maj_date'] = date('Y-m-d');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_pretraitement');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_pretraitement');
-        //
+
         $aDates = array('ptr_vi_date');
         foreach ($aDates as $sDate) {
             if (isset($this->aValues[$sDate])) {
@@ -241,9 +228,19 @@ class Pretraitements extends Anc {
                 else
                     $this->aValues[$sDate] = date_format(date_create_from_format('d/m/Y', $this->aValues[$sDate]), 'Y-m-d');
             }
-        }        
-        //
-        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_pretraitement', 'id_pretraitement');
+        }
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Put
+        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_pretraitement', 'id_pretraitement', $aUploadFiles, 'anc_saisie_anc_evacuation_eaux', 'anc');
         return $aReturn['sMessage'];
     }
 
@@ -314,7 +311,7 @@ class Pretraitements extends Anc {
         return $aReturn['sMessage'];
     }
 
-    
+
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Traitement.class.inc b/web_service/ws/Traitement.class.inc
index b297bff3becff86d2b0a720f35baee8f88222c01..08c8b0a3f2a55b3850cc4d72334134f22de9b1c9 100755
--- a/web_service/ws/Traitement.class.inc
+++ b/web_service/ws/Traitement.class.inc
@@ -12,7 +12,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection
  * 	\brief This file contains the Traitement php class
  *
  * This class defines operation for one Traitement
- * 
+ *
  */
 class Traitement extends Anc {
 
@@ -30,10 +30,11 @@ class Traitement extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
-     * @SWG\Get(path="/traitements/{id_traitement}", 
+     * @SWG\Get(path="/traitements/{id_traitement}",
      *   tags={"Traitements"},
      *   summary="Get Traitement",
      *   description="Request to get Traitement by id",
@@ -73,19 +74,7 @@ class Traitement extends Anc {
      * get informations about mode
      */
     function GET() {
-        $this->aFields = $this->getFields($this->aProperties['schema_anc'], "v_traitement", "id_traitement");
-        // Url des fichiers.
-        $sWsDataUrl = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/anc/anc_saisie_anc_traitement/documents/' . $this->aValues["my_vitis_id"];
-        if (!empty($this->aFields['photos_f']))
-            $this->aFields['photos_f'] = $sWsDataUrl . '/photos_f/' . $this->aFields['photos_f'];
-        if (!empty($this->aFields['fiche_f']))
-            $this->aFields['fiche_f'] = $sWsDataUrl . '/fiche_f/' . $this->aFields['fiche_f'];
-        if (!empty($this->aFields['schema_f']))
-            $this->aFields['schema_f'] = $sWsDataUrl . '/schema_f/' . $this->aFields['schema_f'];
-        if (!empty($this->aFields['documents_f']))
-            $this->aFields['documents_f'] = $sWsDataUrl . '/documents_f/' . $this->aFields['documents_f'];
-        if (!empty($this->aFields['plan_f']))
-            $this->aFields['plan_f'] = $sWsDataUrl . '/plan_f/' . $this->aFields['plan_f'];
+        $this->aFields = $this->getFields($this->aProperties['schema_anc'], 'v_traitement', 'id_traitement', 'anc_saisie_anc_traitement', 'anc');
     }
 
     /**
@@ -102,4 +91,4 @@ class Traitement extends Anc {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/web_service/ws/Traitements.class.inc b/web_service/ws/Traitements.class.inc
index b4ce521c4d338e104365315babd03e478234e2b0..3be35b111eac21ce1ad16a5bcada419a0204dd83 100755
--- a/web_service/ws/Traitements.class.inc
+++ b/web_service/ws/Traitements.class.inc
@@ -9,7 +9,7 @@
  * 	\brief This file contains the Traitements php class
  *
  * This class defines Rest Api to Vitis Traitements
- * 
+ *
  */
 require_once __DIR__ . '/Anc.class.inc';
 require_once 'Traitement.class.inc';
@@ -40,6 +40,7 @@ class Traitements extends Anc {
         $this->aPath = $aPath;
         $this->aProperties = $properties;
         $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        $this->oFilesManager = new Files_manager($this->aProperties);
     }
 
     /**
@@ -154,26 +155,18 @@ class Traitements extends Anc {
     function POST() {
         $this->aValues['create'] = $_SESSION["ses_Login"];
         $this->aValues['create_date'] = date('Y-m-d');
-        // Sauve le nom des fichiers.
-        if (!empty($_FILES['photos_f']))
-            $this->aValues['photos_f'] = $_FILES['photos_f']["name"];
-        if (!empty($_FILES['fiche_f']))
-            $this->aValues['fiche_f'] = $_FILES['fiche_f']["name"];
-        if (!empty($_FILES['schema_f']))
-            $this->aValues['schema_f'] = $_FILES['schema_f']["name"];
-        if (!empty($_FILES['documents_f']))
-            $this->aValues['documents_f'] = $_FILES['documents_f']["name"];
-        if (!empty($_FILES['plan_f']))
-            $this->aValues['plan_f'] = $_FILES['plan_f']["name"];
-        //
-        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_traitement', $this->aProperties['schema_anc'].'.traitement_id_traitement_seq', 'id_traitement');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_traitement');
-        //
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Post
+        $aReturn = $this->genericPost($this->aProperties['schema_anc'], 'v_traitement', $this->aProperties['schema_anc'].'.traitement_id_traitement_seq', 'id_traitement', $aUploadFiles, 'anc_saisie_anc_evacuation_eaux', 'anc');
         return $aReturn['sMessage'];
     }
 
@@ -216,14 +209,18 @@ class Traitements extends Anc {
             $this->aValues['maj'] = $_SESSION["ses_Login"];
         if (empty($this->aValues['maj_date']))
             $this->aValues['maj_date'] = date('Y-m-d');
-        // Upload les fichiers.
-        $this->uploadDocument('photos_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('fiche_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('schema_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('documents_f', 'anc_saisie_anc_traitement');
-        $this->uploadDocument('plan_f', 'anc_saisie_anc_traitement');
-        //
-        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_traitement', 'id_traitement');
+
+        // Fichiers à uploader
+        $aUploadFiles = array(
+            'photos_f' => [],
+            'fiche_f' => [],
+            'schema_f' => [],
+            'documents_f' => [],
+            'plan_f' => []
+        );
+
+        // Envoi Put
+        $aReturn = $this->genericPut($this->aProperties['schema_anc'], 'v_traitement', 'id_traitement', $aUploadFiles, 'anc_saisie_anc_traitement', 'anc');
         return $aReturn['sMessage'];
     }
 
@@ -294,7 +291,7 @@ class Traitements extends Anc {
         return $aReturn['sMessage'];
     }
 
-    
+
 }
 
-?>
\ No newline at end of file
+?>