Merge branch 'staging' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-08-09 15:32:46 +06:30
7 changed files with 160 additions and 27 deletions

View File

@@ -423,7 +423,7 @@ class Sale < ApplicationRecord
.where("DATE_FORMAT(receipt_date,'%d-%m-%Y') >= ?" + " AND DATE_FORMAT(receipt_date,'%d-%m-%Y') <= ? and sp.payment_method = 'creditnote' #{keyword} #{custo}", from,to)
else
sale = Sale.all.joins("JOIN sale_payments sp on sp.sale_id = sales.sale_id")
.where("sp.payment_method =? #{keyword} #{custo}",'creditnote')
.where("sp.payment_method ='creditnote' #{keyword} #{custo}")
end