change filter query for credit note

This commit is contained in:
phyusin
2018-11-13 09:41:19 +06:30
parent d0ead177a1
commit 0fab78e4e9

View File

@@ -747,13 +747,13 @@ class Sale < ApplicationRecord
if filter.blank?
keyword = ''
else
keyword = "and receipt_no LIKE ? OR cashier_name LIKE ? OR sale_status ='#{filter}'","%#{filter}%","%#{filter}%"
keyword = "and sales.receipt_no LIKE ? OR sales.cashier_name LIKE ? OR sales.sale_status ='#{filter}'","%#{filter}%","%#{filter}%"
end
if customer.blank?
custo = ''
else
custo = "and customer_id = '#{customer}'"
custo = "and sales.customer_id = '#{customer}'"
end
if order_source.blank?