Updated various files for #506

This commit is contained in:
James Cole
2016-12-30 13:45:02 +01:00
parent 9ec3febbfa
commit ac86e75233
22 changed files with 63 additions and 70 deletions

View File

@@ -43,13 +43,13 @@ class AccountFormRequest extends Request
'active' => intval($this->input('active')) === 1,
'accountType' => $this->input('what'),
'currency_id' => intval($this->input('currency_id')),
'virtualBalance' => round($this->input('virtualBalance'), 2),
'virtualBalance' => round($this->input('virtualBalance'), 12),
'virtualBalanceCurrency' => intval($this->input('amount_currency_id_virtualBalance')),
'iban' => trim(strval($this->input('iban'))),
'BIC' => trim(strval($this->input('BIC'))),
'accountNumber' => trim(strval($this->input('accountNumber'))),
'accountRole' => $this->input('accountRole'),
'openingBalance' => round($this->input('openingBalance'), 2),
'openingBalance' => round($this->input('openingBalance'), 12),
'openingBalanceDate' => new Carbon((string)$this->input('openingBalanceDate')),
'openingBalanceCurrency' => intval($this->input('amount_currency_id_openingBalance')),
'ccType' => $this->input('ccType'),

View File

@@ -40,10 +40,10 @@ class BillFormRequest extends Request
return [
'name' => $this->get('name'),
'match' => $this->get('match'),
'amount_min' => round($this->get('amount_min'), 2),
'amount_min' => round($this->get('amount_min'), 12),
'amount_currency_id_amount_min' => intval($this->get('amount_currency_id_amount_min')),
'amount_currency_id_amount_max' => intval($this->get('amount_currency_id_amount_max')),
'amount_max' => round($this->get('amount_max'), 2),
'amount_max' => round($this->get('amount_max'), 12),
'date' => new Carbon($this->get('date')),
'repeat_freq' => $this->get('repeat_freq'),
'skip' => intval($this->get('skip')),

View File

@@ -59,7 +59,7 @@ class JournalFormRequest extends Request
// transaction / journal data:
'description' => $this->getFieldOrEmptyString('description'),
'amount' => round($this->get('amount'), 2),
'amount' => round($this->get('amount'), 12),
'budget_id' => intval($this->get('budget_id')),
'category' => $this->getFieldOrEmptyString('category'),
'source_account_id' => intval($this->get('source_account_id')),

View File

@@ -41,7 +41,7 @@ class PiggyBankFormRequest extends Request
'name' => trim($this->get('name')),
'startdate' => new Carbon,
'account_id' => intval($this->get('account_id')),
'targetamount' => round($this->get('targetamount'), 2),
'targetamount' => round($this->get('targetamount'), 12),
'targetdate' => strlen(strval($this->get('targetdate'))) > 0 ? new Carbon($this->get('targetdate')) : null,
'note' => trim(strval($this->get('note'))),
];

View File

@@ -93,7 +93,7 @@ class SplitJournalFormRequest extends Request
$category = $this->get('category')[$index] ?? '';
$transaction = [
'description' => $description,
'amount' => round($this->get('amount')[$index], 2),
'amount' => round($this->get('amount')[$index], 12),
'budget_id' => $this->get('budget_id')[$index] ? intval($this->get('budget_id')[$index]) : 0,
'category' => trim($category),
'source_account_id' => isset($this->get('source_account_id')[$index])