text: function displayDatatableDebit(dtId ,sourceUrl ,parms) {
      $languageUrl = getLanguageUrl();
      $params = {
          sDom: "<'row '<'col-xs-6'l><'col-xs-6'f>r>" + "t" + "<'row'<'col-xs-12'pi>>",
          bLengthChange: false,
          iDisplayLength: 10,
          bFilter: false,
          bInfo: true,
          bProcessing: true,
          bServerSide: true,
          sAjaxSource: sourceUrl,
          sServerMethod: 'POST',
  //        aaSorting: [[0, 'ASC']],
          bSort : false,
          oLanguage: {
              sUrl: $languageUrl,
          },
          fnRowCallback: fonctionRowCallBack,
  
          "fnServerData": function ( sSource, aoData, fnCallback ) {
                  aoData.push({
                    "name":"ncc", "value":parms.ncc
                  });
                  aoData.push({
                    "name":"deversement", "value":parms.deversement
                  });
                  aoData.push({
                    "name":"taxe", "value":parms.taxe
                  });
                  aoData.push({
                    "name":"groupeActivite", "value":parms.groupeActivite
                  });
                  aoData.push({
                    "name":"dateDebut", "value":parms.dateDebut
                  });
                  aoData.push({
                    "name":"dateFin", "value":parms.dateFin
                  });
                  aoData.push({
                    "name":"posteComptable", "value":parms.posteComptable
                  });
                  aoData.push({
                    "name":"codeActivite", "value":parms.codeActivite
                  });
  
                  $.ajax({
                      "dataType":   'json',
                      "url":        sSource,
                      "data":       aoData,
                      "success":    fnCallback
                  }).done(function(content){
                      $('.div-montant') .html(translate('total_montant_declare') +' : ' + formatDevise(content.sommeMontant, ' ', ',', '', ' '));
                  });
              },
      };
  
      if (typeof oTable == 'undefined') {
          oTable = $('#'+dtId).dataTable($params).show();
      } else {
          oTable.fnClearTable(0);
          oTable.fnDraw();
      }
  }
  
  
  function fonctionRowCallBack( nRow, aData, iDisplayIndex ) {
  
      $('td:eq(0)', nRow).html(alignCenter(formatNull(aData[0],'-')));
      $('td:eq(1)', nRow).html(alignRight(formatNull(formatDevise(aData[1], ' ', ',', '', ' '),'-')));
      $('td:eq(2)', nRow).html(alignRight(formatNull(aData[2],'-')));
  }
  
  
  function buildParams(){
  
      var serialChart = ["bar","hbar","3dbar","3dhbar","line"];
      var pieChart = ["pie","3dpie","donut","3ddonut"];
      var radarChart = ["radar"];
  
      var params =  {
          "chart-type":   'serialChart',
      };
  
      params.labelRotation = 25;
      params.colors = '#0B3502';
      params.backgroundColor = '#561567';
  
      dateDebut = $('#dateDebut').val();
      dateFin = $('#dateFin').val();
      ncc = $('#ncc').val();
      taxe = $('#taxe').val();
      posteComptable = $('#posteComptable').val();
      codeActivite = $('#codeActivite').val();
      groupeActivite = $('#groupeActivite').val();
      deversement = $('#deversement').val();
      
      
      params.dateDebut = dateDebut;
      params.dateFin = dateFin;
      params.posteComptable = posteComptable;
      params.codeActivite = codeActivite;
      params.ncc = ncc;
      params.taxe = taxe;
      params.groupeActivite = groupeActivite;
      params.deversement = deversement;
  
      return params;
  }
  
  function displayChart(dtId ,sourceUrl,params ) {
  
      chart_url =  sourceUrl;
  //    params = buildParams();
  
      $.post(
         chart_url, params
      ).done(function(content){
  
          chartData = content;
          chart = AmCharts.makeChart(dtId, content);
  
          if (content.dataProvider.length == 0) {
              $('#'+dtId).html('<div class="no-result-amchart">Pas de résultats correspondants aux filtres actuels.</div>');
          }
      });
  }
  
  
  $(document).ready(function() {
  
      $('#dateDebut').datepicker();
      $('#dateFin').datepicker();
  
      url = oConstantes.baseUrl + '/services/admin-declaration/liste-des-ncc';
      autoComplete('ncc', url);
  
  
      params= buildParams();
      
      urlData = oConstantes.baseUrl + '/services/admin-reporting/data-table-declarations-debit/noPaiement/true';
      displayDatatableDebit("dt-declaration-debit-sans-paiement",urlData,params);
  
      urlData = oConstantes.baseUrl + '/services/admin-reporting/amcharts-nombre-declarations-debits/noPaiement/true';
      displayChart("amcharts-nombre-declaration-debit",urlData,params);
  
  
      urlData = oConstantes.baseUrl + '/services/admin-reporting/amcharts-total-declarations-debits/noPaiement/true';
      displayChart("amcharts-total-declaration-debit",urlData,params);
  
  });
  
  