mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Invoice search blank fix #2665
This commit is contained in:
parent
4926760b38
commit
4e03a65e8d
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ class Registrar::InvoicesController < RegistrarController
|
|||
def index
|
||||
params[:q] ||= {}
|
||||
invoices = current_user.registrar.invoices.includes(:invoice_items, :account_activity)
|
||||
params[:q][:sum_cache_gteq].gsub!(',', '.')
|
||||
params[:q][:sum_cache_lteq].gsub!(',', '.')
|
||||
params[:q][:sum_cache_gteq].gsub!(',', '.') if params[:q][:sum_cache_gteq]
|
||||
params[:q][:sum_cache_lteq].gsub!(',', '.') if params[:q][:sum_cache_lteq]
|
||||
@q = invoices.search(params[:q])
|
||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||
@invoices = @q.result.page(params[:page])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue