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.

51 rinda
1.5KB

  1. <?php
  2. use common\models\Commande ;
  3. use yii\helpers\Html ;
  4. ?>
  5. <h2>Global</h2>
  6. <div class="alert alert-warning">
  7. <strong>Potentiel :</strong> <?= number_format($ca_potentiel,2); ?> € (<?= $poids_total ?> kg)<br />
  8. <strong>Commandé :</strong> <?= number_format($recettes_pain,2); ?> € (<?= $poids_pain ?> kg)
  9. </div>
  10. <table class="table table-bordered table-condensed tab-content table-produits">
  11. <tbody>
  12. <?php
  13. foreach ($produits as $p) {
  14. if (isset($produits_selec[$p->id]['actif']) && $produits_selec[$p->id]['actif']) {
  15. echo '<tr>' ;
  16. $quantite = Commande::getQuantiteProduit($p->id, $commandes);
  17. $str_quantite = '';
  18. if ($quantite)
  19. $str_quantite = $quantite;
  20. $classe = 'center total';
  21. if ($str_quantite > $produits_selec[$p->id]['quantite_max'] && !$produits_selec[$p->id]['vrac']) {
  22. $classe .= ' depasse';
  23. }
  24. if ($p->vrac) {
  25. $classe .= ' vrac';
  26. }
  27. echo '<td class="' . $classe . '"><strong>' . $str_quantite . ' <span>';
  28. if ($produits_selec[$p->id]['quantite_max'] && $str_quantite)
  29. echo '/ ' . $produits_selec[$p->id]['quantite_max'] . '</span></strong></td>';
  30. echo '<td>'.Html::encode($p->getLibelleAdmin()).'</td></tr>' ;
  31. }
  32. }
  33. ?>
  34. <tr class="tr-total">
  35. <td class="td-total"></td>
  36. <td></td>
  37. </tr>
  38. </tbody>
  39. </table>