This commit is contained in:
James Cole
2018-04-21 23:48:54 +02:00
parent fb75e2ef02
commit 36329e596e
15 changed files with 263 additions and 154 deletions

View File

@@ -16,11 +16,11 @@
<div class="box-body">
{% if maxAmount > 0 %}
<p>
{{ 'max_amount_add'|_ }}: {{ maxAmount|formatAmount }}.
{{ 'max_amount_add'|_ }}: {{ formatAmountByCurrency(currency,maxAmount) }}.
</p>
<div class="input-group">
<div class="input-group-addon">{{ getCurrencySymbol()|raw }}</div>
<div class="input-group-addon">{{ currency.symbol|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ maxAmount|round(2) }}"
type="number"/>
</div>

View File

@@ -11,12 +11,12 @@
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<p>
{{ 'max_amount_add'|_ }}: {{ maxAmount|formatAmount }}.
{{ 'max_amount_add'|_ }}: {{ formatAmountByCurrency(currency,maxAmount) }}.
</p>
<div class="input-group">
<div class="input-group-addon">{{ getCurrencySymbol()|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ maxAmount|round(2) }}" type="number"/>
<div class="input-group-addon">{{ currency.symbol|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ maxAmount|round(currency.decimal_places) }}" type="number"/>
</div>
</div>
<div class="modal-footer">

View File

@@ -19,7 +19,7 @@
{{ ExpandedForm.text('name') }}
{{ ExpandedForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
{{ ExpandedForm.amount('targetamount') }}
{{ ExpandedForm.amountNoCurrency('targetamount') }}
</div>
</div>

View File

@@ -20,7 +20,7 @@
{{ ExpandedForm.text('name') }}
{{ ExpandedForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
{{ ExpandedForm.amount('targetamount') }}
{{ ExpandedForm.amountNoCurrency('targetamount') }}
</div>
</div>

View File

@@ -5,7 +5,7 @@
{% endblock %}
{% block content %}
{% if piggyBanks.count == 0 %}
{% if piggyBanks|length == 0 %}
{% include 'partials.empty' with {what: 'default', type: 'piggies',route: route('piggy-banks.create')} %}
{% else %}
<div class="row">
@@ -49,11 +49,21 @@
{% for id,info in accounts %}
<tr>
<td><a href="{{ route('accounts.show',id) }}" title="{{ info.name }}">{{ info.name }}</a></td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.balance|formatAmount }}</td>
<td style="text-align:right;">{{ info.leftForPiggyBanks|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.sumOfTargets|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.sumOfSaved|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.leftToSave|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">
{{ formatAmountBySymbol(info.current_balance,info.currency_symbol,info.currency_dp) }}
</td>
<td style="text-align:right;">
{{ formatAmountBySymbol(info.left,info.currency_symbol,info.currency_dp) }}
</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">
{{ formatAmountBySymbol(info.target,info.currency_symbol,info.currency_dp) }}
</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">
{{ formatAmountBySymbol(info.saved,info.currency_symbol,info.currency_dp) }}
</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">
{{ formatAmountBySymbol(info.to_save,info.currency_symbol,info.currency_dp) }}
</td>
</tr>
{% endfor %}
</tbody>

View File

@@ -15,12 +15,12 @@
<div class="box-body">
<p>
{{ 'max_amount_remove'|_ }}: {{ currentRelevantRepAmount(piggyBank)|formatAmount }}.
{{ 'max_amount_remove'|_ }}: {{ formatAmountByCurrency(currency, repetition.currentamount) }}.
</p>
<div class="input-group">
<div class="input-group-addon">{{ getCurrencySymbol()|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ currentRelevantRepAmount(piggyBank) }}"
<div class="input-group-addon">{{ currency.symbol|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ repetition.currentamount }}"
type="number"/>
</div>
<p>

View File

@@ -11,12 +11,12 @@
<div class="modal-body">
<p>
{{ 'max_amount_remove'|_ }}: {{ currentRelevantRepAmount(piggyBank)|formatAmount }}.
{{ 'max_amount_remove'|_ }}: {{ formatAmountByCurrency(currency, repetition.currentamount) }}.
</p>
<div class="input-group">
<div class="input-group-addon">{{ getCurrencySymbol()|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ currentRelevantRepAmount(piggyBank)|round(2) }}"
<div class="input-group-addon">{{ currency.symbol|raw }}</div>
<input step="any" class="form-control" id="amount" autocomplete="off" name="amount" max="{{ repetition.currentamount }}"
type="number">
</div>
</div>