diff --git a/controllers/publics/Dashboard.php b/controllers/publics/Dashboard.php index 280026f..9cb84ac 100644 --- a/controllers/publics/Dashboard.php +++ b/controllers/publics/Dashboard.php @@ -77,11 +77,11 @@ namespace controllers\publics; $stats_start_date_formated = $stats_start_date->format('Y-m-d'); //If user have a quota and the quota start before today, use quota start date instead - $quota_limit = false; + $quota_unused = false; $quota = $this->internal_quota->get_user_quota($id_user); if ($quota && (new \DateTime($quota['start_date']) <= $now) && (new \DateTime($quota['expiration_date']) > $now)) { - $quota_limit = $quota['credit'] + $quota['additional']; + $quota_unused = $quota['credit'] + $quota['additional'] - $quota['consumed']; $stats_start_date = new \DateTime($quota['start_date']); $stats_start_date_formated = $stats_start_date->format('Y-m-d'); @@ -141,7 +141,7 @@ namespace controllers\publics; 'nb_unreads' => $nb_unreads, 'avg_sendeds' => $avg_sendeds, 'avg_receiveds' => $avg_receiveds, - 'quota_limit' => $quota_limit, + 'quota_unused' => $quota_unused, 'sendeds' => $sendeds, 'receiveds' => $receiveds, 'events' => $events, diff --git a/templates/dashboard/show.php b/templates/dashboard/show.php index b461521..9c5f52f 100644 --- a/templates/dashboard/show.php +++ b/templates/dashboard/show.php @@ -123,9 +123,9 @@

Activité de la semaine :

SMS envoyés (moyenne = par jour).
SMS reçus (moyenne = par jour). - +
- Limite max de SMS sur la période (). + Crédits restants : .
@@ -254,8 +254,8 @@ ykeys: ['sendeds', 'receiveds'], labels: ['SMS envoyés', 'SMS reçus'], lineColors: ['#5CB85C', '#EDAB4D'], - goals: [, ], - goalLineColors: ['#5CB85C', '#EDAB4D', '#d9534f'], + goals: [, ], + goalLineColors: ['#5CB85C', '#EDAB4D'], goalStrokeWidth: 2, pointSize: 4, hideHover: 'auto',