PMCORE-2636
This commit is contained in:
@@ -162,6 +162,8 @@ class Search extends AbstractCases
|
||||
$query->groupBy('APP_NUMBER');
|
||||
/** Apply filters */
|
||||
$this->filters($query);
|
||||
/** Exclude the web entries does not submitted */
|
||||
$query->positiveCases($query);
|
||||
/** Apply order and pagination */
|
||||
// The order by clause
|
||||
$query->orderBy($this->getOrderByColumn(), $this->getOrderDirection());
|
||||
|
||||
@@ -455,6 +455,18 @@ class Delegation extends Model
|
||||
return $query->where('APP_DELEGATION.APP_NUMBER', '<=', $to);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope for query to get the positive cases for avoid the web entry
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopePositiveCases($query)
|
||||
{
|
||||
return $query->where('APP_DELEGATION.APP_NUMBER', '>', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope more than one range of cases
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user