Merge pull request #1395 from hendryb/master
fixed money progress totals portal dashboard
This commit is contained in:
commit
e70faf1a7f
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user