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

This commit is contained in:
phyusin
2017-12-13 18:30:27 +06:30
17 changed files with 167 additions and 115 deletions

View File

@@ -979,7 +979,8 @@ end
def self.hourly_sales(today)
query= Sale.select("grand_total")
.where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
.group("date_format(convert_tz(receipt_date,'+00:00','+06:30'), '%I:%p')")
.group("date_format(CONVERT_TZ(receipt_date,'+00:00', 'SYSTEM'), '%I %p')")
.order('receipt_date')
end
def self.employee_sales(today)