From 6b0a25453d866f24d64f35cb0bc407a0eeecafd8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 18 Jun 2024 10:49:51 +1000 Subject: [PATCH] Static Analysis --- app/Http/Controllers/PurchaseOrderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/PurchaseOrderController.php b/app/Http/Controllers/PurchaseOrderController.php index c06fff041bd2..10cbc1635f81 100644 --- a/app/Http/Controllers/PurchaseOrderController.php +++ b/app/Http/Controllers/PurchaseOrderController.php @@ -495,7 +495,7 @@ class PurchaseOrderController extends BaseController $purchase_orders = PurchaseOrder::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()->get(); - if (! $purchase_orders) { + if ($purchase_orders->count() == 0) { return response()->json(['message' => 'No Purchase Orders Found']); }