mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Fix display of amount. See issue #129
This commit is contained in:
@@ -37,6 +37,7 @@ class Category
|
|||||||
// spent is minus zero for an expense report:
|
// spent is minus zero for an expense report:
|
||||||
if ($category->spent < 0) {
|
if ($category->spent < 0) {
|
||||||
$this->categories->push($category);
|
$this->categories->push($category);
|
||||||
|
$this->addTotal($category->spent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -346,7 +346,6 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
$spent = $repository->balanceInPeriodForList($category, $start, $end, $accounts);
|
$spent = $repository->balanceInPeriodForList($category, $start, $end, $accounts);
|
||||||
$category->spent = $spent;
|
$category->spent = $spent;
|
||||||
$object->addCategory($category);
|
$object->addCategory($category);
|
||||||
$object->addTotal($spent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
|
@@ -16,14 +16,14 @@
|
|||||||
<td>
|
<td>
|
||||||
<a href="{{ route('categories.show',cat.id) }}">{{ cat.name }}</a>
|
<a href="{{ route('categories.show',cat.id) }}">{{ cat.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td><span class="text-danger">{{ (cat.spent * -1)|formatAmountPlain }}</span></td>
|
<td>{{ cat.spent|formatAmount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td><em>{{ 'sum'|_ }}</em></td>
|
<td><em>{{ 'sum'|_ }}</em></td>
|
||||||
<td class="text-danger">{{ (categories.getTotal * -1)|formatAmountPlain }}</td>
|
<td>{{ categories.getTotal|formatAmount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
Reference in New Issue
Block a user