<?php 
        echo $message;
        ?>
      
                            </div>
                         <?php 
    }
    unset($_SESSION['charge-action-message']);
    unset($_SESSION['charge-type-message']);
    ?>
                        <table class="table table-striped table-bordered table-advance table-hover">
                            <tbody>
                                <tr>
                                    <th style="width: 50%"><strong>Total des charges</strong></th>
                                    <th style="width: 50%"><a><strong><?php 
    echo number_format($chargeManager->getTotal(), 2, ',', ' ');
    ?>
&nbsp;DH</strong></a></th>
                                </tr>
                            </tbody>
                        </table>
                        <div class="portlet charges">
                            <div class="portlet-body">
                                <div class="scroller" data-height="500px" data-always-visible="1"><!-- BEGIN DIV SCROLLER -->
                                <table class="table table-striped table-bordered table-advance table-hover">
                                    <thead>
                                        <tr>
                                            <th style="width: 50%">Type</th>
                                            <th style="width: 50%">Total</th>
                                        </tr>
                                    </thead>
Example #2
0
          +
          $locauxManager->getTotalPrixLocauxByIdProjet($idProjet)
        );
		
		//get contacts ids and get sum of client operations
		$idsContrats = $contratManager->getContratActifIdsByIdProjet($idProjet);
		$sommeOperationsClients = 0;
		$sommePrixVente = 0;
		foreach($idsContrats as $id){
			$sommeOperationsClients += $operationsManager->sommeOperations($id);
			$sommePrixVente += $contratManager->getContratById($id)->prixVente();
		}
		$sommeApportsClients = ($sommeOperationsClients);
		$reliquat = $sommePrixVente - $sommeOperationsClients; 
        $sommeCharges = 
        $chargeCommunManager->getTotal() + $chargeManager->getTotalByIdProjet($idProjet);
        $sommeCharges = ceil($sommeCharges);
		
        //Container 2 : Statistiques
        $sommeLivraisons = 0;
        $idsLivraisons = $livraisonsManager->getLivraisonIdsByIdProjet($idProjet);
        foreach ( $idsLivraisons as $id ) {
            $sommeLivraisons += $livraisonDetailManager->getTotalLivraisonByIdLivraison($id);
        }
        $sommeReglements = ceil($reglementsFournisseurManager->sommeReglementFournisseurByIdProjet($_GET['idProjet']));
        $sommeLivraison = ceil($livraisonsManager->getTotalLivraisonsIdProjet($_GET['idProjet']));
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
     $dateFrom = htmlentities($_POST['dateFrom']);
     $dateTo = htmlentities($_POST['dateTo']);
     $type = htmlentities($_POST['type']);
     if ($type == "Toutes") {
         $charges = $chargeManager->getChargesByDates($dateFrom, $dateTo);
         $totalCharges = number_format($chargeManager->getTotalByDates($dateFrom, $dateTo), 2, ',', ' ');
         $titreDocument = "Liste des charges communs entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo));
     } else {
         $charges = $chargeManager->getChargesByDatesByType($dateFrom, $dateTo, $type);
         $totalCharges = number_format($chargeManager->getTotalByDatesByType($dateFrom, $dateTo, $type), 2, ',', ' ');
         $titreDocument = "Liste des charges communs " . $typeChargeManager->getTypeChargeById($type)->nom() . " entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo));
     }
 } else {
     if ($criteria == "toutesCharges") {
         $charges = $chargeManager->getCharges();
         $totalCharges = number_format($chargeManager->getTotal(), 2, ',', ' ');
         $titreDocument = "Liste de toutes les charges communs";
         if (isset($_POST['type']) and (isset($_POST['source']) and $_POST['source'] == "charges-communs-type")) {
             $type = htmlentities($_POST['type']);
             $charges = $chargeManager->getChargesByType($type);
             $totalCharges = number_format($chargeManager->getTotalByType($type), 2, ',', ' ');
             $titreDocument = "Liste des charges communs de " . $typeChargeManager->getTypeChargeById($type)->nom();
         }
         if (isset($_POST['source']) and $_POST['source'] == "charges-communs-grouped") {
             $resumeDetail = htmlentities($_POST['resume-detaile']);
             if ($resumeDetail == "resume") {
                 $charges = $chargeManager->getChargesByGroup();
             }
         }
     }
 }
Example #4
0
        //Container 1 : Statistiques
        $chiffreAffaireTheorique = 
        ceil($appartementManager->getTotalPrixAppartements() + $locauxManager->getTotalPrixLocaux());
        
        //get contacts ids and get sum of client operations
        $idsContrats = $contratManager->getContratActifIds();
        $sommeOperationsClients = 0;
        $sommePrixVente = 0;
        foreach($idsContrats as $id){
            $sommeOperationsClients += $operationsManager->sommeOperations($id);
            $sommePrixVente += $contratManager->getContratById($id)->prixVente();
        }
        $sommeApportsClients = ($sommeOperationsClients);
        $reliquat = $sommePrixVente - $sommeOperationsClients; 
        $sommeCharges = 
        $chargeCommunManager->getTotal() + $chargeManager->getTotal();
        $sommeCharges = ceil($sommeCharges);
        
        //Container 2 : Statistiques
        $sommeLivraisons = 0;
        $idsLivraisons = $livraisonsManager->getLivraisonIds();
        foreach ( $idsLivraisons as $id ) {
            $sommeLivraisons += $livraisonDetailManager->getTotalLivraisonByIdLivraison($id);
        }
        $sommeReglements = ceil($reglementsFournisseurManager->sommeReglementFournisseur());
        $sommeLivraison = ceil($livraisonsManager->getTotalLivraisons());
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->