mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Spent amount / withdrawals are negative, #129.
This commit is contained in:
parent
8f8e29fc22
commit
e044199693
@ -70,7 +70,7 @@
|
|||||||
{% set overspent = rep.amount + spentInRep < 0 %}
|
{% set overspent = rep.amount + spentInRep < 0 %}
|
||||||
|
|
||||||
{% if overspent %}
|
{% if overspent %}
|
||||||
{% set pct = (spentInRep != 0 ? (rep.amount / (spentInRep*-1))*100 : 0) %}
|
{% set pct = (spentInRep != 0 ? (rep.amount / (spentInRep*-1))*100 : 0) %} <!-- must have -1 here -->
|
||||||
<div class="progress progress-striped">
|
<div class="progress progress-striped">
|
||||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
||||||
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set amount = rep.amount %}
|
{% set amount = rep.amount %}
|
||||||
{% set pct = (amount != 0 ? (((spentInRep*-1) / amount)*100) : 0) %}
|
{% set pct = (amount != 0 ? (((spentInRep*-1) / amount)*100) : 0) %} <!-- must have -1 here -->
|
||||||
<div class="progress progress-striped">
|
<div class="progress progress-striped">
|
||||||
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{{ pct|round }}" aria-valuemin="0"
|
||||||
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
aria-valuemax="100" style="width: {{ pct|round }}%;"></div>
|
||||||
|
@ -24,10 +24,8 @@
|
|||||||
|
|
||||||
<td>
|
<td>
|
||||||
{% if event.amount < 0 %}
|
{% if event.amount < 0 %}
|
||||||
|
<span class="text-danger">{{ trans('firefly.removed_amount', {amount: (event.amount)|formatAmountPlain})|raw }}</span>
|
||||||
<span class="text-danger">{{ trans('firefly.removed_amount', {amount: (event.amount*-1)|formatAmountPlain})|raw }}</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<span class="text-success">{{ trans('firefly.added_amount', {amount: (event.amount)|formatAmountPlain})|raw }}</span>
|
<span class="text-success">{{ trans('firefly.added_amount', {amount: (event.amount)|formatAmountPlain})|raw }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user