mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
company_user.settings default to null (#3416)
This commit is contained in:
parent
40af77d324
commit
b8c26bb534
@ -201,7 +201,7 @@ class CreateTestData extends Command
|
|||||||
'is_admin' => 1,
|
'is_admin' => 1,
|
||||||
'is_locked' => 0,
|
'is_locked' => 0,
|
||||||
'permissions' => '',
|
'permissions' => '',
|
||||||
'settings' => new \stdClass,
|
'settings' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ class CreateTestData extends Command
|
|||||||
'is_admin' => 1,
|
'is_admin' => 1,
|
||||||
'is_locked' => 0,
|
'is_locked' => 0,
|
||||||
'permissions' => '',
|
'permissions' => '',
|
||||||
'settings' => new \stdClass,
|
'settings' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,6 +214,7 @@ class CompanyController extends BaseController
|
|||||||
'is_admin' => 1,
|
'is_admin' => 1,
|
||||||
'is_locked' => 0,
|
'is_locked' => 0,
|
||||||
'permissions' => '',
|
'permissions' => '',
|
||||||
|
'settings' => null,
|
||||||
//'settings' => DefaultSettings::userSettings(),
|
//'settings' => DefaultSettings::userSettings(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -81,22 +81,22 @@ class StoreClientRequest extends Request
|
|||||||
$input['group_settings_id'] = $this->decodePrimaryKey($input['group_settings_id']);
|
$input['group_settings_id'] = $this->decodePrimaryKey($input['group_settings_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($input['settings']) || empty($input['settings']->currency_id))
|
// if(empty($input['settings']) || empty($input['settings']->currency_id))
|
||||||
{
|
// {
|
||||||
if(empty($input['group_settings_id']))
|
// if(empty($input['group_settings_id']))
|
||||||
{
|
// {
|
||||||
$input['settings']->currency_id = auth()->user()->company()->settings->currency_id;
|
// $input['settings']->currency_id = auth()->user()->company()->settings->currency_id;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
$group_settings = GroupSetting::find($input['group_settings_id']);
|
// $group_settings = GroupSetting::find($input['group_settings_id']);
|
||||||
|
|
||||||
if($group_settings && property_exists($group_settings, 'currency_id') && is_int($group_settings->currency_id))
|
// if($group_settings && property_exists($group_settings, 'currency_id') && is_int($group_settings->currency_id))
|
||||||
$input['settings']->currency_id = $group_settings->currency_id;
|
// $input['settings']->currency_id = $group_settings->currency_id;
|
||||||
else
|
// else
|
||||||
$input['settings']->currency_id = auth()->user()->company()->settings->currency_id;
|
// $input['settings']->currency_id = auth()->user()->company()->settings->currency_id;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(isset($input['contacts']))
|
if(isset($input['contacts']))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user