本文整理汇总了PHP中Note::getMontantTotal方法的典型用法代码示例。如果您正苦于以下问题:PHP Note::getMontantTotal方法的具体用法?PHP Note::getMontantTotal怎么用?PHP Note::getMontantTotal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getMontantTotal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCoutOfUser
public static function getCoutOfUser($bdd)
{
$allUser = User::getAllUser($bdd);
$couts = [];
foreach ($allUser as $user) {
$userNotes = Note::getNotesByUser($bdd, $user['id']);
$uDevise = Devise::getDeviseById($bdd, $user['devise_id']);
$totalNote = 0;
foreach ($userNotes as $note) {
$totalNote += Note::getMontantTotal($bdd, $note['id'], $uDevise->getTaux());
}
$couts[] = ["username" => $user['login'], "total" => $totalNote];
}
usort($couts, function ($a, $b) {
if ($a['total'] == $b['total']) {
return 0;
}
return $a['total'] < $b['total'] ? 1 : -1;
});
return array_slice($couts, 0, 10);
}
示例2: date
<div class="statut-<?php echo $note['statut_id']; ?> note-<?php echo $note['id'] ?> note">
<div class="infos-note">
<div><?php echo $note['name']; ?><br/> <?php echo $noteUser->getName(); ?></div>
<div><?php echo date("d-m-Y", strtotime($note['date'])); ?></div>
<div>
<?php
// recupere et affiche le nom du statut
$noteStatut->setId($note['statut_id']);
$stat = $noteStatut->getStatutById($bdd);
echo $stat['name'];
?>
</div>
<div>
<?php
$devise = Devise::getDeviseById($bdd, $sessionUser->getDevise());
echo '<span class="total-note">' . Note::getMontantTotal($bdd, $note['id'], $devise->getTaux()) . '</span> ' . $devise->getSigne();
?>
</div>
<div class="actions">
<button class="note-<?php echo $note['id'] ?> btn btn-danger">Supprimer</button>
<a class="btn btn-default" href="<?php echo $basePath. '?page=note&id=' . $note['id']; ?>">editer</a><br/>
<a href="<?php echo $basePath . "?page=impression&id=" . $note['id']; ?>" class="btn btn-success">Imprimer</a>
<button class="btn-show-frais btn btn-info" data-frais="list-frais-<?php echo $note['id'] ?>"><span class="glyphicon glyphicon-plus"></span> Frais (<span class="count-frais"><?php echo count($allFrais); ?></span>)</button>
</div>
</div>
<div class="list-frais list-frais-<?php echo $note['id'] ?>">
<ul>
<?php
//boucle des frais de la note
foreach ($allFrais as $frais) {