Merge pull request #1395 from hendryb/master

fixed money progress totals portal dashboard
This commit is contained in:
Denis Duliçi 2020-04-05 17:58:44 +03:00 committed by GitHub
commit e70faf1a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,19 +61,20 @@ class Dashboard
$total = count($unpaid) + count($paid) + count($partial_paid) + count($overdue);
$progress = [
'unpaid' => count($unpaid),
'paid' => count($paid),
'overdue' => count($overdue),
'partially_paid' => count($partial_paid),
'total' => $total,
];
$unpaid = $this->calculateTotals($unpaid, $start, $end, 'unpaid');
$paid = $this->calculateTotals($paid, $start, $end, 'paid');
$partial_paid = $this->calculateTotals($partial_paid, $start, $end, 'partial');
$overdue = $this->calculateTotals($overdue, $start, $end, 'overdue');
$progress = [
'unpaid' => array_sum($unpaid),
'paid' => array_sum($paid),
'overdue' => array_sum($overdue),
'partially_paid' => array_sum($partial_paid),
'total' => $total,
];
$chart = new Chartjs();
$chart->type('line')
->width(0)