add survey for waiter

This commit is contained in:
phyusin
2018-02-19 14:43:34 +06:30
parent 50372116ad
commit d134e3f67d
4 changed files with 17 additions and 5 deletions

View File

@@ -1060,7 +1060,7 @@ end
.where("(i.qty > 0 and i.price > 0) and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'"+
"and payment_status='paid' and sale_status= 'completed'")
.group('mi.name')
.order("SUM(i.qty) DESC").limit(10)
.order("SUM(i.qty) DESC").limit(20)
end
def self.bottom_products(today)
@@ -1070,7 +1070,7 @@ end
.where("(i.qty > 0 and i.price > 0) and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'"+
"and payment_status='paid' and sale_status= 'completed'")
.group('mi.name')
.order("SUM(i.qty) ASC").limit(10)
.order("SUM(i.qty) ASC").limit(20)
end
def self.hourly_sales(today)