您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

commandes.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. use common\models\CreditHistorique;
  5. use common\models\Etablissement;
  6. use common\models\Commande;
  7. $this->title = 'Commandes <small>'.Html::encode($user->nom.' '.$user->prenom).'</small>';
  8. $this->params['breadcrumbs'][] = ['label' => 'Utilisateurs', 'url' => ['index']];
  9. $this->params['breadcrumbs'][] = ['label' => Html::encode($user->nom.' '.$user->prenom)];
  10. $this->params['breadcrumbs'][] = 'Créditer';
  11. ?>
  12. <div class="user-commandes">
  13. <h1><?= $this->title ?> </h1>
  14. <?php if(count($commandes)): ?>
  15. <table id="historique-commandes" class="table table-striped table-bordered">
  16. <thead>
  17. <tr>
  18. <th>Date livraison</th>
  19. <th>Résumé</th>
  20. <th>Point de vente</th>
  21. <th class="montant">Montant</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <?php foreach($commandes as $c): ?>
  26. <tr>
  27. <td><?php echo date('d/m/Y',strtotime($c->production->date)); ?></td>
  28. <td class="resume"><?= $c->getResumePanier() ; ?></td>
  29. <td><?= $c->getResumePointVente(); ?></td>
  30. <td class="montant"><?= $c->getResumeMontant(); ?></td>
  31. </tr>
  32. <?php endforeach; ?>
  33. </tbody>
  34. </table>
  35. <?php else: ?>
  36. <div class="alert alert-warning">Aucune commande passée par cet utilisateur</div>
  37. <?php endif; ?>
  38. </div>