close #2543 Fixed: remove not equal report basis and financial year option. ( #363b0t5 )
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Traits;
|
||||
use App\Traits\SearchString;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Date;
|
||||
use Lorisleiva\LaravelSearchString\SearchStringManager;
|
||||
|
||||
trait DateTime
|
||||
{
|
||||
@@ -56,31 +55,7 @@ trait DateTime
|
||||
$end = $financial_start->addYear(1)->subDays(1)->endOfDay()->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
// Looking year or not year
|
||||
$query_type = 'whereBetween';
|
||||
|
||||
if (request('search')) {
|
||||
$search_string_manager = new SearchStringManager($query->getModel());
|
||||
$parse = $search_string_manager->parse(request('search'));
|
||||
|
||||
if (! empty($parse->expressions)) {
|
||||
foreach ($parse->expressions as $filter) {
|
||||
if (! $filter instanceof \Lorisleiva\LaravelSearchString\AST\NotSymbol) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($filter->expression->key != 'year') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$query_type = 'whereNotBetween';
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $query->{$query_type}($field, [$start, $end]);
|
||||
return $query->whereBetween($field, [$start, $end]);
|
||||
}
|
||||
|
||||
public function getTimezones()
|
||||
|
||||
Reference in New Issue
Block a user