fixed total widgets

This commit is contained in:
denisdulici
2020-02-09 15:23:11 +03:00
parent dc12b1111d
commit 04af057194
6 changed files with 12 additions and 6 deletions

View File

@ -29,6 +29,8 @@ class TotalIncome extends Widget
$overdue += $overdue_tmp;
});
$grand = $current + $open + $overdue;
$progress = 100;
if (!empty($open) && !empty($overdue)) {
@ -36,7 +38,7 @@ class TotalIncome extends Widget
}
$totals = [
'current' => $current,
'grand' => money($grand, setting('default.currency'), true),
'open' => money($open, setting('default.currency'), true),
'overdue' => money($overdue, setting('default.currency'), true),
'progress' => $progress,