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

This commit is contained in:
Yan
2017-11-24 19:04:55 +06:30
5 changed files with 56 additions and 26 deletions

View File

@@ -623,6 +623,7 @@ def self.get_item_query()
query = Sale.select("acc.title as account_name,mi.account_id, i.item_instance_code as item_code, " +
"SUM(i.qty * i.unit_price) as grand_total,SUM(i.qty) as total_item," +
"i.remark as status_type,"+
" i.unit_price as unit_price,i.product_name as product_name, mc.name as" +
" menu_category_name,mc.id as menu_category_id ")
@@ -635,7 +636,7 @@ def self.get_item_query()
query = query.joins(" JOIN accounts acc ON acc.id = mi.account_id")
query = query.where("i.item_instance_code IS NOT NULL")
query = query.group("i.item_instance_code").order("mi.account_id, mi.menu_category_id")
query = query.group("i.product_name").order("mi.account_id, mi.menu_category_id")
end
def self.get_by_shift_items(shift_sale_range, shift, from, to, status)