latest Aston req from OPT team

This commit is contained in:
phyusin
2018-03-21 17:45:55 +06:30
parent 0390d15e0a
commit 7063d937e3
8 changed files with 143 additions and 6 deletions

View File

@@ -605,7 +605,7 @@ class Sale < ApplicationRecord
end
if from.present? && to.present?
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)
sale = Sale.where("DATE_FORMAT(receipt_date,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(receipt_date,'%d-%m-%Y') <= ? and NOT sale_status = 'new' ", from,to)
query = sale.where(keyword)
else
where("receipt_no LIKE ? OR cashier_name LIKE ? OR sale_status ='#{filter}'","%#{filter}%","%#{filter}%")