Skip to content

Firefly III: a personal finances manager

Fix views for #1000

James Cole573e72f7fbe3
diff --git a/app/Http/Requests/AccountFormRequest.php b/app/Http/Requests/AccountFormRequest.php
index eff6e1240f..261247f432 100644
--- a/app/Http/Requests/AccountFormRequest.php
+++ b/app/Http/Requests/AccountFormRequest.php
@@ -48,12 +48,12 @@ class AccountFormRequest extends Request
'active' => $this->boolean('active'),
'accountType' => $this->string('what'),
'currency_id' => $this->integer('currency_id'),
- 'virtualBalance' => $this->float('virtualBalance'),
+ 'virtualBalance' => $this->string('virtualBalance'),
'iban' => $this->string('iban'),
'BIC' => $this->string('BIC'),
'accountNumber' => $this->string('accountNumber'),
'accountRole' => $this->string('accountRole'),
- 'openingBalance' => $this->float('openingBalance'),
+ 'openingBalance' => $this->string('openingBalance'),
'openingBalanceDate' => $this->date('openingBalanceDate'),
'ccType' => $this->string('ccType'),
'ccMonthlyPaymentDate' => $this->string('ccMonthlyPaymentDate'),
diff --git a/app/Http/Requests/BillFormRequest.php b/app/Http/Requests/BillFormRequest.php
index c7d416064e..b08c26279a 100644
--- a/app/Http/Requests/BillFormRequest.php
+++ b/app/Http/Requests/BillFormRequest.php
@@ -44,10 +44,10 @@ class BillFormRequest extends Request
return [
'name' => $this->string('name'),
'match' => $this->string('match'),
- 'amount_min' => $this->float('amount_min'),
+ 'amount_min' => $this->string('amount_min'),
'amount_currency_id_amount_min' => $this->integer('amount_currency_id_amount_min'),
'amount_currency_id_amount_max' => $this->integer('amount_currency_id_amount_max'),
- 'amount_max' => $this->float('amount_max'),
+ 'amount_max' => $this->string('amount_max'),
'date' => $this->date('date'),
'repeat_freq' => $this->string('repeat_freq'),
'skip' => $this->integer('skip'),
diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.php
index fc05104976..56c2836e47 100644
--- a/app/Http/Requests/JournalFormRequest.php
+++ b/app/Http/Requests/JournalFormRequest.php
@@ -64,7 +64,7 @@ class JournalFormRequest extends Request
// transaction / journal data:
'description' => $this->string('description'),
- 'amount' => $this->float('amount'),
+ 'amount' => $this->string('amount'),
'budget_id' => $this->integer('budget_id'),
'category' => $this->string('category'),
'source_account_id' => $this->integer('source_account_id'),
@@ -74,9 +74,9 @@ class JournalFormRequest extends Request
'piggy_bank_id' => $this->integer('piggy_bank_id'),
// native amount and stuff like that:
- 'native_amount' => $this->float('native_amount'),
- 'source_amount' => $this->float('source_amount'),
- 'destination_amount' => $this->float('destination_amount'),
+ 'native_amount' => $this->string('native_amount'),
+ 'source_amount' => $this->string('source_amount'),
+ 'destination_amount' => $this->string('destination_amount'),
];
return $data;
diff --git a/app/Http/Requests/PiggyBankFormRequest.php b/app/Http/Requests/PiggyBankFormRequest.php
index 268a0287c8..f882835309 100644
--- a/app/Http/Requests/PiggyBankFormRequest.php
+++ b/app/Http/Requests/PiggyBankFormRequest.php
@@ -47,7 +47,7 @@ class PiggyBankFormRequest extends Request
'name' => $this->string('name'),
'startdate' => new Carbon,
'account_id' => $this->integer('account_id'),
- 'targetamount' => $this->float('targetamount'),
+ 'targetamount' => $this->string('targetamount'),
'targetdate' => $this->date('targetdate'),
'note' => $this->string('note'),
];
diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js
index 7004447dfa..eb5a8f0acf 100644
--- a/public/js/ff/transactions/list.js
+++ b/public/js/ff/transactions/list.js
@@ -147,7 +147,7 @@ function countChecked() {
$('.mass_delete span').text(delete_selected_txt + ' (' + checked + ')');
// get amount for the transactions:
- getAmounts();
+ //getAmounts();
$('.mass_button_options').show();
diff --git a/resources/views/index.twig b/resources/views/index.twig
index 89b03ae452..ba892acac2 100644
--- a/resources/views/index.twig
+++ b/resources/views/index.twig
@@ -79,7 +79,7 @@
<div class="box-footer clearfix">
<a class="btn btn-sm btn-default btn-flat pull-right"
- href="{{ route('accounts.show',data[1].id) }}">{{ (data[1]|balance)|formatAmountPlain }}</a>
+ href="{{ route('accounts.show',data[1].id) }}">{{ formatAmountByAccount(data[1], data[1]|balance, false) }}</a>
</div>
</div>
{% endfor %}