Add multi currency to piggy overview.

This commit is contained in:
James Cole
2025-08-09 15:33:03 +02:00
parent 83be63f27e
commit 55f899608d

View File

@@ -46,8 +46,12 @@
{% endif %}
</td>
<td style="text-align: right;" class="piggySaved">
<span title="Saved so far"
style="text-align:right;">{{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
<span title="Saved so far" style="text-align:right;">
{{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}
{% if convertToPrimary and piggy.currency_id != primaryCurrency.id and null != piggy.pc_current_amount %}
({{ formatAmountBySymbol(piggy.pc_current_amount,primaryCurrency.symbol,primaryCurrency.decimal_places) }})
{% endif %}
</span>
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;width:40px;">
{% if piggy.current_amount > 0 %}
@@ -86,16 +90,25 @@
<td class="hidden-sm hidden-xs" style="text-align:right;">
{% if null != piggy.target_amount and 0 != piggy.target_amount %}
<span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
{% if convertToPrimary and piggy.currency_id != primaryCurrency.id and null != piggy.pc_target_amount %}
(<span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.pc_target_amount,primaryCurrency.symbol, primaryCurrency.decimal_places) }}</span>)
{% endif %}
{% endif %}
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;">
{% if piggy.left_to_save > 0 %}
<span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
{% if convertToPrimary and piggy.currency_id != primaryCurrency.id and null != piggy.pc_left_to_save %}
(<span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.pc_left_to_save, primaryCurrency.symbol,primaryCurrency.decimal_places) }}</span>)
{% endif %}
{% endif %}
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;">
{% if piggy.target_date and piggy.save_per_month %}
{{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }}
{% if convertToPrimary and piggy.currency_id != primaryCurrency.id and null != piggy.pc_save_per_month %}
({{ formatAmountBySymbol(piggy.pc_save_per_month, primaryCurrency.symbol, primaryCurrency.decimal_places) }})
{% endif %}
{% endif %}
</td>
</tr>