change query for transactions/order and transactions/bookings, transactions/credit

This commit is contained in:
phyusin
2017-11-27 18:16:46 +06:30
parent 9ad9e9ae57
commit ad34002789
8 changed files with 19 additions and 21 deletions

View File

@@ -3,16 +3,13 @@ class Transactions::OrdersController < ApplicationController
def index
filter = params[:filter]
count = params[:count]
from = params[:from]
to = params[:to]
if filter.nil? && from.nil? && to.nil? && count.nil?
if filter.nil? && from.nil? && to.nil?
orders = Order.order("order_id desc")
else
orders = Order.search(filter,from,to,count)
orders = Order.search(filter,from,to)
end
if !orders.nil?