This commit is contained in:
denisdulici 2017-12-09 18:47:06 +03:00
parent 546bd20af2
commit 1bab6b9707

View File

@ -36,9 +36,9 @@ class Dashboard extends Controller
// Daily // Daily
$day = array(); $day = array();
$month_ago = $this->today->subMonth();
for ($j = $month_days; $j > -1; $j--) { for ($j = $month_days; $j > 0; $j--) {
$day[$month_days - $j] = date("d M", strtotime("-$j day")); $day[$month_days - $j] = $month_ago->addDay()->format('d M');
} }
$daily_income = $this->getCashFlow('income', 'daily'); $daily_income = $this->getCashFlow('income', 'daily');
@ -48,9 +48,9 @@ class Dashboard extends Controller
// Monthly // Monthly
$month = array(); $month = array();
$year_ago = $this->today->subYear();
for ($j = 12; $j >= 0; $j--) { for ($j = 12; $j >= 0; $j--) {
$month[12 - $j] = date("F-Y", strtotime(" -$j month")); $month[12 - $j] = $year_ago->addMonth()->format('M Y');
} }
$monthly_income = $this->getCashFlow('income', 'monthly'); $monthly_income = $this->getCashFlow('income', 'monthly');