Merge pull request #15655 from Toreg87/fixes/api_asset_create_fmcs
Fixes #15654 Fix asset creation with API and FullMultipleCompanySupport
This commit is contained in:
commit
e1a70023b1
1 changed files with 1 additions and 0 deletions
|
@ -598,6 +598,7 @@ class AssetsController extends Controller
|
|||
$asset->model()->associate(AssetModel::find((int) $request->get('model_id')));
|
||||
|
||||
$asset->fill($request->validated());
|
||||
$asset->company_id = Company::getIdForCurrentUser($request->validated()['company_id']);
|
||||
$asset->created_by = auth()->id();
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue