change checkout time and free time

This commit is contained in:
phyusin
2017-12-14 16:40:29 +06:30
parent fc45198542
commit ed429b2d4b
4 changed files with 39 additions and 28 deletions

View File

@@ -1076,7 +1076,7 @@ end
end
def self.total_other_customer(today)
query = Sale.select("count(distinct sales.customer_id) as total_cus")
query = Sale.select("count(sales.customer_id) as total_cus")
.joins("JOIN customers as c ON c.customer_id = sales.customer_id")
.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and c.customer_type is null and c.membership_id is null',today)
.first()