Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-05-29 13:32:16 +06:30
23 changed files with 724 additions and 508 deletions

View File

@@ -41,7 +41,7 @@ class CardSaleTran < ApplicationRecord
if payment_type.blank?
payment = ''
else
payment = " app LIKE '#{payment_type}'"
payment = " app LIKE '#{payment_type}'"
end
if from.present? && to.present?
@@ -52,7 +52,7 @@ class CardSaleTran < ApplicationRecord
if shift.present?
query1 = cardSale.where("s.shift_sale_id in (?)", shift.to_a)
elsif shift_sale_range.present?
elsif shift_sale_range.present?
query1 = cardSale.where("s.shift_sale_id in (?)",shift_sale_range.to_a)
else
query1 = cardSale.where("DATE_FORMAT(s.receipt_date,'%Y-%m-%d') between ? and ?",from,to)
@@ -67,7 +67,6 @@ class CardSaleTran < ApplicationRecord
shift_closed_at As closing_date,")
.order("shift_sales.id DESC")
return query = query.where("shift_sales.shift_started_at >= ?" , from)
# byebug
end
end
end