diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index dc5dcc4cfb..d79ab05c5e 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -181,8 +181,7 @@ class Accessory extends SnipeModel })->orWhere('accessories.name', 'LIKE', '%'.$search.'%') ->orWhere('accessories.model_number', 'LIKE', '%'.$search.'%') ->orWhere('accessories.order_number', 'LIKE', '%'.$search.'%') - ->orWhere('accessories.purchase_cost', 'LIKE', '%'.$search.'%') - ->orWhere('accessories.purchase_date', 'LIKE', '%'.$search.'%'); + ->orWhere('accessories.purchase_cost', '=', $search); } }); } diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 808f189887..8d7a5bf75a 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -827,7 +827,6 @@ class Asset extends Depreciable ->orWhere('assets.asset_tag', 'LIKE', '%'.$search.'%') ->orWhere('assets.serial', 'LIKE', '%'.$search.'%') ->orWhere('assets.order_number', 'LIKE', '%'.$search.'%') - ->orWhere('assets.purchase_date', 'LIKE', '%'.$search.'%') ->orWhere('assets.purchase_cost', 'LIKE', '%'.$search.'%') ->orWhere('assets.notes', 'LIKE', '%'.$search.'%'); } diff --git a/app/Models/Component.php b/app/Models/Component.php index f578e66f43..21b794c71b 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -144,8 +144,7 @@ class Component extends SnipeModel })->orWhere('components.name', 'LIKE', '%'.$search.'%') ->orWhere('components.order_number', 'LIKE', '%'.$search.'%') ->orWhere('components.serial', 'LIKE', '%'.$search.'%') - ->orWhere('components.purchase_cost', 'LIKE', '%'.$search.'%') - ->orWhere('components.purchase_date', 'LIKE', '%'.$search.'%'); + ->orWhere('components.purchase_cost', 'LIKE', '%'.$search.'%'); } }); } diff --git a/app/Models/Consumable.php b/app/Models/Consumable.php index 9b6a549298..564d9d80bc 100644 --- a/app/Models/Consumable.php +++ b/app/Models/Consumable.php @@ -186,8 +186,7 @@ class Consumable extends SnipeModel }); })->orWhere('consumables.name', 'LIKE', '%'.$search.'%') ->orWhere('consumables.order_number', 'LIKE', '%'.$search.'%') - ->orWhere('consumables.purchase_cost', 'LIKE', '%'.$search.'%') - ->orWhere('consumables.purchase_date', 'LIKE', '%'.$search.'%'); + ->orWhere('consumables.purchase_cost', 'LIKE', '%'.$search.'%'); } }); }