|
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h2 class="panel-title">
- <span class="the-title">Souke en quelques chiffres</span>
- </h2>
- </div>
- <div class="panel-body">
- <div class="row">
- <?= few_numbers_item($countProducersActive, 'Producteurs', 'actifs sur les 3 derniers mois'); ?>
- <?= few_numbers_item(few_numbers_format_number($countUsersActive), 'Clients', 'actifs sur les 3 derniers mois'); ?>
- </div>
- <div class="row">
- <?= few_numbers_item(few_numbers_format_number($countPointSalesActive), 'Points de vente', 'actifs sur les 3 derniers mois'); ?>
- <?= few_numbers_item(few_numbers_format_number($averageOrdersPerDay), 'Commandes clients / jour', 'en moyenne sur les 7 derniers jours'); ?>
- </div>
- <div class="row">
- <?= few_numbers_item(few_numbers_format_number($averageTurnover).' €', 'CA producteurs / mois', 'moyenne sur les 3 derniers mois'); ?>
- <?= few_numbers_item(few_numbers_format_number($numberVisitsMonth), 'Visiteurs', 'le mois dernier'); ?>
- </div>
- <?php if($countProducersWithOptionTimeSaved): ?>
- <div class="row">
- <?= few_numbers_item($timeSavedByProducersAverage.' h', 'Heures gagnées par semaine', 'moyenne sur '.$countProducersWithOptionTimeSaved.' producteur'.(($countProducersWithOptionTimeSaved) ? 's' : '')); ?>
- </div>
- <?php endif; ?>
- </div>
- </div>
-
- <?php
-
- function few_numbers_item($number, $description, $detail = null) {
- $html = '<div class="col-md-6 item"><div class="number">'.$number.'</div><div class="description">'.$description.'</div>';
-
- if($detail) {
- $html .= '<div class="detail">'.$detail.'</div>';
- }
-
- $html .= '</div>';
-
- return $html;
- }
-
- function few_numbers_format_number($number) {
- return number_format($number, 0, '', ' ');
- }
-
- ?>
|