mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
fixed ranges error
This commit is contained in:
parent
1371d9e159
commit
095b891de9
1 changed files with 2 additions and 2 deletions
|
@ -93,10 +93,10 @@ module Admin
|
|||
|
||||
def filter_by_receipt_date(invoices)
|
||||
date_from_param = params[:q][:receipt_date_gteq] if params[:q][:receipt_date_gteq].present?
|
||||
date_from = date_from_param ? Time.zone.parse(date_from_param) : -Float::INFINITY
|
||||
date_from = date_from_param ? Time.zone.parse(date_from_param) : nil
|
||||
|
||||
date_until_param = params[:q][:receipt_date_lteq] if params[:q][:receipt_date_lteq].present?
|
||||
date_until = date_until_param ? Time.zone.parse(date_until_param) : Float::INFINITY
|
||||
date_until = date_until_param ? Time.zone.parse(date_until_param) : nil
|
||||
|
||||
invoices.where(account_activities: { created_at: date_from..date_until })
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue