mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Add comma support to invoice search in registrar #2665
This commit is contained in:
parent
7b6a12a4cc
commit
b5167213d9
1 changed files with 2 additions and 0 deletions
|
@ -6,6 +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!(',', '.')
|
||||
@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