mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Fix home chart.
This commit is contained in:
@@ -81,7 +81,7 @@ trait ChartGeneration
|
|||||||
];
|
];
|
||||||
|
|
||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
$range = Steam::finalAccountBalanceInRange($account, $start, clone $end);
|
$range = Steam::finalAccountBalanceInRange($account, $start, clone $end, $this->convertToNative);
|
||||||
$previous = array_values($range)[0];
|
$previous = array_values($range)[0];
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$format = $currentStart->format('Y-m-d');
|
$format = $currentStart->format('Y-m-d');
|
||||||
|
@@ -59,14 +59,14 @@
|
|||||||
<td colspan="1" style="text-align:right;border-top:1px #aaa solid;">
|
<td colspan="1" style="text-align:right;border-top:1px #aaa solid;">
|
||||||
{% for sum in group.sums %}
|
{% for sum in group.sums %}
|
||||||
{% if group.transaction_type == 'Deposit' %}
|
{% if group.transaction_type == 'Deposit' %}
|
||||||
{{ formatAmountBySymbol(sum.amount*-1, sum.currency_symbol, sum.currency_decimal_places) }}{# (TODO NATIVE1) #}{% if loop.index != group.sums|length %},{% endif %}
|
{{ formatAmountBySymbol(sum.amount*-1, sum.currency_symbol, sum.currency_decimal_places) }}(TODO NATIVE group 1){% if loop.index != group.sums|length %},{% endif %}
|
||||||
|
|
||||||
{% elseif group.transaction_type == 'Transfer' %}
|
{% elseif group.transaction_type == 'Transfer' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
{{ formatAmountBySymbol(sum.amount*-1, sum.currency_symbol, sum.currency_decimal_places, false) }}{# (TODO NATIVE2) #}{% if loop.index != group.sums|length %},{% endif %}
|
{{ formatAmountBySymbol(sum.amount*-1, sum.currency_symbol, sum.currency_decimal_places, false) }}(TODO group 2 ){% if loop.index != group.sums|length %},{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ formatAmountBySymbol(sum.amount, sum.currency_symbol, sum.currency_decimal_places) }}{# (TODO NATIVE3) #}{% if loop.index != group.sums|length %},{% endif %}
|
{{ formatAmountBySymbol(sum.amount, sum.currency_symbol, sum.currency_decimal_places) }}(TODO NATIVE group 3){% if loop.index != group.sums|length %},{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
@@ -154,7 +154,9 @@
|
|||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE1) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount*-1, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{# transfer #}
|
{# transfer #}
|
||||||
{% elseif transaction.transaction_type_type == 'Transfer' %}
|
{% elseif transaction.transaction_type_type == 'Transfer' %}
|
||||||
<span class="text-info money-transfer">
|
<span class="text-info money-transfer">
|
||||||
@@ -162,7 +164,9 @@
|
|||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE2) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount*-1, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{# opening balance #}
|
{# opening balance #}
|
||||||
{% elseif transaction.transaction_type_type == 'Opening balance' %}
|
{% elseif transaction.transaction_type_type == 'Opening balance' %}
|
||||||
@@ -171,13 +175,17 @@
|
|||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE3) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount*-1, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE4) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# reconciliation #}
|
{# reconciliation #}
|
||||||
{% elseif transaction.transaction_type_type == 'Reconciliation' %}
|
{% elseif transaction.transaction_type_type == 'Reconciliation' %}
|
||||||
@@ -186,13 +194,17 @@
|
|||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE5) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount*-1, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE6) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# liability credit #}
|
{# liability credit #}
|
||||||
{% elseif transaction.transaction_type_type == 'Liability credit' %}
|
{% elseif transaction.transaction_type_type == 'Liability credit' %}
|
||||||
@@ -201,13 +213,17 @@
|
|||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE7) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE8) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount*-1, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
@@ -217,7 +233,9 @@
|
|||||||
{% if null != transaction.foreign_amount %}
|
{% if null != transaction.foreign_amount %}
|
||||||
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# (TODO NATIVE9) #}
|
{% if convertToNative and 0 != transaction.native_amount %}
|
||||||
|
({{ formatAmountBySymbol(transaction.native_amount, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td style=" {{ style|raw }}">
|
<td style=" {{ style|raw }}">
|
||||||
|
Reference in New Issue
Block a user