Your IP : 216.73.216.65


Current Path : /home/ataenra/www/ATA/INTRANET/Admin/
Upload File :
Current File : /home/ataenra/www/ATA/INTRANET/Admin/commis.php

<?php



$dateA = date('Y');



$com = $_SESSION['AF']; 

//RECUP DES INFORMATIONS SUR TABLE chantier

    //Tableau des chantiers planifies par equipe



    $list2 = $dbco->prepare("SELECT * FROM dossier D JOIN client C ON D.IDclient=C.IDc WHERE YEAR(DateCreation) = '$dateA' AND Etat IN ( 'Termine', 'Archive')"); 

    $list2->execute();



   



if(isset($_POST['paiement'])){



 //Update de la base chantier

 $UP3 = $dbco->prepare("UPDATE ".$_POST['Tp']." set IDp = :id, ECOM = :ECOM where IDp = :id");

 $UP3->bindvalue('id',$_POST['IDD']);

 $UP3->bindvalue('ECOM','Regle');

 $UP3->execute();

 

 header("location: ../../../index.php/acoms");

 header("refresh: 0.1");

 }

















?>







<!DOCTYPE html>

<html lang="fr">

<head>

  <meta charset="UTF-8">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

 

  <!--<link href="css/bootstrap-4.4.1.css" rel="stylesheet">-->

  <link href="./ATA/INTRANET/Outils/css/agcom.css" rel="stylesheet" type="text/css">

  <title>FORMULAIRE POINTAGE</title>

</head>



<body>



	<div class="containerPage"> 

    <div class="containerTitre">

    <div class="row">

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

            <img src="./ATA/INTRANET/Outils/required/ATA-Logo.jpg" alt="ISO" width=50% class= />

            </div>   

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

            <span class="align-middle">COMMISSIONS DES COMMERCIAUX</span>

            </div> 

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

            <a href="index.php/aexploit" title="">

            <img alt="HOME" src="./ATA/INTRANET/Outils/required/home1.png" alt="ISO" width=45% class="img-responsive" class="align-right"/> </a>

            </div>

            </div>

    </div>

        

	

		<div class="container1">

        

                <form method="post" autocomplete="off">

            

                    <h5 class="btn-lg btn-warning">LISTES DES CHANTIERS TERMINES</h5>

                    

                    <div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 250px;">

                     <table class='table table-hover table-bordered table-condensed'>

                            <thead>

                            <tr>

                            <th>Date</th>

                            <th>ID</th>

                            <th>Nom</th>

                            <th>Code Postal</th>

                            <th>Etat</th>

                            <th>Date Planing</th>

                            <th>Date Cloture</th>

                            <th>Montant COM</th>

                            <th>Etat COM</th>

                            <th>Action</th>

                            </tr>

                            </thead>



                            <?php while ($R2 = $list2->fetch(PDO::FETCH_OBJ)) {

                                 $list3 = $dbco->prepare("SELECT MCOM, ECOM FROM $R2->tableprojet WHERE IDp = '$R2->IDprojet'"); 

                                 $list3->execute();

                                 $R3 = $list3->fetch(PDO::FETCH_OBJ);?>



                            <tr>

                            <?php $datec = $R2->DateCreation; $DT = new DateTime($datec); ?>

                            <td><?php echo $DT->Format('d-m-Y'); ?></td>

                            <td><?php echo $R2->ID; ?></td>

                            <td><?php echo $R2->nom; ?></td>

                            <td><?php echo $R2->CodePC; ?></td>

                            <td><?php echo $R2->Etat; ?></td>

                            <?php $datep = $R2->DatePlanification; $DP = new DateTime($datep); ?>

                            <td><?php echo $DP->Format('d-m-Y'); ?></td>

                            <td><?php if(is_null($R2->DateFinalisation)){echo 'Non demarre';}else{$datef = $R2->DateFinalisation; $DF = new DateTime($datef);

                             echo $DF->Format('d-m-Y'); }?></td>

                            <td><?php echo $R3->MCOM; ?></td>

                            <td><?php echo $R3->ECOM; ?></td>

                            <td>

                                <?php if($R3->ECOM =="A Facturer"){echo '<a class="btn btn-danger">ATTENTE FACTURE</a>';} 

if($R3->ECOM =="Facture"){echo '<a class="btn btn-info"  href="./ATA/FICHIERS/'.$R2->ID.'/Facturecom/Facturecom.'.$R2->ID.'.pdf" download="" >A PAYER</a>'; 

echo '<input class="btn btn-primary" type="Submit" name="paiement" value="PAIEMENT OK" />';

echo '<input type="hidden" name="IDD" value="'.$R2->ID.'" />';

echo '<input type="hidden" name="Tp" value="'.$R2->tableprojet.'" />';} 

if($R3->ECOM =="Regle"){echo '<a class="btn btn-success">REGLE</a>';}?></td>





                                                               

                            </tr>

                        <?php } ?>



                  











                        </table>     

                    </div>            

                </form>           

    </div>   

</body>

</html>