Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

47 rindas
1.6KB

  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>Historique</th>
  19. <th>Date livraison</th>
  20. <th>Résumé</th>
  21. <th>Point de vente</th>
  22. <th class="montant">Montant</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <?php foreach($commandes as $c): ?>
  27. <tr class="<?= $c->getClassHistorique() ; ?>">
  28. <td class="historique"><?= $c->getStrHistorique() ; ?></td>
  29. <td><?php echo date('d/m/Y',strtotime($c->production->date)); ?></td>
  30. <td class="resume"><?= $c->getResumePanier() ; ?></td>
  31. <td><?= $c->getResumePointVente(); ?></td>
  32. <td class="montant"><?= $c->getResumeMontant(); ?></td>
  33. </tr>
  34. <?php endforeach; ?>
  35. </tbody>
  36. </table>
  37. <?php else: ?>
  38. <div class="alert alert-warning">Aucune commande passée par ce client.</div>
  39. <?php endif; ?>
  40. </div>