Clean up and consistency in foreign and native amounts.

This commit is contained in:
James Cole
2017-04-14 15:42:54 +02:00
parent bd917f6484
commit ea3fdb0668
10 changed files with 312 additions and 187 deletions

View File

@@ -37,11 +37,11 @@
<tr>
<td>{{ 'total_amount'|_ }}</td>
<td>{{ journal|formatJournal }}
{% if journal.hasMeta('original_amount') %}
{% if journal.hasMeta('foreign_amount') %}
{% if journal.transactiontype.type == 'Withdrawal' %}
({{ formatAnything(originalCurrency, journal.getMeta('original_amount')*-1) }})
({{ formatAnything(foreignCurrency, journal.getMeta('foreign_amount')*-1) }})
{% else %}
({{ formatAnything(originalCurrency, journal.getMeta('original_amount')) }})
({{ formatAnything(foreignCurrency, journal.getMeta('foreign_amount')) }})
{% endif %}
{% endif %}
</td>

View File

@@ -50,7 +50,7 @@
{# INSTRUCTIONS FOR EXCHANGE RATES #}
{{ ExpandedForm.staticText('exchange_rate_instruction','(here be text)') }}
{{ ExpandedForm.nonSelectableAmount('exchanged_amount') }}
{{ ExpandedForm.nonSelectableAmount('native_amount') }}
{# ALWAYS SHOW DATE #}
{{ ExpandedForm.date('date', preFilled.date|default(phpdate('Y-m-d'))) }}

View File

@@ -57,12 +57,12 @@
{% endif %}
{# ALWAYS SHOW AMOUNT #}
{{ ExpandedForm.amount('amount',data.amount,{'currency' : data.currency}) }}
{{ ExpandedForm.amount('amount',data.amount, {'currency' : data.currency}) }}
{# INSTRUCTIONS FOR EXCHANGE RATES #}
{{ ExpandedForm.staticText('exchange_rate_instruction','(here be text)') }}
{{ ExpandedForm.nonSelectableAmount('exchanged_amount') }}
{{ ExpandedForm.nonSelectableAmount('native_amount', data.native_amount, {'currency' : data.native_currency}) }}
{# ALWAYS SHOW DATE #}
{{ ExpandedForm.date('date',data['date']) }}