hourly sale group query
This commit is contained in:
@@ -858,6 +858,7 @@ end
|
|||||||
def self.hourly_sales(today)
|
def self.hourly_sales(today)
|
||||||
query= Sale.select("grand_total")
|
query= Sale.select("grand_total")
|
||||||
.where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
|
.where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
|
||||||
|
.group("date_format(receipt_date, '%I %p')")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.employee_sales(today)
|
def self.employee_sales(today)
|
||||||
|
|||||||
Reference in New Issue
Block a user