mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Merge pull request #13114 from inietov/fixes/broken_sorting_manufacturers
Fixed Broken order by manufacturer in Assets table [sc-23313]
This commit is contained in:
commit
ff480a7247
|
@ -1667,7 +1667,7 @@ class Asset extends Depreciable
|
|||
public function scopeOrderManufacturer($query, $order)
|
||||
{
|
||||
return $query->join('models as order_asset_model', 'assets.model_id', '=', 'order_asset_model.id')
|
||||
->join('manufacturers as manufacturer_order', 'order_asset_model.manufacturer_id', '=', 'manufacturer_order.id')
|
||||
->leftjoin('manufacturers as manufacturer_order', 'order_asset_model.manufacturer_id', '=', 'manufacturer_order.id')
|
||||
->orderBy('manufacturer_order.name', $order);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue