Bring date only from current year + previous year in the filter.
This commit is contained in:
parent
ae5faf377a
commit
e5f8f254dd
@ -34,7 +34,7 @@ class FilterItem extends EntityJson
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $interval;
|
||||
protected string $interval = '';
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
|
||||
@ -63,7 +63,7 @@ class FilterType
|
||||
$fType = 'not like';
|
||||
}
|
||||
|
||||
if ($filter->getInterval())
|
||||
if (!empty($filter->getInterval()))
|
||||
{
|
||||
$filter->setField("TO_DATE({$filter->getField()}, 'YYMM')");
|
||||
$filter->setValue(DB::raw("TO_DATE(TO_CHAR(current_date , 'YYYY-01-01'), 'YYYY-MM-DD') - INTERVAL
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user