fixed money progress totals portal dashboard

This commit is contained in:
hendryb 2020-04-05 15:50:21 +02:00
parent 61ae8bab77
commit 514eaaff00

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)