This allows the user to set the “default” currency for an asset account (#305). It doesn’t do anything other than this yet.

This commit is contained in:
James Cole
2016-11-25 18:00:29 +01:00
parent 0c72e1831f
commit 728fda0116
6 changed files with 32 additions and 7 deletions

View File

@@ -42,6 +42,7 @@ class AccountFormRequest extends Request
'name' => trim($this->input('name')),
'active' => intval($this->input('active')) === 1,
'accountType' => $this->input('what'),
'currency_id' => intval($this->input('currency_id')),
'virtualBalance' => round($this->input('virtualBalance'), 2),
'virtualBalanceCurrency' => intval($this->input('amount_currency_id_virtualBalance')),
'iban' => trim($this->input('iban')),
@@ -80,6 +81,7 @@ class AccountFormRequest extends Request
'iban' => 'iban',
'virtualBalance' => 'numeric',
'openingBalanceDate' => 'date',
'currency_id' => 'exists:transaction_currencies,id',
'accountNumber' => 'between:1,255|uniqueAccountNumberForUser',
'accountRole' => 'in:' . $accountRoles,
'active' => 'boolean',