diff --git a/app/Helpers/Collection/Expense.php b/app/Helpers/Collection/Expense.php index e165feb365..b8218fdf9f 100644 --- a/app/Helpers/Collection/Expense.php +++ b/app/Helpers/Collection/Expense.php @@ -36,7 +36,7 @@ class Expense $accountId = $entry->account_id; if (!$this->expenses->has($accountId)) { $newObject = new stdClass; - $newObject->amount = strval(round($entry->amount_positive, 2)); + $newObject->amount = strval(round($entry->amount, 2)); $newObject->name = $entry->name; $newObject->count = 1; $newObject->id = $accountId; @@ -44,7 +44,7 @@ class Expense } else { bcscale(2); $existing = $this->expenses->get($accountId); - $existing->amount = bcadd($existing->amount, $entry->amount_positive); + $existing->amount = bcadd($existing->amount, $entry->amount); $existing->count++; $this->expenses->put($accountId, $existing); } diff --git a/resources/twig/partials/reports/expenses.twig b/resources/twig/partials/reports/expenses.twig index eb3f1d035c..c8c6f6b860 100644 --- a/resources/twig/partials/reports/expenses.twig +++ b/resources/twig/partials/reports/expenses.twig @@ -18,7 +18,7 @@ {{ expense.count }} {{ 'transactions'|_|lower }} {% endif %} - {{ (expense.amount)|formatAmountPlain }} + {{ (expense.amount)|formatAmount }} {% endfor %}