本文整理匯總了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) {