This commit is contained in:
James Cole
2017-12-28 18:28:22 +01:00
parent 42676746a2
commit 0977d8d631
3 changed files with 4 additions and 4 deletions

View File

@@ -359,7 +359,7 @@ class ImportAccount
'name' => $this->accountName['value'] ?? '(no name)', 'name' => $this->accountName['value'] ?? '(no name)',
'iban' => $this->accountIban['value'] ?? null, 'iban' => $this->accountIban['value'] ?? null,
'active' => true, 'active' => true,
'virtualBalance' => null, 'virtualBalance' => '0',
]; ];
$this->account = $this->repository->store($data); $this->account = $this->repository->store($data);

View File

@@ -190,7 +190,7 @@ class AccountRepository implements AccountRepositoryInterface
// update the account: // update the account:
$account->name = $data['name']; $account->name = $data['name'];
$account->active = $data['active']; $account->active = $data['active'];
$account->virtual_balance = $data['virtualBalance']; $account->virtual_balance = trim($data['virtualBalance']) === '' ? '0': $data['virtualBalance'];
$account->iban = $data['iban']; $account->iban = $data['iban'];
$account->save(); $account->save();
@@ -424,7 +424,7 @@ class AccountRepository implements AccountRepositoryInterface
'name' => $name . ' initial balance', 'name' => $name . ' initial balance',
'active' => false, 'active' => false,
'iban' => '', 'iban' => '',
'virtualBalance' => 0, 'virtualBalance' => '0',
]; ];
Log::debug('Going to create an opening balance opposing account.'); Log::debug('Going to create an opening balance opposing account.');

View File

@@ -252,7 +252,7 @@ trait FindAccountsTrait
'accountType' => 'reconcile', 'accountType' => 'reconcile',
'name' => $name, 'name' => $name,
'iban' => null, 'iban' => null,
'virtualBalance' => null, 'virtualBalance' => '0',
'active' => true, 'active' => true,
]; ];
$account = $this->storeAccount($data); $account = $this->storeAccount($data);