mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 01:44:30 -04:00
Tweaks for invoice number filtering
This commit is contained in:
parent
94d4da8513
commit
d025d05856
@ -329,7 +329,9 @@ class InvoiceFilters extends QueryFilters
|
||||
|
||||
if($sort_col[0] == 'number') {
|
||||
// return $this->builder->orderByRaw('CAST(number AS UNSIGNED), number ' . $dir);
|
||||
return $this->builder->orderByRaw('ABS(number) ' . $dir);
|
||||
// return $this->builder->orderByRaw("number REGEXP '^[A-Za-z]+$',CAST(number as SIGNED INTEGER),CAST(REPLACE(number,'-','')AS SIGNED INTEGER) ,number");
|
||||
// return $this->builder->orderByRaw('ABS(number) ' . $dir);
|
||||
return $this->builder->orderByRaw("REGEXP_REPLACE(number,'[^0-9]+','')+0 " . $dir);
|
||||
}
|
||||
|
||||
return $this->builder->orderBy($sort_col[0], $dir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user