Merge pull request #13108 from ak-piracha/fixes/component_delete_showing_in_assest

Fixes: issue #13073: deleted component addearing in asset component t…
This commit is contained in:
snipe 2023-05-31 10:50:34 -04:00 committed by GitHub
commit 596b510a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -403,7 +403,7 @@ class Asset extends Depreciable
*/
public function components()
{
return $this->belongsToMany('\App\Models\Component', 'components_assets', 'asset_id', 'component_id')->withPivot('id', 'assigned_qty', 'created_at')->withTrashed();
return $this->belongsToMany('\App\Models\Component', 'components_assets', 'asset_id', 'component_id')->withPivot('id', 'assigned_qty', 'created_at');
}