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

@@ -449,7 +449,7 @@ class Sale < ApplicationRecord
sale = Sale.where("DATE_FORMAT(receipt_date,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(receipt_date,'%d-%m-%Y') <= ? and NOT sale_status = 'void' ", from,to)
query = sale.where(keyword)
else
where("receipt_no LIKE ? OR cashier_name LIKE ? OR sale_status ='#{filter}'","%#{filter}%","%#{filter}%",)
where("receipt_no LIKE ? OR cashier_name LIKE ? OR sale_status ='#{filter}'","%#{filter}%","%#{filter}%")
end
end