From 2b35ee033dad3276172b5b8ff6f54c8a3b18f17d Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Wed, 16 Oct 2019 09:40:17 +0630 Subject: [PATCH] fixed hourly sale item --- app/models/sale.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/sale.rb b/app/models/sale.rb index dc8769ce..8be79db3 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -2861,8 +2861,8 @@ def self.get_hourly_item_query(type) "i.status as status_type,i.remark as remark,"+ "i.unit_price,i.price as price,i.product_name as product_name, " + "i.menu_category_name,i.menu_category_code as menu_category_id, " + - "date_format(CONVERT_TZ(receipt_date,'+00:00', '+06:30'), '%I %p') - as date_format," + + + "concat(hour(CONVERT_TZ(receipt_date,'+00:00', '+06:30')), ':00 - ', hour(CONVERT_TZ(receipt_date,'+00:00', '+06:30')) + 1, ':00') as date_format," + "hour(CONVERT_TZ(receipt_date,'+00:00', '+06:30')) as hour") query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id" +