Skip to content

Commit

Permalink
close #798 Fixed: Error in Calculation in P/L Report
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Mar 25, 2019
1 parent ce52e6b commit 20d73a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/Http/Controllers/Reports/ProfitLoss.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ public function index()
'currency_rate' => 1
];

$gross['income'] = $gross['expense'] = [1 => 0, 2 => 0, 3 => 0, 4 => 0, 'total' => 0];
foreach ($dates as $date) {
$gross['income'][$date] = 0;
$gross['expense'][$date] = 0;
}

$gross['income']['total'] = 0;
$gross['expense']['total'] = 0;

foreach ($income_categories as $category_id => $category_name) {
$compares['income'][$category_id]['total'] = [
Expand Down

0 comments on commit 20d73a8

Please sign in to comment.