Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

45 lines
1.5KB

  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' => 'Clients', '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 ce client.</div>
  37. <?php endif; ?>
  38. </div>