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

This commit is contained in:
phyusin
2018-07-24 14:13:05 +06:30

View File

@@ -878,10 +878,9 @@ def self.get_by_shift_sale_by_item(from,to,status)
end end
def self.get_item_query(type) def self.get_item_query(type)
if type == "revenue"
if type == "revenue" || type.nil? sale_type = "i.qty > 0 and status IS NULL"
sale_type = "i.status IS NULL and i.qty >0 " elsif type == "all" || type.nil?
elsif type == "all"
sale_type = "" sale_type = ""
elsif type == "discount" elsif type == "discount"
sale_type = "i.status = 'Discount'" sale_type = "i.status = 'Discount'"