mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Also do some account meta on the create screen.
This commit is contained in:
parent
919a0c01e4
commit
357638a26c
@ -163,7 +163,7 @@ class AccountController extends BaseController
|
||||
'subTitle', 'Edit ' . strtolower(
|
||||
$account->accountType->type
|
||||
) . ' "' . $account->name . '"'
|
||||
)->with('roles', Config::get('firefly.accountRoles'));
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -272,6 +272,13 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface
|
||||
$this->storeInitialBalance($account, $data);
|
||||
}
|
||||
|
||||
switch ($account->accountType->type) {
|
||||
case 'Asset account':
|
||||
case 'Default account':
|
||||
$account->updateMeta('accountRole', $data['account_role']);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Tell transaction journal to store a new one.*/
|
||||
\Event::fire('account.store', [$account]);
|
||||
|
@ -33,6 +33,7 @@
|
||||
{{Form::ffDate('openingbalancedate', date('Y-m-d'))}}
|
||||
@endif
|
||||
{{Form::ffCheckbox('active','1',true)}}
|
||||
{{Form::ffSelect('account_role',Config::get('firefly.accountRoles'))}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
@if($account->accounttype->type == 'Default account' || $account->accounttype->type == 'Asset account')
|
||||
{{Form::ffBalance('openingbalance')}}
|
||||
{{Form::ffDate('openingbalancedate')}}
|
||||
{{Form::ffSelect('account_role',$roles)}}
|
||||
{{Form::ffSelect('account_role',Config::get('firefly.accountRoles'))}}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user