mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
More readable fix for division by zero error.
This commit is contained in:
@@ -324,7 +324,11 @@
|
|||||||
{# the amount left is automatically calculated. #}
|
{# the amount left is automatically calculated. #}
|
||||||
{{ formatAmountBySymbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}
|
{{ formatAmountBySymbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }}
|
||||||
{% if spentInfo.spent + budgetLimit.amount > 0 %}
|
{% if spentInfo.spent + budgetLimit.amount > 0 %}
|
||||||
({{ formatAmountBySymbol((0 is same as(activeDaysLeft)) ? (spentInfo.spent + budgetLimit.amount) : (spentInfo.spent + budgetLimit.amount) / activeDaysLeft, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
{% if 0 == activeDaysLeft %}
|
||||||
|
({{ formatAmountBySymbol(spentInfo.spent + budgetLimit.amount, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
||||||
|
{% else %}
|
||||||
|
({{ formatAmountBySymbol((spentInfo.spent + budgetLimit.amount) / activeDaysLeft, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
({{ formatAmountBySymbol(0, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
({{ formatAmountBySymbol(0, spentInfo.currency_symbol, spentInfo.currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -347,8 +351,12 @@
|
|||||||
data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">
|
data-value="{{ spentInfo.spent + budgetLimit.amount }}" class="amount_left">
|
||||||
{{ formatAmountBySymbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}
|
{{ formatAmountBySymbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }}
|
||||||
{% if budgetLimit.in_range %}
|
{% if budgetLimit.in_range %}
|
||||||
|
{% if 0 == activeDaysLeft %}
|
||||||
|
({{ formatAmountBySymbol(budgetLimit.amount, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})
|
||||||
|
{% else %}
|
||||||
({{ formatAmountBySymbol(budgetLimit.amount / activeDaysLeft, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})
|
({{ formatAmountBySymbol(budgetLimit.amount / activeDaysLeft, budgetLimit.currency_symbol, budgetLimit.currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
<br/>
|
<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user