Fixed #6367 - pass table name and column_id to scopeCompanyables

Solves error: Integrity constraint violation: 1052 Column 'company_id' in where clause is ambiguous
This commit is contained in:
snipe 2019-02-13 01:26:11 -08:00
parent f88fee0f21
commit e2c0f01a10

View file

@ -353,7 +353,7 @@ class AssetsController extends Controller
'assets.assigned_to',
'assets.assigned_type',
'assets.status_id'
])->with('model', 'assetstatus', 'assignedTo')->NotArchived());
])->with('model', 'assetstatus', 'assignedTo')->NotArchived(),'company_id', 'assets');
if ($request->has('assetStatusType') && $request->input('assetStatusType') === 'RTD') {
$assets = $assets->RTD();