You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.9KB

  1. <div class="panel panel-primary">
  2. <div class="panel-heading">
  3. <h2 class="panel-title">
  4. <span class="the-title">Souke en quelques chiffres</span>
  5. </h2>
  6. </div>
  7. <div class="panel-body">
  8. <div class="row">
  9. <?= few_numbers_item($countProducersActive, 'Producteurs', 'actifs sur les 3 derniers mois'); ?>
  10. <?= few_numbers_item(few_numbers_format_number($countUsersActive), 'Clients', 'actifs sur les 3 derniers mois'); ?>
  11. </div>
  12. <div class="row">
  13. <?= few_numbers_item(few_numbers_format_number($countPointSalesActive), 'Points de vente', 'actifs sur les 3 derniers mois'); ?>
  14. <?= few_numbers_item(few_numbers_format_number($averageOrdersPerDay), 'Commandes clients / jour', 'en moyenne sur les 7 derniers jours'); ?>
  15. </div>
  16. <div class="row">
  17. <?= few_numbers_item(few_numbers_format_number($averageTurnover).' €', 'CA producteurs / mois', 'moyenne sur les 3 derniers mois'); ?>
  18. <?= few_numbers_item(few_numbers_format_number($numberVisitsMonth), 'Visiteurs', 'le mois dernier'); ?>
  19. </div>
  20. <?php if($countProducersWithOptionTimeSaved): ?>
  21. <div class="row">
  22. <?= few_numbers_item($timeSavedByProducersAverage.' h', 'Heures gagnées par semaine', 'moyenne sur '.$countProducersWithOptionTimeSaved.' producteur'.(($countProducersWithOptionTimeSaved) ? 's' : '')); ?>
  23. </div>
  24. <?php endif; ?>
  25. </div>
  26. </div>
  27. <?php
  28. function few_numbers_item($number, $description, $detail = null) {
  29. $html = '<div class="col-md-6 item"><div class="number">'.$number.'</div><div class="description">'.$description.'</div>';
  30. if($detail) {
  31. $html .= '<div class="detail">'.$detail.'</div>';
  32. }
  33. $html .= '</div>';
  34. return $html;
  35. }
  36. function few_numbers_format_number($number) {
  37. return number_format($number, 0, '', ' ');
  38. }
  39. ?>