?>
</td> 
                                                <td><?php 
            echo date('d/m/Y', strtotime($contrat->dateContrat()));
            ?>
</td>
                                                <td><?php 
            echo number_format($contrat->prixUnitaire(), 2, ',', ' ');
            ?>
</td>
                                                <td><?php 
            echo $contrat->nombreUnites();
            ?>
</td>
                                                <td><?php 
            echo number_format($contratDetaislManager->getContratDetailsTotalByIdContratEmploye($contrat->id()), 2, ',', ' ');
            ?>
</td>
                                                <td><?php 
            echo number_format($contrat->total(), 2, ',', ' ');
            ?>
</td>
                                                <td><?php 
            echo number_format($contrat->total() - $contratDetaislManager->getContratDetailsTotalByIdContratEmploye($contrat->id()), 2, ',', ' ');
            ?>
</td>       
                                            </tr>      
                                            <!-- updatePaiement box begin -->
                                            <div id="updateContrat<?php 
            echo $contrat->id();
            ?>
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") {
    //classes managers
    $idProjet = 0;
    $projetManager = new ProjetManager($pdo);
    $contratEmployeManager = new ContratEmployeManager($pdo);
    $contratDetaislManager = new ContratDetailsManager($pdo);
    $employesManager = new EmployeManager($pdo);
    if (isset($_GET['idContratEmploye']) and $_GET['idContratEmploye'] > 0 and $_GET['idContratEmploye'] <= $contratEmployeManager->getLastId()) {
        $idProjet = $_GET['idProjet'];
        $idContratEmploye = $_GET['idContratEmploye'];
        $projet = $projetManager->getProjetById($idProjet);
        $contratEmploye = $contratEmployeManager->getContratEmployeById($idContratEmploye);
        $contratDetails = $contratDetaislManager->getContratDetailsByIdContratEmploye($idContratEmploye);
        $totalPaye = $contratDetaislManager->getContratDetailsTotalByIdContratEmploye($idContratEmploye);
    }
    ob_start();
    ?>
<style type="text/css">
    p, h1, h3{
        text-align: center;
        text-decoration: underline;
    }
    table {
            border-collapse: collapse;
            width:100%;
        }
        
        table, th, td {
            border: 1px solid black;