fixed summary calculation #30j1u0f
This commit is contained in:
parent
2cdeaad00d
commit
598072e1de
@ -48,7 +48,9 @@ class Transactions extends Controller
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$totals[$transaction->type] += $transaction->getAmountConvertedToDefault();
|
$type = $transaction->isIncome() ? 'income' : 'expense';
|
||||||
|
|
||||||
|
$totals[$type] += $transaction->getAmountConvertedToDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$totals['profit'] = $totals['income'] - $totals['expense'];
|
$totals['profit'] = $totals['income'] - $totals['expense'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user