diff --git a/app/adminapi/lists/cost_project/CostApprovedProjectLists.php b/app/adminapi/lists/cost_project/CostApprovedProjectLists.php index a749eeba1..d828109a6 100644 --- a/app/adminapi/lists/cost_project/CostApprovedProjectLists.php +++ b/app/adminapi/lists/cost_project/CostApprovedProjectLists.php @@ -125,7 +125,14 @@ public function count(): int { $status = $this->request->get('status', 0); - return MarketingContract::where($this->searchWhere)->where('status', $status)->where('review_status', 1)->count(); + $business_nature = $this->request->get('business_nature', 0); + $where=[ + ['status', '=', $status] + ]; + if($business_nature>0){ + $where[]=['business_nature','=',$business_nature]; + } + return MarketingContract::where($this->searchWhere)->where($where)->where('review_status', 1)->count(); } public function setFileName(): string